The Trunk: System-tfel.924.mcz

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

The Trunk: System-tfel.924.mcz

commits-2
Tim Felgentreff uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tfel.924.mcz

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

Name: System-tfel.924
Author: tfel
Time: 23 January 2017, 9:31:46.987369 am
UUID: bd501831-ebe7-de41-8860-123b9fafdbc3
Ancestors: System-tfel.923

Update the hack around scaling in UserInterfaceTheme, so the label areas of Windows is resized correctly.

=============== Diff against System-tfel.923 ===============

Item was changed:
  ----- Method: UserInterfaceTheme>>fixFontsAndScaleAround: (in category 'private') -----
  fixFontsAndScaleAround: block
  "Due to the current situation with fonts and the real-estate manager, this is a small workaround to support theme switching with largely different font sizes."
 
  lastScaleFactor ifNil: [lastScaleFactor := RealEstateAgent scaleFactor].
 
  "Due to the current font situation, update TextConstants."
  [ ignoreApply := true.
  (self get: #standardSystemFont) ifNotNil: [:font | Preferences setSystemFontTo: font].
  (self get: #standardFixedFont) ifNotNil: [:font | Preferences setFixedFontTo: font].
  ] ensure: [ignoreApply := false].
 
  "Apply theme etc."
  block value.
+
-
  "Due to the current real-estate manager situation, resize all windows. Works only for Morphic projects."
+ (RealEstateAgent scaleFactor - lastScaleFactor) abs > 0.1 ifTrue: [
- (RealEstateAgent scaleFactor - lastScaleFactor) abs > 0.5 ifTrue: [
  Project current isMorphic ifTrue: [
  | scale |
  scale := RealEstateAgent scaleFactor / lastScaleFactor.
  Project current world submorphs
  select: [:ea | ea isSystemWindow]
+ thenDo: [:ea |
+ ea extent: (ea extent * scale).
+ ea layoutChanged.
+ ea setFramesForLabelArea]]].
+
- thenDo: [:ea | ea extent: (ea extent * scale)]]].
-
  lastScaleFactor := nil.!