forked from Cuis-Smalltalk/Cuis-Smalltalk-Dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make rescaling of window buttons consisten with initial creation
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...caleButtons-consistentWith-initilizeLabelArea-JuanVuletich-2024Aug27-16h33m-jmv.001.cs.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'From Cuis7.1 [latest update: #6643] on 27 August 2024 at 4:34:13 pm'! | ||
|
||
!SystemWindow methodsFor: 'geometry' stamp: 'jmv 8/27/2024 16:33:11'! | ||
rescaleButtons | ||
"boxExtent changed. Update my buttons." | ||
|
||
| buttonExtent buttonPos spacing | | ||
buttonExtent := Theme current titleBarButtonsExtent. | ||
buttonPos := (self labelHeight + borderWidth - Theme current titleBarButtonsExtent / 2) ceiling asPoint. | ||
spacing := Theme current titleBarButtonsExtent x *13//10. | ||
self submorphsReverseDo: [ :aMorph | | ||
(aMorph is: #PluggableButtonMorph) | ||
ifTrue: [ | ||
aMorph morphExtent: buttonExtent. | ||
aMorph morphPosition: buttonPos. | ||
buttonPos := buttonPos + (spacing@0). | ||
]. | ||
]! ! | ||
|