unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Ola Nilsson <ola.nilsson@gmail.com>,
	Lars Magne Ingebrigtsen <larsi@gnus.org>,
	28605@debbugs.gnu.org, Kaushal <kaushal.modi@gmail.com>
Subject: bug#28605: 26.0.60; Part of leftmost character hidden
Date: Tue, 10 Oct 2017 17:32:50 +0200	[thread overview]
Message-ID: <87tvz7m319.fsf@gmail.com> (raw)
In-Reply-To: <59DCCA92.8090501@gmx.at> (martin rudalics's message of "Tue, 10 Oct 2017 15:26:42 +0200")

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Adjust-scrollbar-dimensions-when-scaling.patch --]
[-- Type: text/x-diff, Size: 1383 bytes --]

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	other threads:[~2017-10-10 15:32 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26  9:52 bug#28605: 26.0.60; Part of leftmost character hidden Ola Nilsson
2017-09-27  8:12 ` martin rudalics
2017-09-29  7:45   ` Ola Nilsson
2017-09-29  8:36     ` martin rudalics
2017-09-29 10:46       ` Ola Nilsson
2017-09-29 18:18         ` martin rudalics
2017-10-02  9:18           ` Ola Nilsson
2017-10-03  9:15             ` martin rudalics
2017-10-03  9:28               ` Lars Ingebrigtsen
2017-10-03 12:12               ` Ola Nilsson
2017-10-03 13:08                 ` Robert Pluim
2017-10-03 15:49                   ` Ola Nilsson
2017-10-03 16:58                     ` Ola Nilsson
2017-10-04  6:48                       ` Ola Nilsson
2017-10-04  9:05                         ` martin rudalics
2017-10-04  9:05                     ` martin rudalics
2017-10-04  9:59                       ` Ola Nilsson
2017-10-04 11:56                         ` Robert Pluim
2017-10-05  8:10                           ` martin rudalics
2017-10-05  9:42                             ` Robert Pluim
2017-10-05 12:46                               ` Robert Pluim
2017-10-06  8:18                                 ` martin rudalics
2017-10-06  8:37                                   ` Robert Pluim
2017-10-06  9:35                                     ` martin rudalics
2017-10-06 11:50                                       ` Robert Pluim
2017-10-07  8:08                                         ` martin rudalics
2017-10-07 11:53                                           ` Lars Ingebrigtsen
2017-10-09  8:00                                             ` martin rudalics
2017-10-09  8:25                                               ` Lars Ingebrigtsen
2017-10-09  9:16                                                 ` Robert Pluim
2017-10-09 12:21                                                 ` martin rudalics
2017-10-08  9:51                                           ` Robert Pluim
2017-10-09  8:00                                             ` martin rudalics
2017-10-09  8:26                                               ` Lars Ingebrigtsen
2017-10-09 12:22                                                 ` martin rudalics
2017-10-09 13:37                                                   ` Robert Pluim
2017-10-10  8:13                                                     ` martin rudalics
2017-10-10  8:44                                                       ` Robert Pluim
2017-10-10  9:16                                                         ` martin rudalics
2017-10-10  9:31                                                           ` Eli Zaretskii
2017-10-10  9:54                                                             ` Robert Pluim
2017-10-10 11:11                                                               ` Robert Pluim
2017-10-10 13:26                                                               ` martin rudalics
2017-10-10 14:00                                                                 ` Robert Pluim
2017-10-11  8:32                                                                   ` martin rudalics
2017-10-11  8:37                                                                     ` Robert Pluim
2017-10-09 14:18                                                   ` Lars Ingebrigtsen
2017-10-10  8:14                                                     ` martin rudalics
2017-10-10  8:39                                                       ` Robert Pluim
2017-10-10  9:15                                                         ` martin rudalics
2017-10-10  9:46                                                           ` Robert Pluim
2017-10-10 13:25                                                             ` martin rudalics
2017-10-10  8:54                                                       ` Lars Ingebrigtsen
2017-10-10 13:05                                         ` Ola Nilsson
2017-10-10 13:26                                           ` martin rudalics
2017-10-10 15:32                                             ` Robert Pluim [this message]
2017-12-15 18:16                                               ` martin rudalics
2017-12-18 15:58                                                 ` Robert Pluim
2017-12-19  7:02                                                   ` martin rudalics
2017-12-19  7:56                                                     ` Eli Zaretskii
2017-12-19  8:10                                                       ` Robert Pluim
2017-12-19 16:09                                                         ` Eli Zaretskii
2017-12-20  8:53                                                           ` martin rudalics
2020-09-04  5:05                                                             ` Lars Ingebrigtsen
2017-10-11  6:57                                             ` Ola Nilsson
2017-10-11  8:32                                               ` martin rudalics
2017-10-11  8:49                                                 ` Robert Pluim
2017-10-11  9:28                                                   ` martin rudalics
2017-10-11 10:36                                                     ` Robert Pluim
2017-10-11 13:11                                                 ` Ola Nilsson
2017-10-12  8:04                                                   ` martin rudalics
2017-10-12  9:31                                                     ` Robert Pluim
2017-10-13  8:56                                                       ` martin rudalics
2017-10-13  9:58                                                         ` Robert Pluim
2017-10-13 12:46                                                           ` martin rudalics
2017-10-13 13:01                                                             ` Robert Pluim
2017-10-14  8:36                                                               ` martin rudalics
2017-10-14  8:57                                                                 ` Robert Pluim
2017-10-14  9:21                                                                   ` martin rudalics
2017-10-16 11:41                                                                     ` Robert Pluim
2017-10-17  8:57                                                                       ` martin rudalics
2017-10-17 10:30                                                                         ` Robert Pluim
2017-10-17 13:09                                                                           ` martin rudalics
2017-10-19 12:44                                                                             ` Robert Pluim
2017-10-20  7:55                                                                               ` martin rudalics
2017-10-20 13:41                                                                                 ` Robert Pluim
2017-10-21  8:04                                                                                   ` martin rudalics
2017-10-23 10:01                                                                                     ` Robert Pluim
2017-10-23 11:54                                                                                       ` martin rudalics
2017-10-23 12:12                                                                                         ` Robert Pluim
2017-10-24  9:17                                                                                           ` martin rudalics
2017-10-13 16:18                                                     ` Ola Nilsson
2017-10-14  8:36                                                       ` martin rudalics
2017-10-06  8:18                               ` martin rudalics
2017-10-06  8:52                                 ` Robert Pluim
2017-10-06  9:35                                   ` martin rudalics
2017-10-05 11:57                             ` Ola Nilsson
2017-10-04  9:03                 ` martin rudalics
2017-10-03 15:26               ` Kaushal Modi

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=87tvz7m319.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=28605@debbugs.gnu.org \
    --cc=kaushal.modi@gmail.com \
    --cc=larsi@gnus.org \
    --cc=ola.nilsson@gmail.com \
    --cc=rudalics@gmx.at \
    /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).