GNU bug report logs -
#20182
24.4.91; [GTK3] Vertical scroll bar is "indented" from right edge of frame
Previous Next
Reported by: nljlistbox2 <at> gmail.com (N. Jackson)
Date: Mon, 23 Mar 2015 19:00:04 UTC
Severity: minor
Found in version 24.4.91
Fixed in version 24.5
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
I forgot to copy Martin on the message below (didn't reply widely
enough I guess). Sorry.
Also, I need to amend one thing I wrote (see below).
At 17:39 -0300 on Tuesday 2015-03-24, N. Jackson wrote:
> At 13:16 -0300 on Tuesday 2015-03-24, Jan D. wrote:
>
>>> 24 mar 2015 kl. 11:51 skrev martin rudalics <rudalics <at> gmx.at>:
>>>
>>> > 16 was the hardcoded width for Gtk2.
>>>
>>> Does that mean gtk_widget_style_get is broken for Gtk2?
>>
>> It means that the width it returns is 16.
>>
>>>
>>> > You can #ifdef it.
>>>
>>> Like
>>>
>>> #if (! GTK_CHECK_VERSION (3, 0, 0)
>>> if (w < 16) w = 16;
>>> #endif
>>>
>>
>> Yes, or
>> #ifndef HAVE_GTK3
>> ...
>>
>> Jan D.
>
> Of course, if gtk_widget_style_get() only returns 16 when the GDK
> version is not GDK3, then this line
>
> if (w < 16) w = 16;
>
> in update_theme_scrollbar_width() of gtkutil.c does nothing when the
> GDK version is not GDK3.
>
> Since we don't need this adjustment with GDK3 (with which
> gtk_widget_style_get() returns the correct value from the toolkit), I
> replaced the offending line with
>
> #ifndef HAVE_GTK3
> /* if (w < 16) w = 16; */
> eassert (w == 16);
> #endif
>
> and this seems to fix the bug for me. (Of course, removing the offending
> line altogether has the same effect.)
It would need to be
eassert (w >= 16);
^
because of the
w += 2*b;
line. [In my opinion it is a terrible idea to have a variable change its
semantics like this in the middle of a function -- it invitably leads to
mistakes.]
> I don't have a GTK2 system to test on, though.
>
> Note: The badness is somehow encoded in my desktop file as well, so to
> see that the fix was working I had to rename my desktop file or run with
> emacs --no-desktop.
This bug report was last modified 9 years and 320 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.