Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make methods in the UITheme hierarchy take the display scale factor into account #14464

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Morphic-Widgets-Taskbar/UITheme.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ UITheme >> newBasicTaskbarButtonIn: aTaskbar for: aMorph [
newRowIn: aTaskbar
for: {((self iconNamed: aMorph taskbarIconName) ifNil: [^nil]) asMorph. lab}.

lm cellInset: 2.
lm cellInset: 2 scaledByDisplayScaleFactor.

button := self
newButtonIn: aTaskbar
Expand Down
12 changes: 6 additions & 6 deletions src/Polymorph-Widgets/PharoDarkTheme.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ PharoDarkTheme >> buttonNormalBorderStyleFor: aButton [
width: 0;
baseColor: Color transparent ].
^ SimpleBorderStyle new
width: 1;
width: 1 scaledByDisplayScaleFactor;
baseColor: self buttonColor
]

Expand Down Expand Up @@ -76,7 +76,7 @@ PharoDarkTheme >> configureWindowBorderFor: aWindow [
| aStyle |
aStyle := SimpleBorderStyle new
color: self borderColor;
width: 1.
width: 1 scaledByDisplayScaleFactor.
aWindow borderStyle: aStyle
]

Expand All @@ -95,7 +95,7 @@ PharoDarkTheme >> dropListNormalListBorderStyleFor: aDropList [
"Return the normal borderStyle for the list of the given given drop list"

^ BorderStyle inset
width: 1;
width: 1 scaledByDisplayScaleFactor;
baseColor: self buttonColor
]

Expand Down Expand Up @@ -152,7 +152,7 @@ PharoDarkTheme >> taskbarItemMouseOverBorderStyleFor: aButton [

^ BottomBorderStyle new
color: Color white;
width: 2;
width: 2 scaledByDisplayScaleFactor;
yourself
]

Expand All @@ -167,8 +167,8 @@ PharoDarkTheme >> taskbarItemNormalBorderStyleFor: aButton [

^ BottomBorderStyle new
color: Color white;
width: 1;
trimSize: 2;
width: 1 scaledByDisplayScaleFactor;
trimSize: 2 scaledByDisplayScaleFactor;
yourself
]

Expand Down
10 changes: 5 additions & 5 deletions src/Polymorph-Widgets/PharoLightTheme.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ PharoLightTheme >> buttonNormalBorderStyleFor: aButton [
baseColor: Color transparent ].
outerColor := self darkBaseColorFor: aButton.
^ SimpleBorderStyle new
width: 1;
width: 1 scaledByDisplayScaleFactor;
baseColor: outerColor
]

Expand All @@ -50,7 +50,7 @@ PharoLightTheme >> configureWindowBorderFor: aWindow [
| aStyle |
aStyle := SimpleBorderStyle new
color: (Color lightGray);
width: 1.
width: 1 scaledByDisplayScaleFactor.
aWindow borderStyle: aStyle
]

Expand Down Expand Up @@ -93,7 +93,7 @@ PharoLightTheme >> taskbarItemDisabledFillStyleFor: aButton [
PharoLightTheme >> taskbarItemMouseOverBorderStyleFor: aButton [
^ BottomBorderStyle new
color: (Color fromHexString: '616161');
width: 2;
width: 2 scaledByDisplayScaleFactor;
yourself
]

Expand All @@ -106,8 +106,8 @@ PharoLightTheme >> taskbarItemMouseOverFillStyleFor: aButton [
PharoLightTheme >> taskbarItemNormalBorderStyleFor: aButton [
^ BottomBorderStyle new
color: (Color fromHexString: '757575');
width: 2;
trimSize: 2;
width: 2 scaledByDisplayScaleFactor;
trimSize: 2 scaledByDisplayScaleFactor;
yourself
]

Expand Down
Loading