GNOME Bugzilla – Bug 749123
File->Open thumbnail information label misaligned until dialog window is resized
Last modified: 2015-08-25 21:08:32 UTC
Created attachment 303085 [details] Screenshot exhibiting the problem The label displaying information (like size, dimensions) about a thumbnailed image file appears offset to the right in the File->Open dialog. When I resize the dialog window vertically, the alignment of the label gets corrected temporarily until a different image file is selected. AIUI, the issue stems from these lines at the end of gimp_thumb_box_new(): --- 8< --- /* eek */ gtk_widget_size_request (box->info, &info_requisition); gtk_widget_size_request (box->progress, &progress_requisition); gtk_widget_set_size_request (box->info, -1, info_requisition.height); gtk_widget_set_size_request (box->filename, progress_requisition.width, -1); gtk_widget_set_size_request (box->progress, -1, progress_requisition.height); gtk_progress_bar_set_text (GTK_PROGRESS_BAR (box->progress), ""); --- >8 --- Commenting the lines concerning box->info out will work around the problem, so I suspect that these cause "something" to align the label too early, before everything regarding positioning and dimensions has settled when displaying the dialog window. Resizing the window probably fires off a load of events of which (at least) one causes the label to be realigned. FWIW, this doesn't happen in the gtk3-port branch. I've tried this out under GNOME Shell (a compositing DE) and running under MWM in Xnest.
Yeah, this has haunted me for nearly a decade now up to the point that I gave up :) Even more so since it simply works on GTK+ 3.x and will go away without me doing anything. The /* eek */ code is needed because GtkLabel cannot be told any other way to deal with too much text in a sane way. If you comment it out, the layout works, but don't try to select a file where those strings get huge :) Also, simply clicking the preview box is enough to trigger a correct relayout. It is also not related to windowing system or desktop environment. I would close this bug with a resolution of EEKGOAWAY but sadly that doesn't exist ;)
Let's not talk about this any more... commit 43f187f5c351b0d06031f1774395bd922c3e1857 Author: Michael Natterer <mitch@gimp.org> Date: Tue Aug 25 23:05:25 2015 +0200 Bug 749123 - File->Open thumbnail information label misaligned... ...until dialog window is resized Immediate eye cancer guaranteed when looking at this patch. (cherry picked from commit b5f55ba0cef2a51c26fd6635296f602980b388e8) app/widgets/gimpthumbbox.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)