AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: July 20th, 2007, 10:14 am 
Offline

Joined: June 14th, 2005, 10:47 am
Posts: 28
Hello,

I am used to change the font DPI settings of windows display proprties to e.g. 96% (92 dpi) instead of default 100% (96 dpi).
With this change I have the feeling to sit in front of a TFT with a higher resolution - without paying more ;-).

I cannot tell you the way to get to this setting on an english windows; on a german W2K its:
right ckick on dektop -> Eigenschaften (properties) -> Einstellungen (settings ?) -> Erweitert (advanced ?) -> Allgemein (general ?) -> Anzeige (display ?)

Of course it has its disadvantages: In a few applications some messages and other text doesnt fit into their textfields or frames anymore.
(even though I thought it must be the opposite situation, if I decrease font size :?)
Confused)

With the Autohotkey GUI elements its only the Checkbox that has problems (as far as I can see, tested on 2K and XP)
It cannot display its label in one row anymore and breaks the line (unless I apply a W option to every checkbox)

best regards
Copa


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 20th, 2007, 1:58 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
As far as I know, the program already does font metric math in a way that should respect the DPI setting. Since you said it doesn't work for checkboxes, maybe there is some kind of OS bug for them.

Although I don't have the experience or interest to look into this further, I'd welcome the advice of an expert.

Edit: Here's another topic about a similar problem with radio buttons: http://www.autohotkey.com/forum/viewtopic.php?t=21959


Last edited by Chris on August 18th, 2007, 1:02 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 20th, 2007, 5:13 pm 
Offline

Joined: June 14th, 2005, 10:47 am
Posts: 28
Hi Chris, thanks for your answer.
I just want to add some informations for this thread.

I found the sources for this issue in script_gui.cpp, and now I see that it is an old problem (2005):
Code:
         else if (aControlType == GUI_CONTROL_CHECKBOX || aControlType == GUI_CONTROL_RADIO)
         {
            // Both Checkbox and Radio seem to have the same spacing characteristics:
            // Expand to allow room for button itself, its border, and the space between
            // the button and the first character of its label (this space seems to
            // be the same as tmAveCharWidth).  +2 seems to be needed to make it work
            // for the various sizes of Courier New vs. Verdana that I tested.  The
            // alternative, (2 * GetSystemMetrics(SM_CXEDGE)), seems to add a little
            // too much width (namely 4 vs. 2).
            GetTextMetrics(hdc, &tm);
            extra_width += GetSystemMetrics(SM_CXMENUCHECK) + tm.tmAveCharWidth + 2; // v1.0.40.03: Reverted to +2 vs. +3 (it had been changed to +3 in v1.0.40.01).
         }

and the comments in the Changelog:
for v1.0.40.01: Increased the width of auto-sized Checkboxes and Radio Buttons by 1 pixel to prevent wrapping on certain desktop themes.
for v1.0.40.03: Because some other solution is necessary, the 1-pixel increase for Checkboxes and Radio Buttons in v1.0.40.01 has been undone.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 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