lmi
[Top][All Lists]
Advanced

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

Re: [lmi] 'wine' anomalies


From: Vadim Zeitlin
Subject: Re: [lmi] 'wine' anomalies
Date: Wed, 15 Nov 2017 22:30:36 +0100

On Tue, 14 Nov 2017 16:13:12 +0000 Greg Chicares <address@hidden> wrote:

GC> Vadim--Off the list, on Thu, 19 Oct 2017 15:52:52 +0000, I wrote to you
GC> about this 'wine' anomaly:
GC> 
GC> | - wxSpinCtrl text is right-aligned in an area that includes the
GC> |    up and down arrows: in the screenshot, e.g., "Retirement Age"
GC> |    is "65", but the "5" is mostly obscured (would it be weird to
GC> |    force the "wxALIGN_LEFT" style upon end users?)
GC> 
GC> (you thought that was either a 'wine' or a DPI defect).

 Hello and sorry for the delay with replying, I had some troubles because
apparently I forgot to rebuild something when trying to test it yesterday
and so I was getting mysterious crashes that went away after I rebuilt
everything from scratch -- but not before wasting quite some time :-(

 Anyhow, I'd just like to confirm that I do see the problem with wxSpinCtrl
here too, running it under Wine 2.0-3 with 200 DPI. And it really looks
like a Wine bug because I also see it in the widgets wx sample and even at
DPI 96, while the same binary works fine in a VM with DPI 200.

 So what to do about this? The first thing I'd do would probably be to try
with a more recent Wine version, Debian Buster (current "testing") has 2.20
which is not quite the latest 2.21, but is much closer, so it's worth
trying it in case something has already changed as it won't cost much. If
the bug is still there, we could try to fix it in Wine which would, of
course, be ideal in the long term, but might be not simple (I've never
tried fixing bugs in Wine before) and won't get into a Debian version of
Wine for quite some time, or we could try to work around it somehow in
wxMSW itself.

 FWIW I also see the 2 other bugs, with black-and-white disabled bitmaps
and long date problem, but I don't have the fixes for them neither, yet.
I'll try to return to these issues soon.


[...]
GC> I have a new observation to add:
GC> 
GC> In lmi's tabbed input dialog, <help> text seems to be inaccessible.
GC> IIRC, in native msw there's a '?' button in the dialog's title bar
GC> that's used to access this context-sensitive help. With 'wine', I
GC> see three buttons there: [...] but no '?' button.

 It looks like you use the default (checked) value of the "Allow the window
manager to decorate the windows" option in the "Graphics" tab of winecfg
(see https://wiki.winehq.org/Winecfg). With this option, Wine doesn't draw
the window title bars at all, so it's not surprising that it uses standard
XFCE buttons and doesn't have the "?" one.
 
 Unfortunately, even after clearing this option -- and seeing suitably ugly
MSW title bar in the main window now -- I still don't see the "?" button,
so apparently it's just something that's not implemented by Wine. And
searching for WS_EX_CONTEXTHELP in Wine sources seems to confirm it, there
just doesn't seem to be any code for handling it anywhere (although it
could be hidden in some macros, of course...).

 I'll recheck this when/if I update to 2.20 to test the other bug, but I
don't see anything about this being recently implemented in the change log,
so I don't think it's going to change anything and, again, the best we can
do is probably just open a Wine bug for this and hope that it gets
addressed, because I don't think we really want to spend time on working on
Wine ourselves (not that I wouldn't want to help another open source
project, but there is simply not enough time for everything...), especially
on a relatively unimportant bug like this.

GC> BTW, the icon on this dialog is a wine bottle, whereas other lmi
GC> windows have lmi icons.

 Well, at least I can fix this one:
---------------------------------- >8 --------------------------------------
diff --git a/mvc_controller.cpp b/mvc_controller.cpp
index 59b83e27f..575d29381 100644
--- a/mvc_controller.cpp
+++ b/mvc_controller.cpp
@@ -28,6 +28,7 @@
 #include "assert_lmi.hpp"
 #include "calendar_date.hpp"
 #include "contains.hpp"
+#include "data_directory.hpp"
 #include "global_settings.hpp"
 #include "map_lookup.hpp"
 #include "mc_enum.hpp"
@@ -44,6 +45,7 @@
 #include <wx/checkbox.h>
 #include <wx/ctrlsub.h>
 #include <wx/datectrl.h>
+#include <wx/iconbndl.h>
 #include <wx/radiobox.h>
 #include <wx/spinctrl.h>
 #include <wx/textctrl.h>
@@ -111,6 +113,8 @@ MvcController::MvcController
         alarum() << "Unable to load dialog." << LMI_FLUSH;
         }

+    SetIcons(wxIconBundle(AddDataDir("lmi.ico"), wxBITMAP_TYPE_ICO));
+
     
BookControl().ChangeSelection(last_selected_page[view_.ResourceFileName()]);

     // This assignment must follow the call to LoadDialog().
---------------------------------- >8 --------------------------------------

I'm pretty sure it shouldn't be _necessary_ to set the icon explicitly like
this because the dialog is supposed to inherit the icon from its parent
frame, but it probably doesn't hurt to do it neither. Perhaps we could even
do it in wxMSW itself...

GC> The <help> text isn't accessible by right-clicking or hovering
GC> the mouse, either; I don't recall whether either of those methods
GC> showed <help> in native msw.

 No, it was never accessible by hovering (this just shows "normal"
tooltips, which are different from the context help tooltips) and while I
think that it was indeed possible to show popup menu with "Show help" item
by right clicking on the control, it must have been in some ancient MSW
version (if ever at all). So without the "?" title bar button there is
indeed no way to show it.

 At wxWidgets level, there is wxContextHelpButton which can be used instead
of this button on non-MSW platforms and, in principle, we could use it in
the dialog itself and show it only when running under Wine. But I don't
know if it's really worth the effort, so I won't do this unless you tell me
that it is.

 Thanks,
VZ


reply via email to

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