[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Wrong wxFlexGridSizer usage in about_dialog.cpp
From: |
Greg Chicares |
Subject: |
Re: [lmi] Wrong wxFlexGridSizer usage in about_dialog.cpp |
Date: |
Fri, 17 Apr 2015 23:43:32 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 |
On 2015-04-16 11:53, Vadim Zeitlin wrote:
> On Thu, 16 Apr 2015 04:08:22 +0000 Greg Chicares <address@hidden> wrote:
>
> GC> In revision 4745 I introduced a magic constant with value 450:
> GC>
> http://svn.savannah.nongnu.org/viewvc/lmi/trunk/about_dialog.cpp?root=lmi&r1=4744&r2=4745
> GC> I'm not sure where that value came from, but it looks awful at 192 DPI.
[...snip...]
> Another fix, which would IMHO be slightly preferable, would be to avoid
> hard coding 450 at all and express the desired width in terms of the width
> of characters used in the window. This would take both the font size and
> DPI into account and also just seems to make more sense: it's more natural
> to say that the window should be ~N characters wide rather than M pixels.
>
> I'm not sure how wide exactly should the window be, but in my testing
> using "65*html_window->GetCharWidth()" seems to look well. Here is the full
> trivial patch:
Committed 20150417T2338Z, revision 6176.
> BTW, the same problem -- with hard coding pixel values -- also applies to
> e.g. "3" used for the borders in the same AboutDialog. It's less severe, of
> course, as nobody cares about the exact border values anyhow, but would be
> even simpler to fix, especially with my (still...) upcoming patches for
> DPI-independent borders in wxSizer in wxWidgets, please let me know if
> you'd like me to make a patch fixing this code.
Yes, but could we wait a few months before doing that, as other priorities
are pulling me away?