From ee48ec29f03cbee6ea8151fdf41e56d95ec2b5f3 Mon Sep 17 00:00:00 2001 From: Veit Heller Date: Mon, 13 Jun 2022 22:22:22 +0200 Subject: [PATCH] Add `Fn` to type signature explainer --- src/Carp/CarpTypeSignature.class.st | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Carp/CarpTypeSignature.class.st b/src/Carp/CarpTypeSignature.class.st index 278d822..4e74018 100644 --- a/src/Carp/CarpTypeSignature.class.st +++ b/src/Carp/CarpTypeSignature.class.st @@ -70,6 +70,25 @@ CarpTypeSignature >> elementsList [ text: ''; padding: (BlInsets all: 5)) ]. + (tokens includes: 'Fn') + ifTrue: [ verticalContainer + addChild: (BrLabel new + aptitude: BrGlamorousLabelAptitude new + + (GtExplainerExplanationAptitude new explanationModel: 'Fn') + + (BrStyleCommonAptitude new + hovered: [ :aStyle | + aStyle background: BrGlamorousColors textHighlightColor. + aStyle + do: [ tooltipsContainer + text: 'is the function type and is read: ' asRopedText, '(Fn [] ).' asRopedText glamorousCodeFont; + visibility: BlVisibility visible ] + after: [ tooltipsContainer + text: '' asRopedText; + visibility: BlVisibility gone ] ]); + geometry: (BlRoundedRectangleGeometry cornerRadius: 4); + text: 'Fn'; + padding: (BlInsets all: 5)) ]. + ^ verticalContainer asScrollableElement constraintsDo: [ :c | c horizontal fitContent.