The Trunk: System-tfel.923.mcz

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

The Trunk: System-tfel.923.mcz

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

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

Name: System-tfel.923
Author: tfel
Time: 18 January 2017, 10:05:39.926932 am
UUID: d9dcb1e9-52fe-435e-9d88-96f921f9fd20
Ancestors: System-ul.922

add methods to quickly increase/decrease fonts

=============== Diff against System-ul.922 ===============

Item was added:
+ ----- Method: Preferences class>>changeFontSize: (in category 'prefs - fonts') -----
+ changeFontSize: delta
+ | theme base fonts |
+ delta = 0 ifTrue: [self restoreDefaultFonts].
+ (UserInterfaceTheme current name beginsWith: 'Demo')
+ ifFalse: [
+ "Create DEMO version of current theme."
+ theme := UserInterfaceTheme named: 'Demo'.
+ theme merge: UserInterfaceTheme current overwrite: true.
+ theme apply].
+
+ base := (TextStyle defaultFont name beginsWith: 'Darkmap')
+ ifTrue: ['Darkmap DejaVu Sans'] ifFalse: ['Bitmap DejaVu Sans'].
+
+ fonts := {
+ {#SystemFont. base}.
+ {#FixedFont. 'BitstreamVeraSansMono'}.
+ {#ListFont. base}.
+ {#FlapFont. base}.
+ {#EToysFont. base}.
+ {#PaintBoxButtonFont. base}.
+ {#MenuFont. base}.
+ {#WindowTitleFont. base, ' B'}.
+ {#BalloonHelpFont. base}.
+ {#CodeFont. base}.
+ {#ButtonFont. base}.
+ } collect: [:ary || newPtSize |
+ newPtSize := (self perform: ('standard', ary first) asSymbol) pointSize + delta.
+ {('set', ary first, 'To:') asSymbol. ary second. newPtSize}
+ ].
+ self setDefaultFonts: fonts.
+ !

Item was added:
+ ----- Method: Preferences class>>decreaseFontSize (in category 'prefs - fonts') -----
+ decreaseFontSize
+
+ self changeFontSize: -3.
+ !

Item was added:
+ ----- Method: Preferences class>>increaseFontSize (in category 'prefs - fonts') -----
+ increaseFontSize
+
+ self changeFontSize: 3.
+ !

Item was added:
+ ----- Method: Preferences class>>setFlapFontTo: (in category 'prefs - fonts') -----
+ setFlapFontTo: aFont
+
+ UserInterfaceTheme current
+ set: #standardFlapFont
+ to: aFont;
+ apply.
+
+ "FlapTab allSubInstancesDo:
+ [:aFlapTab | aFlapTab reformatTextualTab]"!

Item was added:
+ ----- Method: Preferences class>>standardWindowTitleFont (in category 'prefs - fonts') -----
+ standardWindowTitleFont
+ "Answer the standard font to use for window titles"
+
+ ^ (UserInterfaceTheme current get: #windowTitleFont)
+ ifNil: [TextStyle defaultFont]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-tfel.923.mcz

Chris Muller-3
Thank you, I really like this function to adjust all the fonts at
once.  However, hot keys are *really* scarce, and this function
consumes three of the remaining four with a function that won't
be used on a ad-hoc basis.

In a web browser which displays pages from all different sources
written by different people in different font sizes, yes, the user
will need to adjust font size dynamically, depending on the page being
viewed.  But in the Squeak image, *all* the windows render in the same
uniform font size, so there's no need to do a lot of increasing /
decreasing on a dynamic basis.  I really like this function, but think we
should activate it with + and - buttons on the Font menu or something
like that.  Available hot keys, especially for global operations, are
too scarce for an operation that is so rarely invoked.

Best,
  Chris


On Wed, Jan 18, 2017 at 3:06 AM,  <[hidden email]> wrote:

> Tim Felgentreff uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-tfel.923.mcz
>
> ==================== Summary ====================
>
> Name: System-tfel.923
> Author: tfel
> Time: 18 January 2017, 10:05:39.926932 am
> UUID: d9dcb1e9-52fe-435e-9d88-96f921f9fd20
> Ancestors: System-ul.922
>
> add methods to quickly increase/decrease fonts
>
> =============== Diff against System-ul.922 ===============
>
> Item was added:
> + ----- Method: Preferences class>>changeFontSize: (in category 'prefs - fonts') -----
> + changeFontSize: delta
> +       | theme base fonts |
> +       delta = 0 ifTrue: [self restoreDefaultFonts].
> +       (UserInterfaceTheme current name beginsWith: 'Demo')
> +               ifFalse: [
> +                       "Create DEMO version of current theme."
> +                       theme := UserInterfaceTheme named: 'Demo'.
> +                       theme merge: UserInterfaceTheme current overwrite: true.
> +                       theme apply].
> +
> +       base := (TextStyle defaultFont name beginsWith: 'Darkmap')
> +               ifTrue: ['Darkmap DejaVu Sans'] ifFalse: ['Bitmap DejaVu Sans'].
> +
> +       fonts := {
> +               {#SystemFont. base}.
> +               {#FixedFont. 'BitstreamVeraSansMono'}.
> +               {#ListFont. base}.
> +               {#FlapFont. base}.
> +               {#EToysFont. base}.
> +               {#PaintBoxButtonFont. base}.
> +               {#MenuFont. base}.
> +               {#WindowTitleFont. base, ' B'}.
> +               {#BalloonHelpFont. base}.
> +               {#CodeFont. base}.
> +               {#ButtonFont. base}.
> +       } collect: [:ary || newPtSize |
> +               newPtSize := (self perform: ('standard', ary first) asSymbol) pointSize + delta.
> +               {('set', ary first, 'To:') asSymbol. ary second. newPtSize}
> +       ].
> +       self setDefaultFonts: fonts.
> + !
>
> Item was added:
> + ----- Method: Preferences class>>decreaseFontSize (in category 'prefs - fonts') -----
> + decreaseFontSize
> +
> +       self changeFontSize: -3.
> + !
>
> Item was added:
> + ----- Method: Preferences class>>increaseFontSize (in category 'prefs - fonts') -----
> + increaseFontSize
> +
> +       self changeFontSize: 3.
> + !
>
> Item was added:
> + ----- Method: Preferences class>>setFlapFontTo: (in category 'prefs - fonts') -----
> + setFlapFontTo: aFont
> +
> +       UserInterfaceTheme current
> +               set: #standardFlapFont
> +               to: aFont;
> +               apply.
> +
> +       "FlapTab allSubInstancesDo:
> +               [:aFlapTab | aFlapTab reformatTextualTab]"!
>
> Item was added:
> + ----- Method: Preferences class>>standardWindowTitleFont (in category 'prefs - fonts') -----
> + standardWindowTitleFont
> +       "Answer the standard font to use for window titles"
> +
> +       ^ (UserInterfaceTheme current get: #windowTitleFont)
> +               ifNil: [TextStyle defaultFont]!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-tfel.923.mcz

Chris Muller-3
Certainly, an argument in favor of using these hot-keys is
user-expectations -- they seem pretty common for this function across
multiple apps..   Hmm..

Ability to adjust our hot-keys is another excuse to make #systemSettings...

On Wed, Jan 18, 2017 at 11:37 AM, Chris Muller <[hidden email]> wrote:

> Thank you, I really like this function to adjust all the fonts at
> once.  However, hot keys are *really* scarce, and this function
> consumes three of the remaining four with a function that won't
> be used on a ad-hoc basis.
>
> In a web browser which displays pages from all different sources
> written by different people in different font sizes, yes, the user
> will need to adjust font size dynamically, depending on the page being
> viewed.  But in the Squeak image, *all* the windows render in the same
> uniform font size, so there's no need to do a lot of increasing /
> decreasing on a dynamic basis.  I really like this function, but think we
> should activate it with + and - buttons on the Font menu or something
> like that.  Available hot keys, especially for global operations, are
> too scarce for an operation that is so rarely invoked.
>
> Best,
>   Chris
>
>
> On Wed, Jan 18, 2017 at 3:06 AM,  <[hidden email]> wrote:
>> Tim Felgentreff uploaded a new version of System to project The Trunk:
>> http://source.squeak.org/trunk/System-tfel.923.mcz
>>
>> ==================== Summary ====================
>>
>> Name: System-tfel.923
>> Author: tfel
>> Time: 18 January 2017, 10:05:39.926932 am
>> UUID: d9dcb1e9-52fe-435e-9d88-96f921f9fd20
>> Ancestors: System-ul.922
>>
>> add methods to quickly increase/decrease fonts
>>
>> =============== Diff against System-ul.922 ===============
>>
>> Item was added:
>> + ----- Method: Preferences class>>changeFontSize: (in category 'prefs - fonts') -----
>> + changeFontSize: delta
>> +       | theme base fonts |
>> +       delta = 0 ifTrue: [self restoreDefaultFonts].
>> +       (UserInterfaceTheme current name beginsWith: 'Demo')
>> +               ifFalse: [
>> +                       "Create DEMO version of current theme."
>> +                       theme := UserInterfaceTheme named: 'Demo'.
>> +                       theme merge: UserInterfaceTheme current overwrite: true.
>> +                       theme apply].
>> +
>> +       base := (TextStyle defaultFont name beginsWith: 'Darkmap')
>> +               ifTrue: ['Darkmap DejaVu Sans'] ifFalse: ['Bitmap DejaVu Sans'].
>> +
>> +       fonts := {
>> +               {#SystemFont. base}.
>> +               {#FixedFont. 'BitstreamVeraSansMono'}.
>> +               {#ListFont. base}.
>> +               {#FlapFont. base}.
>> +               {#EToysFont. base}.
>> +               {#PaintBoxButtonFont. base}.
>> +               {#MenuFont. base}.
>> +               {#WindowTitleFont. base, ' B'}.
>> +               {#BalloonHelpFont. base}.
>> +               {#CodeFont. base}.
>> +               {#ButtonFont. base}.
>> +       } collect: [:ary || newPtSize |
>> +               newPtSize := (self perform: ('standard', ary first) asSymbol) pointSize + delta.
>> +               {('set', ary first, 'To:') asSymbol. ary second. newPtSize}
>> +       ].
>> +       self setDefaultFonts: fonts.
>> + !
>>
>> Item was added:
>> + ----- Method: Preferences class>>decreaseFontSize (in category 'prefs - fonts') -----
>> + decreaseFontSize
>> +
>> +       self changeFontSize: -3.
>> + !
>>
>> Item was added:
>> + ----- Method: Preferences class>>increaseFontSize (in category 'prefs - fonts') -----
>> + increaseFontSize
>> +
>> +       self changeFontSize: 3.
>> + !
>>
>> Item was added:
>> + ----- Method: Preferences class>>setFlapFontTo: (in category 'prefs - fonts') -----
>> + setFlapFontTo: aFont
>> +
>> +       UserInterfaceTheme current
>> +               set: #standardFlapFont
>> +               to: aFont;
>> +               apply.
>> +
>> +       "FlapTab allSubInstancesDo:
>> +               [:aFlapTab | aFlapTab reformatTextualTab]"!
>>
>> Item was added:
>> + ----- Method: Preferences class>>standardWindowTitleFont (in category 'prefs - fonts') -----
>> + standardWindowTitleFont
>> +       "Answer the standard font to use for window titles"
>> +
>> +       ^ (UserInterfaceTheme current get: #windowTitleFont)
>> +               ifNil: [TextStyle defaultFont]!
>>
>>