From: nljlistbox2@gmail.com (N. Jackson)
To: 20182@debbugs.gnu.org
Subject: bug#20182: 24.4.91; [GTK3] Vertical scroll bar is "indented" from right edge of frame
Date: Tue, 24 Mar 2015 18:06:14 -0300 [thread overview]
Message-ID: <87vbhqm7g9.fsf@moondust.localdomain> (raw)
In-Reply-To: <87619qnn8s.fsf@moondust.localdomain> (N. Jackson's message of "Tue, 24 Mar 2015 17:39:47 -0300")
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@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.
next prev parent reply other threads:[~2015-03-24 21:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 18:58 bug#20182: 24.4.91; [GTK3] Vertical scroll bar is "indented" from right edge of frame N. Jackson
2015-03-23 19:54 ` martin rudalics
2015-03-23 21:26 ` N. Jackson
2015-03-23 21:48 ` martin rudalics
2015-03-24 6:02 ` Jan D.
2015-03-24 10:51 ` martin rudalics
2015-03-24 16:16 ` Jan D.
2015-03-24 20:39 ` N. Jackson
2015-03-24 21:06 ` N. Jackson [this message]
2015-03-24 21:38 ` Jan D.
2015-03-24 23:20 ` N. Jackson
2015-03-25 6:05 ` Jan D.
2015-03-25 10:25 ` martin rudalics
2015-07-06 11:08 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vbhqm7g9.fsf@moondust.localdomain \
--to=nljlistbox2@gmail.com \
--cc=20182@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).