Skip to content

Commit

Permalink
readd Morph resizing
Browse files Browse the repository at this point in the history
(cherry-picked from commit becfd275e614155fbb8ccfebf188716695e17f02)
  • Loading branch information
ekrebs5 committed Oct 2, 2023
1 parent fa9ec69 commit 7b5c92a
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,5 @@ editFieldFor: model text: getTextSelector onChange: setTextSelector onAccept: ac
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
Expand Up @@ -11,7 +11,7 @@ initialize
listDirection: #leftToRight;
vResizing: #shrinkWrap;
cellInset: 1;
layoutInset: 1.
layoutInset: 5@1.

BPStyler
withSidebarAnnotations: [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
private - 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:" : "pre 6/7/2021 16:27",
"editFieldFor:text:onChange:onAccept:" : "joabe 10/2/2023 13:43",
"editFieldInitialContent:onChange:onAccept:" : "pre 7/20/2022 17:19",
"editFieldStyledInitialContent:onChange:onAccept:" : "pre 7/20/2022 17:17",
"editFieldStyledInitialContent:onChange:onAccept:" : "joabe 10/2/2023 13:43",
"emptyTraces" : "pre 5/3/2021 16:56",
"ensureErrorIndicatorFor:" : "jb 12/7/2020 18:57",
"ensureNoErrorIndicator" : "jb 12/7/2020 18:57",
Expand All @@ -31,7 +31,7 @@
"iconSize" : "pre 7/24/2019 13:18",
"id" : "pre 7/2/2019 16:38",
"id:" : "pre 7/2/2019 16:38",
"initialize" : "joabe 5/31/2023 14:28",
"initialize" : "joabe 10/2/2023 13:42",
"isAssertion" : "pre 7/3/2019 11:11",
"isBPAnnotationMorph" : "pre 7/3/2019 11:10",
"isExample" : "pre 7/23/2019 12:47",
Expand All @@ -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 10/2/2023 13:42",
"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 @@ -3,7 +3,7 @@ addExampleSpecificMorphs

exampleSpecificMorphs := self newContainerMorph.
exampleSpecificMorphs
hResizing: #shrinkWrap;
hResizing: #spaceFill;
listDirection: #topToBottom;
cellPositioning: #topLeft;
cellGap: ((self fontHeight * 0.2) rounded max: 2).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ initialize
BPStyler withSidebarAnnotations: [
self
wrapDirection: #leftToRight;
hResizing: #shrinkWrap;
hResizing: #spaceFill;
vResizing: #shrinkWrap].

self
cellPositioning: #leftCenter;
cellInset: 0;
cellGap: ((0.7 * self fontWidth) rounded max: 2)
cellGap: ((0.7 * self fontWidth) rounded max: 2);
layoutInset: 20@2;
hResizing: #spaceFill.
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; yourself.
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 @@ -8,7 +8,7 @@
"addCollapseButtonMorph" : "pre 7/19/2022 15:28",
"addDeleteButtonMorph" : "pre 2/22/2021 12:06",
"addExampleNameMorph" : "pre 2/22/2021 12:06",
"addExampleSpecificMorphs" : "jb 12/5/2021 02:01",
"addExampleSpecificMorphs" : "joabe 10/2/2023 13:50",
"addLoaderIconHolder" : "jb 12/7/2020 18:58",
"addMenuButtonMorph" : "lu 1/25/2022 00:15",
"applyUserInterfaceTheme" : "joabe 7/4/2023 11:57",
Expand All @@ -28,12 +28,12 @@
"example:" : "jb 12/7/2020 18:58",
"expand" : "pre 7/19/2022 15:29",
"expandInExamplesMorph" : "pre 7/19/2022 15:41",
"initialize" : "pre 5/3/2021 12:00",
"initialize" : "joabe 10/2/2023 13:50",
"isCollapsed" : "pre 1/12/2021 10:20",
"isExample" : "pre 9/30/2020 10:34",
"isExampleActive" : "pre 9/30/2020 10:34",
"menuContentsSymbolQuints" : "joabe 5/9/2023 17:34",
"newLabelContainerMorph:" : "joabe 7/4/2023 12:10",
"newLabelContainerMorph:" : "joabe 10/2/2023 13:44",
"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
Expand Up @@ -2,4 +2,4 @@ stepping
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 10/2/2023 13:44",
"stepTime" : "pre 1/21/2021 18:01",
"textEmphasis" : "pre 7/20/2022 16:41",
"update:" : "pre 5/6/2021 16:49",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
private - ui
defaultCellInset

^ 3@0
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
private - ui
defaultLayoutInset

^ 20@0
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
"addArgumentScriptMorphs" : "joabe 7/4/2023 11:23",
"addExampleSpecificMorphs" : "pre 1/8/2021 13:48",
"addReceiverConstructorMorph" : "joabe 7/4/2023 11:24",
"defaultCellInset" : "ek 10/2/2023 13:40",
"defaultLayoutInset" : "ek 10/2/2023 13:40",
"newSpecimenSelectionButtonOnClick:" : "jb 12/5/2021 01:50",
"selectLiveSpecimen:then:" : "pre 1/10/2023 16:19" } }

0 comments on commit 7b5c92a

Please sign in to comment.