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: Tue, 10 Oct 2017 17:32:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux)

martin rudalics <rudalics@gmx.at> writes:

>> I've tested Robert's patch now, and the horizontal scroll bars are
>> painted in the right place.
>
> Thanks.

Good. Git patch below.

>> The area where the scroll bars "meet" is currently blank which looks
>> weird but I'm not sure it's related.
>
> Do you see the same effect with scaling turned off?
>
>> The frame is still resized to have fewer lines each time I turn
>> vertical scroll bars on or off.
>
> Does the frame resizing happen with horizontal scroll bars disabled
> too?

Yes.

> Does it happen without scaling?

No.

Robert

>From 8efc99515108966cece1667dddb4b1abcc35f19c Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Tue, 10 Oct 2017 16:20:50 +0200
Subject: [PATCH] Adjust scrollbar dimensions when scaling

2017-10-10  Robert Pluim  <rpluim@gmail.com>

        * src/gtkutil.c (xg_update_scrollbar_pos): Update width of
        scrollbar when scaling is in effect
        (xg_update_horizontal_scrollbar_pos): Update scrollbar size
        when scaling is in effect.
---
 src/gtkutil.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/gtkutil.c b/src/gtkutil.c
index c7d8f92829..88b7fd7e7b 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3890,7 +3890,7 @@ xg_update_scrollbar_pos (struct frame *f,
       top /= scale;
       left /= scale;
       height /= scale;
-      left -= (scale - 1) * ((width / scale) >> 1);
+      width /= scale;
 
       /* Clear out old position.  */
       int oldx = -1, oldy = -1, oldw, oldh;
@@ -3966,6 +3966,12 @@ xg_update_horizontal_scrollbar_pos (struct frame *f,
       GtkWidget *wfixed = f->output_data.x->edit_widget;
       GtkWidget *wparent = gtk_widget_get_parent (wscroll);
       gint msl;
+      int scale = xg_get_scale (f);
+
+      top /= scale;
+      left /= scale;
+      height /= scale;
+      width /= scale;
 
       /* Clear out old position.  */
       int oldx = -1, oldy = -1, oldw, oldh;
-- 
2.14.2.642.g20fed7cad


reply via email to

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