I am attaching a simple test which creates a dummy modal dialog with three buttons and three texts vertically. I run this example and I memorise how it looks. Now, I go to the Windows' screen preferences and turn on extra large fonts. I run the test again and see that the dialog title font is using the extra large font, but the buttons and static texts are still using the same size of the first run.
I don't understand this at all. I am using sizers and not specifying any font size. So why is the font of the buttons and static texts not using the extra large font? Do I have to do anything special for them to work?
Also, when adding borders to sizers I see the values are pixels. How would I specify a value proportional to a font height? What I want to do is create a UI which is just like a web page. At least in web pages I can use an option to make text bigger/smaller, and web pages using relative sizes grow/shrink as expected, both their texts and spaces around them.
--
Grzegorz Adam Hankiewicz, Jefe de producto de TeraVial
Rastertech España S.A. Tel: +34 918 467 390, ext 18. http://www.rastertech.es/ ghankiewicz@rastertech.es
I am attaching a simple test which creates a dummy modal dialog with three buttons and three texts vertically. I run this example and I memorise how it looks. Now, I go to the Windows' screen preferences and turn on extra large fonts. I run the test again and see that the dialog title font is using the extra large font, but the buttons and static texts are still using the same size of the first run.
Do they change in other apps? IIRC there was something I read about MS not using the large fonts settings for the themed controls. Something about them screwing up the layout of the themed drawing and such.
I don't understand this at all. I am using sizers and not specifying any font size. So why is the font of the buttons and static texts not using the extra large font? Do I have to do anything special for them to work?
Also, when adding borders to sizers I see the values are pixels. How would I specify a value proportional to a font height? What I want to do is create a UI which is just like a web page. At least in web pages I can use an option to make text bigger/smaller, and web pages using relative sizes grow/shrink as expected, both their texts and spaces around them.
You could specify the borders using dialog units. Basically it's a set of functions that convert to/from pixel sizes based on the size of the default font. A dialog unit is something like 1/4 of the height of the font and 1/2 of the average character width. See wxWindow.ConertDialogToPixels, there is also a short-hand version in wxPython as a function: wx.DLG_SZE(window, size)
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I am attaching a simple test which creates a dummy modal dialog with three buttons and three texts vertically. I run this example and I memorise how it looks. Now, I go to the Windows' screen preferences and turn on extra large fonts. I run the test again and see that the dialog title font is using the extra large font, but the buttons and static texts are still using the same size of the first run.
Do they change in other apps? IIRC there was something I read about MS not using the large fonts settings for the themed controls. Something about them screwing up the layout of the themed drawing and such.
Indeed, I hadn't noticed that other standard windows dialog like the
font picker or about boxes don't use the large fonts. This reminded be that I can go to the video card preferences and tell to use a bigger font. Turning this on seems to modify all fonts, so Windows needs a reboot. After that everything is bigger then.
Thanks for the advice on dialog units.
···
--
Grzegorz Adam Hankiewicz, Jefe de producto de TeraVial
Rastertech España S.A. Tel: +34 918 467 390, ext 18. http://www.rastertech.es/ ghankiewicz@rastertech.es