The Trunk: Morphic-mt.932.mcz

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

The Trunk: Morphic-mt.932.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.932.mcz

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

Name: Morphic-mt.932
Author: mt
Time: 26 April 2015, 8:13:16.689 pm
UUID: 9f761836-2e52-a44f-b10b-4bee1ada586c
Ancestors: Morphic-mt.931

Just like scroll panes, cache minimum button extent, too. Leads to faster re-layouting.

Note: The three buttons below the class list in the system browser insist to keep their fractions and thus will not shrink as far as the browsers button bar, which as a table layout instead of a proportional layout.

=============== Diff against Morphic-mt.931 ===============

Item was changed:
  ----- Method: PluggableButtonMorph>>font: (in category 'accessing') -----
  font: aFont
 
  font = aFont ifTrue: [^ self].
  font := aFont.
+ self updateMinimumExtent.!
- self extent: self minExtent.!

Item was added:
+ ----- Method: PluggableButtonMorph>>hResizing: (in category 'layout-properties') -----
+ hResizing: aSymbol
+ "We adapt our minimum extent according to our resize behavior."
+
+ self hResizing == aSymbol ifTrue: [^ self].
+ super hResizing: aSymbol.
+ self updateMinimumExtent.!

Item was changed:
  ----- Method: PluggableButtonMorph>>label: (in category 'accessing') -----
  label: aStringOrTextOrMorph
 
  label = aStringOrTextOrMorph ifTrue: [^ self].
  label := aStringOrTextOrMorph isText
  ifTrue: [aStringOrTextOrMorph asMorph]
  ifFalse: [aStringOrTextOrMorph].
 
+ self updateMinimumExtent.!
- self extent: self minExtent.!

Item was removed:
- ----- Method: PluggableButtonMorph>>minHeight (in category 'layout') -----
- minHeight
-
- | vMin |
- self label isMorph
- ifTrue: [^ super minHeight max: self label minHeight].
-
- vMin := 16.
- self vResizing == #shrinkWrap
- ifTrue: [vMin := self font height].
-
- self layoutInset isRectangle
- ifTrue: [vMin := vMin + self layoutInset top + self layoutInset bottom]
- ifFalse: [self layoutInset isPoint
- ifTrue: [vMin := vMin + (2* self layoutInset y)]
- ifFalse: [vMin := vMin + (2* self layoutInset)]].
- ^ super minHeight max: vMin!

Item was removed:
- ----- Method: PluggableButtonMorph>>minWidth (in category 'layout') -----
- minWidth
-
- | hMin |
- self label isMorph
- ifTrue: [^ super minWidth max: self label minWidth].
-
- hMin := 16.
- self hResizing == #shrinkWrap
- ifTrue: [hMin := (self font widthOfString: self label) max: self labelShrinkThreshold].
-
- self layoutInset isRectangle
- ifTrue: [hMin := hMin + self layoutInset left + self layoutInset right]
- ifFalse: [self layoutInset isPoint
- ifTrue: [hMin := hMin + (2* self layoutInset x)]
- ifFalse: [hMin := hMin + (2* self layoutInset)]].
- ^ super minWidth max: hMin!

Item was added:
+ ----- Method: PluggableButtonMorph>>updateMinimumExtent (in category 'layout') -----
+ updateMinimumExtent
+
+ | hMin vMin |
+ self label isMorph
+ ifTrue: [^ self minimumExtent: self label minExtent].
+
+ hMin := vMin := 16.
+ self hResizing == #shrinkWrap
+ ifTrue: [hMin := (self font widthOfString: self label) max: self labelShrinkThreshold].
+ self vResizing == #shrinkWrap
+ ifTrue: [vMin := self font height].
+
+ self layoutInset isRectangle
+ ifTrue: [
+ hMin := hMin + self layoutInset left + self layoutInset right.
+ vMin := vMin + self layoutInset top + self layoutInset bottom]
+ ifFalse: [self layoutInset isPoint
+ ifTrue: [
+ hMin := hMin + (2* self layoutInset x).
+ vMin := vMin + (2* self layoutInset y)]
+ ifFalse: [
+ hMin := hMin + (2* self layoutInset).
+ vMin := vMin + (2* self layoutInset)]].
+
+ self minimumExtent: hMin @ vMin!

Item was added:
+ ----- Method: PluggableButtonMorph>>vResizing: (in category 'layout-properties') -----
+ vResizing: aSymbol
+ "We adapt our minimum extent according to our resize behavior."
+
+ self vResizing == aSymbol ifTrue: [^ self].
+ super vResizing: aSymbol.
+ self updateMinimumExtent.!

Item was changed:
+ (PackageInfo named: 'Morphic') postscript: '"Initialize the key bindings and menus"
- (PackageInfo named: 'Morphic') postscript: '"Update existing scrollbars."
- ScrollPane allSubInstances do: [:sc |
- sc vScrollBarPolicy ifNil: [
- sc vScrollBarPolicy: #whenNeeded.
- (sc hasProperty: #vScrollBarAlways)
- ifTrue: [sc vScrollBarPolicy: #always].
- (sc hasProperty: #noVScrollBarPlease)
- ifTrue: [sc vScrollBarPolicy: #never]].
- sc hScrollBarPolicy ifNil: [
- sc hScrollBarPolicy: #whenNeeded.
- (sc hasProperty: #hScrollBarAlways)
- ifTrue: [sc hScrollBarPolicy: #always].
- (sc hasProperty: #noHScrollBarPlease)
-
- ifTrue: [sc hScrollBarPolicy: #never]].
- sc scrollBarThickness: ScrollPane scrollBarThickness.
-
- sc
- resizeScrollBars;
- resizeScroller;
- hideOrShowScrollBars].
-
- (Preferences dictionaryOfPreferences at: #alternativeWindowBoxesLook) defaultValue: false.
-
- "Initialize the key bindings and menus"
  Editor initialize.
 
  "apply the new icons"
  MenuIcons initializeIcons.
  TheWorldMainDockingBar updateInstances.
 
+ "Update minimum extents."
+ PluggableButtonMorph allSubInstancesDo: [:ea |
+ ea updateMinimumExtent].'!
- "Keyboard focus indication."
- PluggableTextMorph allSubInstances do: [:m |
- m textMorph setProperty: #indicateKeyboardFocus toValue: #never].'!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.932.mcz

Chris Muller-3
On Sun, Apr 26, 2015 at 1:13 PM,  <[hidden email]> wrote:

> Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-mt.932.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-mt.932
> Author: mt
> Time: 26 April 2015, 8:13:16.689 pm
> UUID: 9f761836-2e52-a44f-b10b-4bee1ada586c
> Ancestors: Morphic-mt.931
>
> Just like scroll panes, cache minimum button extent, too. Leads to faster re-layouting.
>
> Note: The three buttons below the class list in the system browser insist to keep their fractions and thus will not shrink as far as the browsers button bar, which as a table layout instead of a proportional layout.

They didn't used to insist.  You did that great work with the buttons
shrinking down to their monogram, may we please have that back?

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.932.mcz

marcel.taeumel (old)