lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [PATCH] Don't hard code explicit wxDatePickerCtrl size


From: Vadim Zeitlin
Subject: Re: [lmi] [PATCH] Don't hard code explicit wxDatePickerCtrl size
Date: Sat, 31 Jan 2015 19:09:04 +0100

On Sat, 31 Jan 2015 17:29:41 +0000 Greg Chicares <address@hidden> wrote:

GC> On 01/29/2015 08:35 PM, Vadim Zeitlin wrote:
GC> > On Thu, 29 Jan 2015 17:48:16 +0000 Greg Chicares <address@hidden> wrote:
GC> > 
GC> > GC> Now I've built lmi natively for gnu/linux, and set my DPI to 192...and
GC> > GC> indeed I see the problem you mentioned. Using 'skin.xrc', on the 
"Inforce"
GC> > GC> tab, numeric fields are only wide enough to display "1234", and date 
fields
GC> > GC> show "01/" and half of a "2".
GC> > 
GC> >  This is without the patch, isn't it?
GC> 
GC> Yes.
GC> 
GC> > Or does it happen even with the patch
GC> > applied?
GC> 
GC> Now I apply this patch:
GC>   http://lists.nongnu.org/archive/html/lmi/2015-01/msg00028.html
GC>   0001-Remove-explicit-sizes-from-wxDatePickerCtrl-in-the-r.patch
GC> and the date controls are wide enough. Actually, as I believe you noted 
earlier,
GC> they're wider than necessary--there's room for an extra '1' on the end:
GC>   01/31/20151

 Hmm, we should be able to get this exactly right in wxGTK as it uses the
generic version, so everything is under our control. OTOH, being slightly
too wide is not that catastrophic, especially as opposed to not being wide
enough.

GC> But I want YYYYMMDD. Let's see...
GC> 
GC> /opt/lmi/build[0]$LC_TIME="en_DK.UTF-8" 
LD_LIBRARY_PATH=/usr/local/lib:/opt/lmi/local/lib ./lmi_wx --ash_nazg
GC> locale::facet::_S_create_c_locale name not valid
GC> 
GC> Hvorfor er det?
GC>   $ls /usr/share/i18n/locales/en_DK
GC>   /usr/share/i18n/locales/en_DK
GC> 
GC> Let's do this:
GC>   /usr/share/i18n/locales[0]#localedef -f UTF-8 -i en_DK en_DK.UTF-8
GC> and retry...no, same error. I guess I'll return to that another day.

 See locale-gen(1) (this is Debian-specific AFAIK). In short, you need to
uncomment the corresponding line in /etc/locale.gen and run this program to
make the locale usable.

GC> Anyway, there are many other issues:
GC>  - Numeric textcontrols on "Inforce" tab (e.g.) are not wide enough.

 This is almost certainly due to hardcoding their width to 80 pixels.

GC>  - Ctrl-Pg{Up|Down} appears not to work for changing tabs, but that's
GC>    because it gets stuck in the "Policy" listbox.
GC>  - Up and down arrows in radioboxes don't change selections--maybe
GC>    that's just a gtk vs msw difference, and of course I can make a
GC>    selection with spacebar.
GC>  - Probably another gtk thing: date control doesn't have up-down
GC>    controls for Y D M like msw.

 This is indeed all wxGTK/GTK+ specific. AFAIK keyboard handling is just
not as well done in GTK+ as under MSW (still much better than in OS X
though...) and so you need to exit the listbox by TAB-bing out of it before
being able to use Ctrl-Pg{Up,Down}.

GC>  - I like the narrow pull-down-arrow button on the date control better
GC>    than the enormous one on comboboxes; is that customizable? As it
GC>    stands, comboboxes for state and country aren't wide enough to show
GC>    any text.

 Hmm, this is probably theme-dependent, I don't have any especially
enormous buttons in the comboboxes. Maybe they are twice larger than
necessary because of the scaling? Then it would be something to fix in
wxGTK... Could you please send me a screenshot privately so that I
understand better what's going on here?

GC>  - Help | About text is as narrow as a newspaper column.
GC>  - Nothing on the "Window" menu works.

 I have no immediate ideas about either of those :-( I could debug them if
you'd like to, of course.

GC> When I close lmi, I see many lines like this:
GC>   16:51:06: Debug: Wrong type returned from the model: string required but 
actual type is long
GC> which I haven't investigated. That's coming from wx, isn't it?

 Yes, but it indicates that something is bad in our code, probably the
illustration view wxDataViewCtrl. This is something that does need to be
fixed, I think.

GC> That didn't seem to work. I installed libgtk-3-{0|bin|dev}, and apt said
GC> they were all already installed; but I reconfigure wx and get the same
GC> result as above:
GC> 
GC> /opt/lmi/wxWidgets/configure --with-gtk3 [...repeated from zsh history]
GC> ...
GC> checking for GTK+ - version >= 2.6.0... yes (version 2.24.10)
GC> ...
GC> Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support 
for GTK+ printing
GC> 
GC> I have the feeling that I'm missing something obvious.

 Are you running configure in the same directory where you had run it for
wxGTK2 build before? If so, it probably cached the GTK+ version and you'd
need to either "rm -rf /opt/lmi/wx-scratch && mkdir $_ && cd $_" or 
"mkdir /opt/lmi/wx-scratch-gtk3 && cd $_" and reconfigure.

 Does it work then?
VZ

reply via email to

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