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: Greg Chicares
Subject: Re: [lmi] [PATCH] Don't hard code explicit wxDatePickerCtrl size
Date: Sat, 31 Jan 2015 17:29:41 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 01/29/2015 08:35 PM, Vadim Zeitlin wrote:
> On Thu, 29 Jan 2015 17:48:16 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> Now I've built lmi natively for gnu/linux, and set my DPI to 192...and
> GC> indeed I see the problem you mentioned. Using 'skin.xrc', on the "Inforce"
> GC> tab, numeric fields are only wide enough to display "1234", and date 
> fields
> GC> show "01/" and half of a "2".
> 
>  This is without the patch, isn't it?

Yes.

> Or does it happen even with the patch
> applied?

Now I apply this patch:
  http://lists.nongnu.org/archive/html/lmi/2015-01/msg00028.html
  0001-Remove-explicit-sizes-from-wxDatePickerCtrl-in-the-r.patch
and the date controls are wide enough. Actually, as I believe you noted earlier,
they're wider than necessary--there's room for an extra '1' on the end:
  01/31/20151

But I want YYYYMMDD. Let's see...

/opt/lmi/build[0]$LC_TIME="en_DK.UTF-8" 
LD_LIBRARY_PATH=/usr/local/lib:/opt/lmi/local/lib ./lmi_wx --ash_nazg
locale::facet::_S_create_c_locale name not valid

Hvorfor er det?
  $ls /usr/share/i18n/locales/en_DK
  /usr/share/i18n/locales/en_DK

Let's do this:
  /usr/share/i18n/locales[0]#localedef -f UTF-8 -i en_DK en_DK.UTF-8
and retry...no, same error. I guess I'll return to that another day.

Anyway, there are many other issues:
 - Numeric textcontrols on "Inforce" tab (e.g.) are not wide enough.
 - Ctrl-Pg{Up|Down} appears not to work for changing tabs, but that's
   because it gets stuck in the "Policy" listbox.
 - Up and down arrows in radioboxes don't change selections--maybe
   that's just a gtk vs msw difference, and of course I can make a
   selection with spacebar.
 - Probably another gtk thing: date control doesn't have up-down
   controls for Y D M like msw.
 - I like the narrow pull-down-arrow button on the date control better
   than the enormous one on comboboxes; is that customizable? As it
   stands, comboboxes for state and country aren't wide enough to show
   any text.
 - Help | About text is as narrow as a newspaper column.
 - Nothing on the "Window" menu works.
...but some of those can be fixed by editing 'skin.xrc', and others
are perhaps just gtk vs msw differences.

When it starts up, I get this messagebox:
  If possible, current directory '/opt/lmi/build/.' will be used for print 
files instead.
  [file /opt/lmi/src/lmi/configurable_settings.cpp, line 175]
Yet:
  /opt/lmi/build[0]$ls -d /opt/lmi/build/.
  /opt/lmi/build/.
Oh, wait--console says:
  Print directory '/opt/lmi/build/C:/opt/lmi/bin' not found.
Okay, this fixes it:
  $sed -i configurable_settings.xml -e's/C://g'

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

> GC> Unfortunately, I can't find a way to rescale it--these environment
> GC> variables seem to have no effect:
> 
>  I'm almost certain that both GDK_SCALE and GDK_DPI_SCALE are only taken
> into account by GTK+ 3, not GTK+ 2 which is still used by wxWidgets by
> default. You could build with the former using --with-gtk=3 wx configure
> option (and you could have this build in parallel with wxGTK2 one), or I
> could test it a bit later if you think it's worth doing.

Let's try:

/opt/lmi/wx-scratch[0]$cd /opt/lmi/wx-scratch
/opt/lmi/wx-scratch[0]$/opt/lmi/wxWidgets/configure --with-gtk3 
--enable-std_string --disable-threads --disable-apple_ieee --without-libjpeg 
--without-libtiff --disable-gif --enable-stl --disable-joystick 
--prefix=/opt/lmi/local >log 2>&1
/opt/lmi/wx-scratch[0]$grep -i gtk log
checking for toolkit... gtk
checking for --without-gtkprint... no
checking for GTK+ version...
checking for GTK+ - version >= 2.6.0... yes (version 2.24.10)
checking if GTK+ is version >= 2.18... yes
checking for GTKPRINT... yes
checking for WEBKIT... configure: WARNING: webkitgtk not found.
config.status: creating lib/wx/config/gtk2-unicode-3.1
config.status: creating lib/wx/config/inplace-gtk2-unicode-3.1
config.status: creating lib/wx/include/gtk2-unicode-3.1/wx/setup.h
config.status: lib/wx/include/gtk2-unicode-3.1/wx/setup.h is unchanged
  Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support 
for GTK+ printing

#apt-get install gtk+-3.0
Oops...I guess I wanted "libgtk-3-0".
Well, it's just 278 MB across a slow dsl line--maybe I'll go have lunch...

That didn't seem to work. I installed libgtk-3-{0|bin|dev}, and apt said
they were all already installed; but I reconfigure wx and get the same
result as above:

/opt/lmi/wxWidgets/configure --with-gtk3 [...repeated from zsh history]
...
checking for GTK+ - version >= 2.6.0... yes (version 2.24.10)
...
Which GUI toolkit should wxWidgets use?                 GTK+ 2 with support for 
GTK+ printing

I have the feeling that I'm missing something obvious.

> GC> The toolbar icons are tiny, but they're the same size as gedit's.
> 
>  I think that this is because you use scaling at xrandr level and not GTK+
> level.

I'm not sure. I've set 192 DPI here:
  xfce Settings | Appearance | Fonts | DPI (with "Custom" checked)

> If it were the latter, the icons would be larger but ugly because
> they would be upscaled. The only solution is to have the icons in both the
> normal (24*24) and double (48*48) sizes, but wxGTK doesn't automatically
> select the correct icon to use depending on the DPI yet, unlike wxOSX, for
> example.

That can all wait for another day. I can say with fair confidence that
everyone using lmi on gnu/linux with custom DPI ignores the toolbar
icons and just uses the keyboard accelerators.




reply via email to

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