Skip to content

Commit

Permalink
Fixes text field resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeAtHPI committed Aug 22, 2023
1 parent 7ff32e2 commit 42b417b
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ editFieldFor: model text: getTextSelector onChange: setTextSelector onAccept: ac
borderWidth: 0;
editTextSelector: setTextSelector;
vResizing: #shrinkWrap;
hResizing: #shrinkWrap;
hResizing: #rigid;
wrapFlag: true;
wantsFrameAdornments: false;
cellPositioning: #topLeft;
layoutInset: 0;
width: ((TextStyle defaultFont widthOfString: (model perform: getTextSelector)) + (self fontWidth)
max: (20 * self fontWidth)).
layoutInset: 0.
^ pluggableTextMorph
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ editFieldStyledInitialContent: aText onChange: changeBlock onAccept: acceptBlock
onAccept: acceptBlock.

field
hResizing: #spaceFill;
styler: (SHTextStylerST80 new view: field);
updateStyleNow.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ui
rightSidePadding

^ 40
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"codeContentChanged" : "pre 1/21/2021 16:45",
"containingBrowser" : "pre 1/6/2021 19:45",
"createErrorIndicatorFor:" : "pre 2/22/2021 12:15",
"editFieldFor:text:onChange:onAccept:" : "joabe 8/9/2023 16:11",
"editFieldFor:text:onChange:onAccept:" : "joabe 8/22/2023 17:40",
"editFieldInitialContent:onChange:onAccept:" : "pre 7/20/2022 17:19",
"editFieldStyledInitialContent:onChange:onAccept:" : "pre 7/20/2022 17:17",
"editFieldStyledInitialContent:onChange:onAccept:" : "joabe 8/22/2023 17:45",
"emptyTraces" : "pre 5/3/2021 16:56",
"ensureErrorIndicatorFor:" : "jb 12/7/2020 18:57",
"ensureNoErrorIndicator" : "jb 12/7/2020 18:57",
Expand Down Expand Up @@ -51,6 +51,7 @@
"openInBrowser" : "jb 2/22/2022 20:45",
"refreshTextComposition" : "pre 1/11/2021 11:31",
"removeButtonClicked" : "jb 12/7/2020 18:57",
"rightSidePadding" : "joabe 8/22/2023 16:36",
"scrollBarSize" : "pre 7/23/2019 11:18",
"smallFontHeight" : "pre 10/6/2020 16:54",
"startTag" : "pre 7/25/2019 15:42",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ private - ui
newLabelContainerMorph: aLabelString

| container label |
container := self newContainerMorph cellPositioning: #topLeft.
container := self newContainerMorph
cellPositioning: #topLeft;
hResizing: #spaceFill;
yourself.
label := aLabelString asMorph
color: self class textColor;
borderWidth: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"isExample" : "pre 9/30/2020 10:34",
"isExampleActive" : "pre 9/30/2020 10:34",
"menuContentsSymbolQuints" : "joabe 5/9/2023 17:34",
"newLabelContainerMorph:" : "joabe 8/9/2023 16:34",
"newLabelContainerMorph:" : "joabe 8/22/2023 17:47",
"newMenuButton" : "lu 2/15/2022 09:47",
"offerMenuContent" : "lu 1/24/2022 23:40",
"openExampleInDockedProbeLog" : "joabe 5/9/2023 17:33",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
stepping
stepping and presenter
step

BPStyler withoutSidebarAnnotations: [
self width: self owner width - 40]
self width: self owner width - self rightSidePadding]
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"initialize" : "joabe 5/31/2023 18:31",
"isExamples" : "pre 11/25/2020 16:52",
"rememberThat:hasACollapsedStateOf:" : "pre 7/19/2022 15:23",
"step" : "pre 1/21/2021 18:20",
"step" : "joabe 8/22/2023 16:42",
"stepTime" : "pre 1/21/2021 18:01",
"textEmphasis" : "pre 7/20/2022 16:41",
"update:" : "pre 5/6/2021 16:49",
Expand Down

0 comments on commit 42b417b

Please sign in to comment.