bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#28605: 26.0.60; Part of leftmost character hidden


From: Robert Pluim
Subject: bug#28605: 26.0.60; Part of leftmost character hidden
Date: Sun, 08 Oct 2017 11:51:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

martin rudalics <rudalics@gmx.at> writes:

>> Lars' HiDPI changes were a huge improvement over what was there
>> before.
>
> Can you tell me what Jan's first stab at scaling did and what Lars' did
> differently?  Or simpler: How do the return values of xg_get_gdk_scale
> and xg_get_scale differ in practice?  Because IIUC that's what these
> changes boil down to in the case we're discussing here.

xg_get_gdk_scale and xg_get_scale differ in that the former only
looked at GDK_SCALE, and the latter queries the widget for its scale
factor, which will work better in environments where the scale factor
is set via the GNOME configuration utility. Lars' changes also apply
that scale in more places, resulting in eg scrollbars being at the
correct position, rather than completely off to the side of the Emacs
frame.

>> I'm talking here only about leaving alone the x_clear_area
>> code, but still changing the width calculation.
>
> You mean the width of the scroll bar as it's drawn by the toolkit?

Yes. Basically:

diff --git a/src/gtkutil.c b/src/gtkutil.c
index 0da7039..78077d7 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3879,7 +3879,7 @@ xg_update_scrollbar_pos (struct frame *f,
       top /= scale;
       left /= scale;
       height /= scale;
-      left -= (scale - 1) * ((width / scale) >> 1);
+      width /= scale;


Robert





reply via email to

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