lmi
[Top][All Lists]
Advanced

[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: Wed, 20 Jan 2010 01:48:18 +0000
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

On 2010-01-18 00:08Z, Greg Chicares wrote:
[snip documentation patch]
> I think we may change the code that it documents. Film at eleven.

These two dialogs:
  Help | About
  Help | About | Read the GNU General Public License
used two different fonts, which clashed horribly. The former dialog's
monospace font seemed less attractive, so I replaced its html 'pre'
tags with 'p' tags in revision 4745 (cf. revision 4735).

In 'about_dialog.cpp', this seems to work correctly at the various
resolutions I tested:

    html_window->GetInternalRepresentation()->Layout(450);
    int const width  = html_window->GetInternalRepresentation()->GetWidth ();
    int const height = html_window->GetInternalRepresentation()->GetHeight();
    html_window->SetMinSize(wxSize(width, height));

Is that reliable though? With the patch below, which gives Layout() a
different 'width' argument, a vertical scrollbar appears and the last
line isn't visible (unless I scroll the dialog) at 800x600 resolution;
at 1600x1200 and 1024x768, no scrollbar appears, but an extra blank
line is shown at the bottom of the html window.

Index: about_dialog.cpp
===================================================================
--- about_dialog.cpp    (revision 4745)
+++ about_dialog.cpp    (working copy)
@@ -70,7 +70,7 @@
         );
     html_window->SetBorders(0);
     html_window->SetPage(license_notices_as_html());
-    html_window->GetInternalRepresentation()->Layout(450);
+    html_window->GetInternalRepresentation()->Layout(600);
     int const width  = html_window->GetInternalRepresentation()->GetWidth ();
     int const height = html_window->GetInternalRepresentation()->GetHeight();
     html_window->SetMinSize(wxSize(width, height));





reply via email to

[Prev in Thread] Current Thread [Next in Thread]