Closed jawatson closed 4 years ago
Hi @jawatson thank you for the fix, unfortunatly it has several problems:
Centre()
was removedGetTextExtent
apparently measure up to the dot '.' of the number, wrongly computing the length.Improvement suggestions:
Sorry to ask you all this, while I have very little time to investigate myself !
I will try this patch as well (Linux, i3) but can't test the scaling as my window manager simply does not support it (xrandr does though).
Looks fine on i3 at 1920x1080 (476mm x 268mm).
Hi @jawatson, I pushed on master a fix that seems to work for both Frequency and Edit Label dialogs, based on your code. Thanks for your contribution !
Hi @jawatson, I pushed on master a fix that seems to work for both Frequency and Edit Label dialogs, based on your code. Thanks for your contribution !
Did you know that if you add a Co-authored-by line to your commit message that Github will detect it and attribute as well. Here is an example: https://github.com/openstack/watcher/commit/aa2a084d220614e0db79b15e669fae2c2b3423b7
Did you know that if you add a Co-authored-by line to your commit message that Github will detect it and attribute as well. Here is an example: openstack/watcher@aa2a084
Thanks for the tip, however it does not seem to work...
Thanks for letting me know - I'm glad that the code was of some use. This is my first time doing anything with wxWidgets but I'm keen to learn more.
The dialog layout uses a sizer to scale the content automatically. The layout wasn't very good using sizers alone as width of the dialog was being set too narrow for the title string. In the event that the initString is too short, the width is set manually to either the [title string width + 35%] or the [content string width +10%], whichever's the greater. If the initString is very long, the sizer defines the width of the box.
This has been tested on Linux (Fedora 32) in both conventional and HiDPI (scale 200%) environments.
This has not been tested in either Windows or Mac environments.