The Inbox: Morphic-ct.1714.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Morphic-ct.1714.mcz

commits-2
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1714.mcz

==================== Summary ====================

Name: Morphic-ct.1714
Author: ct
Time: 11 November 2020, 6:33:33.254952 pm
UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309
Ancestors: Morphic-mt.1710

Honor hi-dpi settings for halo, window, and keyboard-focus indication borders.

Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review!

=============== Diff against Morphic-mt.1710 ===============

Item was changed:
  ----- Method: Morph>>keyboardFocusWidth (in category 'drawing') -----
  keyboardFocusWidth
 
+ ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded!
- ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]!

Item was changed:
  ----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') -----
  drawOn: aCanvas
  "Draw this morph only if it has no target."
 
  (Preferences showBoundsInHalo and: [self target isWorldMorph not])
  ifTrue: [
  aCanvas
  frameAndFillRectangle: self bounds
  fillColor: Color transparent
+ borderWidth: (2 * RealEstateAgent scaleFactor) rounded
- borderWidth: 2
  borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]!

Item was changed:
  ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
 
  Preferences menuAppearance3d
  ifFalse: [self hasDropShadow: false]
  ifTrue: [
  self addDropShadow.
  self hasDropShadow: self isKeyWindow. "maybe turn off again"].
 
+ self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded.
- self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).
  label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-ct.1714.mcz

marcel.taeumel
In Vivide, I added #scaleValueToDisplay on Integer and Point besides the already existing #scaleIconToDisplay on Form. Tobias (topa) suggested a different approach for DPI-awareness, that is, #screenScaled and #screenUnscaled -- which I did not fully understand yet.

Best,
Marcel

Am 11.11.2020 18:33:54 schrieb [hidden email] <[hidden email]>:

A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1714.mcz

==================== Summary ====================

Name: Morphic-ct.1714
Author: ct
Time: 11 November 2020, 6:33:33.254952 pm
UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309
Ancestors: Morphic-mt.1710

Honor hi-dpi settings for halo, window, and keyboard-focus indication borders.

Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review!

=============== Diff against Morphic-mt.1710 ===============

Item was changed:
----- Method: Morph>>keyboardFocusWidth (in category 'drawing') -----
keyboardFocusWidth

+ ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded!
- ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]!

Item was changed:
----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') -----
drawOn: aCanvas
"Draw this morph only if it has no target."

(Preferences showBoundsInHalo and: [self target isWorldMorph not])
ifTrue: [
aCanvas
frameAndFillRectangle: self bounds
fillColor: Color transparent
+ borderWidth: (2 * RealEstateAgent scaleFactor) rounded
- borderWidth: 2
borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]!

Item was changed:
----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') -----
setDefaultParameters

Preferences menuAppearance3d
ifFalse: [self hasDropShadow: false]
ifTrue: [
self addDropShadow.
self hasDropShadow: self isKeyWindow. "maybe turn off again"].

+ self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded.
- self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).
label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-ct.1714.mcz

marcel.taeumel
Well, I think that #screenUnscaled is a more elegant solution for the things happening in UserInterfaceTheme >> #fixFontsAndScaleAound: :-)

Best,
Marcel

Am 12.11.2020 09:36:24 schrieb Marcel Taeumel <[hidden email]>:

In Vivide, I added #scaleValueToDisplay on Integer and Point besides the already existing #scaleIconToDisplay on Form. Tobias (topa) suggested a different approach for DPI-awareness, that is, #screenScaled and #screenUnscaled -- which I did not fully understand yet.

Best,
Marcel

Am 11.11.2020 18:33:54 schrieb [hidden email] <[hidden email]>:

A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1714.mcz

==================== Summary ====================

Name: Morphic-ct.1714
Author: ct
Time: 11 November 2020, 6:33:33.254952 pm
UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309
Ancestors: Morphic-mt.1710

Honor hi-dpi settings for halo, window, and keyboard-focus indication borders.

Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review!

=============== Diff against Morphic-mt.1710 ===============

Item was changed:
----- Method: Morph>>keyboardFocusWidth (in category 'drawing') -----
keyboardFocusWidth

+ ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded!
- ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]!

Item was changed:
----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') -----
drawOn: aCanvas
"Draw this morph only if it has no target."

(Preferences showBoundsInHalo and: [self target isWorldMorph not])
ifTrue: [
aCanvas
frameAndFillRectangle: self bounds
fillColor: Color transparent
+ borderWidth: (2 * RealEstateAgent scaleFactor) rounded
- borderWidth: 2
borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]!

Item was changed:
----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') -----
setDefaultParameters

Preferences menuAppearance3d
ifFalse: [self hasDropShadow: false]
ifTrue: [
self addDropShadow.
self hasDropShadow: self isKeyWindow. "maybe turn off again"].

+ self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded.
- self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).
label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-ct.1714.mcz

Christoph Thiede

Hm, #screenScaled etc. could improve the readability a bit, but they do not answer the question of which layers one should touch to configure dpi-sensitivity. Conceptionally, I would expect this to happen in the Canvas/drawing and the event-handling parts only, but unfortunately, Morphic and Point/Rectangle do not support sub-pixels for whatever reason ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 12. November 2020 09:40:47
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1714.mcz
 
Well, I think that #screenUnscaled is a more elegant solution for the things happening in UserInterfaceTheme >> #fixFontsAndScaleAound: :-)

Best,
Marcel

Am 12.11.2020 09:36:24 schrieb Marcel Taeumel <[hidden email]>:

In Vivide, I added #scaleValueToDisplay on Integer and Point besides the already existing #scaleIconToDisplay on Form. Tobias (topa) suggested a different approach for DPI-awareness, that is, #screenScaled and #screenUnscaled -- which I did not fully understand yet.

Best,
Marcel

Am 11.11.2020 18:33:54 schrieb [hidden email] <[hidden email]>:

A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1714.mcz

==================== Summary ====================

Name: Morphic-ct.1714
Author: ct
Time: 11 November 2020, 6:33:33.254952 pm
UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309
Ancestors: Morphic-mt.1710

Honor hi-dpi settings for halo, window, and keyboard-focus indication borders.

Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review!

=============== Diff against Morphic-mt.1710 ===============

Item was changed:
----- Method: Morph>>keyboardFocusWidth (in category 'drawing') -----
keyboardFocusWidth

+ ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded!
- ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]!

Item was changed:
----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') -----
drawOn: aCanvas
"Draw this morph only if it has no target."

(Preferences showBoundsInHalo and: [self target isWorldMorph not])
ifTrue: [
aCanvas
frameAndFillRectangle: self bounds
fillColor: Color transparent
+ borderWidth: (2 * RealEstateAgent scaleFactor) rounded
- borderWidth: 2
borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]!

Item was changed:
----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') -----
setDefaultParameters

Preferences menuAppearance3d
ifFalse: [self hasDropShadow: false]
ifTrue: [
self addDropShadow.
self hasDropShadow: self isKeyWindow. "maybe turn off again"].

+ self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded.
- self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).
label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).!




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-ct.1714.mcz

marcel.taeumel
Note that I did not touch #borderWidth because it would bump to "2" far too quickly. We would need 1.5 but our rendering system does not allow that. :-)

unfortunately, Morphic and Point/Rectangle do not support sub-pixels for whatever reason ...

Because the current rendering system does not support it.

Best,
Marcel

Am 16.11.2020 16:26:17 schrieb Thiede, Christoph <[hidden email]>:

Hm, #screenScaled etc. could improve the readability a bit, but they do not answer the question of which layers one should touch to configure dpi-sensitivity. Conceptionally, I would expect this to happen in the Canvas/drawing and the event-handling parts only, but unfortunately, Morphic and Point/Rectangle do not support sub-pixels for whatever reason ...


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 12. November 2020 09:40:47
An: squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1714.mcz
 
Well, I think that #screenUnscaled is a more elegant solution for the things happening in UserInterfaceTheme >> #fixFontsAndScaleAound: :-)

Best,
Marcel

Am 12.11.2020 09:36:24 schrieb Marcel Taeumel <[hidden email]>:

In Vivide, I added #scaleValueToDisplay on Integer and Point besides the already existing #scaleIconToDisplay on Form. Tobias (topa) suggested a different approach for DPI-awareness, that is, #screenScaled and #screenUnscaled -- which I did not fully understand yet.

Best,
Marcel

Am 11.11.2020 18:33:54 schrieb [hidden email] <[hidden email]>:

A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1714.mcz

==================== Summary ====================

Name: Morphic-ct.1714
Author: ct
Time: 11 November 2020, 6:33:33.254952 pm
UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309
Ancestors: Morphic-mt.1710

Honor hi-dpi settings for halo, window, and keyboard-focus indication borders.

Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review!

=============== Diff against Morphic-mt.1710 ===============

Item was changed:
----- Method: Morph>>keyboardFocusWidth (in category 'drawing') -----
keyboardFocusWidth

+ ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded!
- ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]!

Item was changed:
----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') -----
drawOn: aCanvas
"Draw this morph only if it has no target."

(Preferences showBoundsInHalo and: [self target isWorldMorph not])
ifTrue: [
aCanvas
frameAndFillRectangle: self bounds
fillColor: Color transparent
+ borderWidth: (2 * RealEstateAgent scaleFactor) rounded
- borderWidth: 2
borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]!

Item was changed:
----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') -----
setDefaultParameters

Preferences menuAppearance3d
ifFalse: [self hasDropShadow: false]
ifTrue: [
self addDropShadow.
self hasDropShadow: self isKeyWindow. "maybe turn off again"].

+ self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded.
- self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]).
label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).!