Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Layout, fonts, MS Windows, and changing DPIs...
Layout, fonts, MS Windows, and changing DPIs... [message #11665] Thu, 20 September 2007 22:59 Go to next message
tvanriper is currently offline  tvanriper
Messages: 85
Registered: September 2007
Location: Germantown, MD, USA
Member
As part of testing, I switched between my preferred DPI (of 96, if it matters) to the 'larger scale' (120 DPI) on my screen, to see how it would impact the project on which I'm working.

I found that the lettering on some of my buttons adjusted, but on some of my other buttons did not. I found that curious, and focused on the issue. I hope this helps.

Environment:

Windows Vista (but I do not think OS matters, as long as it's a Windows machine).

TheIDE 2007.1

Steps to reproduce:

1. Create a new project in TheIDE.
2. Create a .lay file.
3. right-click and 'Add New Layout'.
4. Create two buttons in the new layout, labelled 'OK' and 'Cancel'.
5. Click on the 'OK' button, and select the 'SetFont' choice in the button detail. You should be presented with a 'Font' dialog.
6. Select 'Bold', and click 'OK'.
7. In your main(), create a dialog using this layout, and set it to show when you run the program.
8. Compile, and run the program. Observe the text of the buttons.
9. Adjust your operating system's font size to the other set from what you're currently using. On Vista, you do this by right-clicking on the desktop, selecting 'Personalize', click 'Adjust font size (DPI)'. On XP, right-click on the desktop, select 'Properties', click on the 'Appearance' tab, then change 'Font size' to something else. Save your changes. On Vista, you will be forced to reboot. Remember to thank Microsoft for that.
10. Run your program again, and observe the text of the buttons.

Expected result:

Text remains the same size across both buttons.

Actual results:

Text of the OK button will differ in size (height) from the Cancel button.

Possible solution:

When you selected 'Bold' and saved the font in the font editor, the Layout editor saved your font selection in such a way that it selected the size that was displayed in the Font dialog (e.g. StdFont( 8 ).Bold() instead of StdFont().Bold()). Ideally, the user should explicitly request to change the size if they want to alter the size of the font.
Re: Layout, fonts, MS Windows, and changing DPIs... [message #11670 is a reply to message #11665] Fri, 21 September 2007 00:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, I am afraid I have to say you are right Smile So far, each property is considered a complete value, in this case a complete definition of Font... But in this case, this is obviously contraproductive...

Perhaps we have to use some standard font size in the layout and use something like:

Font(StdFontSize()).Bold()

in .lay file?

Another issue is that in fact, we perhaps should scale even fonts with height according to current default font settings. Which would make it something like

Font(FontZoom(15))

Any logical flaws in this thinking?

Mirek
Re: Layout, fonts, MS Windows, and changing DPIs... [message #12218 is a reply to message #11670] Thu, 18 October 2007 23:43 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Implemented Smile

Mirek
Previous Topic: Compiling U++ Core with -Wall (GCC 4.1.2 Kubuntu 6.10)
Next Topic: A (maybe) bug in GLControl (on Ubuntu)
Goto Forum:
  


Current Time: Fri Apr 19 19:33:16 CEST 2024

Total time taken to generate the page: 0.02567 seconds