#19053: Static text in bold is truncated on the wizard page (GTK3)
---------------------+-------------------------------
Reporter: Dummy | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone: 3.2.0
Component: wxGTK | Version: 3.1.5
Resolution: | Keywords: wxStaticText GTK3
Blocked By: | Blocking:
Patch: 0 |
---------------------+-------------------------------
Comment (by vadz):
Replying to [comment:4 pcor]:
> My recollection is that style information is not valid unless the window
is shown, so invalidating the best size of a hidden window will at best
have no effect. At worst, it will prevent the proper size from being
calculated later, when the window is actually showing.
Just for the record, "at worst" is how it behaves right now, i.e. this
bug.
> As for a performance problem, I think "layout" only occurs during
resizing.
Unfortunately this isn't true, it seems to occur whenever anything is
redrawn, i.e. hovering over a scrollbar results in a stream of these calls
as can be seen with
{{{
#!diff
diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp
index 91be0c33c3..49fe0396a9 100644
--- a/src/gtk/window.cpp
+++ b/src/gtk/window.cpp
@@ -2315,6 +2315,7 @@ static void unrealize(GtkWidget*, wxWindow* win)
static void frame_clock_layout(GdkFrameClock*, wxWindow* win)
{
+ wxLogDebug("frame_clock_layout() for %s", wxDumpWindow(win));
win->GTKSizeRevalidate();
}
}}}
But you're right, it's probably not that bad if it's just done on refresh
and not all the time as I initially thought (because I did have several
refreshes while debugging, sorry).
However this bug still remains and the only way to fix it that I see is
to:
1. When iterating over the elements of `gs_sizeRevalidateList`, ''move''
the windows with hidden parents into a list of windows to update in this
parent itself. If the window itself is hidden, set some flag in it.
2. When showing the window, check the value of the flag above and
invalidate the window best size if necessary.
3. Also check the list of children that need to be revalidated and do it
and also re-layout the window itself to use the new sizes.
AFAICS this should work, but I could still be missing something here. What
do you think?
--
Ticket URL: <
https://trac.wxwidgets.org/ticket/19053#comment:5>