File tree Expand file tree Collapse file tree 5 files changed +41
-13
lines changed
packages/Babylonian-UI.package Expand file tree Collapse file tree 5 files changed +41
-13
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ editFieldFor: model text: getTextSelector onChange: setTextSelector onAccept: ac
1313 vResizing: #shrinkWrap ;
1414 hResizing: #rigid ;
1515 wrapFlag: true ;
16- wantsFrameAdornments: false ;
16+ wantsFrameAdornments: false ;
1717 height: self fontHeight;
18+ layoutInset: 2 ;
1819 width: ((TextStyle defaultFont widthOfString: (model perform: getTextSelector)) + (self fontWidth)
1920 max: (20 * self fontWidth)).
2021 ^ pluggableTextMorph
Original file line number Diff line number Diff line change 99 "codeContentChanged" : " pre 11/11/2019 10:25" ,
1010 "containingBrowser" : " pre 10/6/2020 11:02" ,
1111 "createErrorIndicatorFor:" : " pre 8/17/2020 09:17" ,
12- "editFieldFor:text:onChange:onAccept:" : " pre 10/8/2020 10:49 " ,
12+ "editFieldFor:text:onChange:onAccept:" : " pre 10/8/2020 11:29 " ,
1313 "editFieldInitialContent:onChange:onAccept:" : " pre 11/11/2019 10:41" ,
1414 "emptyTraces" : " pre 8/20/2020 11:42" ,
1515 "ensureErrorIndicatorFor:" : " pre 8/17/2020 09:17" ,
Original file line number Diff line number Diff line change 11private - ui
22newScrollPane
33
4- ^ ScrollPane new
4+ " This weird morph hierarchy pushes the scrollpane down far enough
5+ to balance out the height added by the scroll bar thereby putting the
6+ text in the scroll pan on the same baseline as the label text in the rest
7+ of the annotation morph"
8+ | blocker scrollPane wrapper |
9+ wrapper := Morph new
10+ name: #scrollWrapper ;
11+ color: Color transparent;
12+ borderWidth: 0 ;
13+ changeTableLayout;
14+ listDirection: #topToBottom ;
15+ hResizing: #shrinkWrap ;
16+ vResizing: #shrinkWrap ;
17+ yourself .
18+
19+ blocker := Morph new
20+ color: Color transparent;
21+ borderWidth: 0 ;
22+ height: self scrollBarSize;
23+ yourself .
24+
25+ scrollPane := ScrollPane new
26+ name: #scrollPane ;
527 width: 300 ;
628 color: Color transparent;
729 borderWidth: 0 ;
830 vScrollBarPolicy: #never ;
931 showHScrollBarOnlyWhenNeeded;
1032 scrollBarThickness: self scrollBarSize;
11- height: 20 ;
12- name: #scrollPane ;
13- yourself .
33+ height: 20 ;
34+ yourself .
35+
36+ ^ wrapper
37+ addMorphBack: blocker;
38+ addMorphBack: scrollPane;
39+ yourself
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ updateFrom: traces
88
99 self relevantTracesOf: traces do: [:t | | valuesMorph scrollPane |
1010 lineMorph := self ensureLineMorphFor: t.
11- scrollPane := lineMorph submorphNamed: #scrollPane .
11+ scrollPane := ( lineMorph submorphNamed: #scrollWrapper ) submorphNamed: #scrollPane .
1212 errorIndicatorMorph := lineMorph submorphNamed: #errorIndicatorHolder .
1313
1414 t exampleErrored
@@ -20,10 +20,11 @@ updateFrom: traces
2020
2121 scrollPane scroller removeAllMorphs.
2222
23- valuesMorph := (self valuesTextFor: t) asMorph.
24- valuesMorph lock.
25- valuesMorph hResizing: #shrinkWrap .
26- valuesMorph color: PluggableTextMorph basicNew userInterfaceTheme textColor.
23+ valuesMorph := (self valuesTextFor: t) asMorph
24+ lock;
25+ hResizing: #shrinkWrap ;
26+ color: PluggableTextMorph basicNew userInterfaceTheme textColor;
27+ yourself .
2728
2829 scrollPane scroller addMorph: valuesMorph.
2930 scrollPane height: valuesMorph height + self scrollBarSize].
Original file line number Diff line number Diff line change 1313 "newExpressionMorph" : " pre 10/8/2020 10:46" ,
1414 "newHaltButtonFor:" : " pre 9/29/2020 15:55" ,
1515 "newLineMorphFor:" : " pre 10/8/2020 10:46" ,
16- "newScrollPane" : " pre 10/8/2020 10:47 " ,
16+ "newScrollPane" : " pre 10/8/2020 11:21 " ,
1717 "noValuesText" : " pre 7/7/2020 16:38" ,
1818 "relevantTracesOf:do:" : " pre 11/18/2019 12:47" ,
1919 "setExpressionButtonClicked" : " pre 9/22/2020 10:05" ,
2020 "updateExpressionMorphIfNecessary" : " pre 9/22/2020 10:04" ,
21- "updateFrom:" : " pre 10/6 /2020 17:16 " ,
21+ "updateFrom:" : " pre 10/8 /2020 11:20 " ,
2222 "valueTextFor:" : " pre 7/7/2020 16:43" ,
2323 "valuesTextFor:" : " pre 9/28/2020 10:26" } }
You can’t perform that action at this time.
0 commit comments