AutoHotkey Community

It is currently May 27th, 2012, 10:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: GUI Font Sizes
PostPosted: April 23rd, 2009, 12:58 am 
Allow a specified control to have a set font size.
Rather than setting the font size for the entire interface.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 23rd, 2009, 2:22 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Do you mean like this?
Code:
Gui, Font, s15
Gui, Add, Text,, Large font
Gui, Font, s9
Gui, Add, Text,, Smaller font
Gui, Show
return
GuiEscape:
GuiClose:
ExitApp
:roll:


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Well
PostPosted: April 24th, 2009, 10:35 pm 
That looks pretty good.
Lol damn, you got me.
Maybe I should stay in ask for help.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2009, 1:02 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
Much easier and straighforward would be if we could do this:
Code:
Gui, Add, Text, s14 fTrebuchetMS cRed, Large font
Gui, Add, Text, s7 tBold fTahoma cBlue, Smaller font


If many such isolated font changes have to be done throught the script without possibility to batch them together (different GUI #, different groups/sections), the number of code lines would diminish, as currently we have to add a Gui, Font after each change to restore to default (see below).

Moreover, such syntax would/should allow overriding a whole section of user-defined font settings, only for the current control:

Code:
Gui, Font, s16 Verdana
Gui, Add, Text, ...
Gui, Add, ...
Gui, Add, Text, s7 tBold fTahoma cBlue, Font-overridden control
Gui, Add, Text, ...  ; would keep the s16 Verdana settings at the top
Gui, Add, ...
Gui, Font   ; would restore font settings to default
...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2009, 4:11 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Using tBold seems to conflict with the use of T for tabstops in Edit controls. Another example is W (font weight), which is already used for width. There may be other cases.

Even if there aren't any other cases, another potential drawback would be the reduction of option letters available for future use.

So at this point, I'm not sure it would be worthwhile.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2009, 8:20 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
Letter e could be used for Weight (or is that one taken too?) As for t in Edit... can a Tab be present in the options section...?

Nevertheless, looks like this parameter section needs some revamping. Maybe double-character prefix for options would be needed.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2009, 8:53 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Although I can see that inline font settings would be useful, the benefit/cost doesn't seem that attractive. Since there are probably dozens of GUI features that seem like a higher priority (e.g. improved control over radio buttons), it might be a long time before inline fonts are supported.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2009, 9:24 pm 
Offline

Joined: March 10th, 2008, 12:55 am
Posts: 1907
Location: Minnesota, USA
could you use full words/abbreviations? or would it not be good idea?
Code:
Gui, Add, Text, fontAriel weight700 size12  cRed, Large font
Gui, Add, Text, ftAriel wt700 sz12  cRed, Large font

_________________
rawr. be very afraid
*poke*
Note: My name is all lowercase for a reason.
"I think Bigfoot is blurry, that's the problem. It's not the photographer's fault, Bigfoot is blurry. So there's a large, out-of-focus monster roaming the countryside."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 3rd, 2009, 9:59 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
Bit by bit, these small improvements sum up to ease the life of the scripter. The workflow would be more dynamic if all options and syntax would be as straight and logical as the environment allows.

Personally I confess I must keep the Help file open at all times when working on scripts because there's always a doubt whether "this" should be "this way" or "the other".

Forgive me, this is already getting too general. But it's always good to take a step back and look at the big picture. And yes, I know there are two points of view that are usually opposite - user's and programmer's - and that many times compromise must be accepted. Hopefully it's always for the best.

Anyway, it's good to have open discussion so good ideas can come out and get implemented.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group