From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#28605: 26.0.60; Part of leftmost character hidden Date: Tue, 10 Oct 2017 17:32:50 +0200 Message-ID: <87tvz7m319.fsf@gmail.com> References: <59CE05F2.1010202@gmx.at> <59CE8E74.5010308@gmx.at> <59D35549.6030905@gmx.at> <87wp4c750c.fsf@gmail.com> <59D4A45F.5010606@gmx.at> <87tvzfjfcp.fsf@gmail.com> <59D5E8F6.8080002@gmx.at> <87efqikk0x.fsf@gmail.com> <87a815lq3w.fsf@gmail.com> <59D73C6F.3020907@gmx.at> <87o9pk65ae.fsf@gmail.com> <59D74E49.2000605@gmx.at> <87a8145wcr.fsf@gmail.com> <59DCCA92.8090501@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1507649676 31066 195.159.176.226 (10 Oct 2017 15:34:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 10 Oct 2017 15:34:36 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: Ola Nilsson , Lars Magne Ingebrigtsen , 28605@debbugs.gnu.org, Kaushal To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 10 17:34:25 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1wXz-000605-QV for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Oct 2017 17:34:20 +0200 Original-Received: from localhost ([::1]:35635 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1wY6-0005rB-Nk for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Oct 2017 11:34:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1wXm-0005jK-9F for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2017 11:34:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1wXi-0006A4-AK for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2017 11:34:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52090) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1wXi-00069r-61 for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2017 11:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e1wXh-0000LM-QX for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2017 11:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Oct 2017 15:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28605 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28605-submit@debbugs.gnu.org id=B28605.15076495831246 (code B ref 28605); Tue, 10 Oct 2017 15:34:01 +0000 Original-Received: (at 28605) by debbugs.gnu.org; 10 Oct 2017 15:33:03 +0000 Original-Received: from localhost ([127.0.0.1]:60771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1wWl-0000K2-C4 for submit@debbugs.gnu.org; Tue, 10 Oct 2017 11:33:03 -0400 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:48555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1wWi-0000JW-6O for 28605@debbugs.gnu.org; Tue, 10 Oct 2017 11:33:00 -0400 Original-Received: by mail-wm0-f48.google.com with SMTP id i124so6267957wmf.3 for <28605@debbugs.gnu.org>; Tue, 10 Oct 2017 08:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:user-agent:mime-version; bh=zmJgnCrMusID0jpp97BQ9LrXwXyxekI0MtEpIRuPL9s=; b=tWtJCn4Lmq4amn+ez/Lknv7AunaZqQWdD+WWm1+ohJ526mcMXEzeVwssLubErGuiXo tQAbdRoQWNppqHBDtY9PSJPIjuitADkYhSIa2hJpWagzkPYukB5/gi0XBqfWqNNUmbaV kP7VNPqJNIo9aaoFs7aRCTtXlsNOrNpIX0Q5xVAppJ9Z4L5AaBVEnFis0JGbbtOvloHo OMVWUtmLusd7XOayAHq/RjNcGvuWjplUI3c8B0zViUyjrU7Z67jHpYpKanj/rRhybmPb 8EoUAGyZi0YGYmyikaGOngdjirYTyWRZNnVW6C5eZVEaZvWyoZvlJiU7RRS+ZXuovFOW HgVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version; bh=zmJgnCrMusID0jpp97BQ9LrXwXyxekI0MtEpIRuPL9s=; b=WZe6UOvWU6DqFoihx4wH7/POMJiEXmyF53abLxhiVJRQwFB9Ud8x8lJBz+8+M1714k GH98jMq9cVUBZ+u27MivQXr2KvBxYLfwQ9ikIe4uBr+daYAuSkbLZUaDi3sZnk6YM+1I l3o4AToDHM7Yapi3RSE5VDes9E523VpZbb7T/9nMw2KPSQGNCAt6giMoaYUpJ+ne+JxB QvNpVNsbQ6it+bL0x0+wS8QtVc1Q57miQ7rkQS+NQgD+mIkWSCGPZdkycUDmtzdIOrEh 7rDno8UvtOnVx/zba4lov9/TqJPv1kbXfJFNW/D/Wv0prHadGHHUcOIMA22gbE8/F7rj lVbA== X-Gm-Message-State: AMCzsaVf/0wUoj7jX9LxQjMbSxhsxj0bKOEiOOrICNWDzij0/oMd3z5b GgypKIvJ86K1U4oIF2749FA= X-Google-Smtp-Source: AOwi7QAfOiQOPt2SNvup8kCHkZSktYINsChYK4Qd9PK7qyr0p/HmXu5fCmQ4i4FjgeH0V4YjBs4DhQ== X-Received: by 10.223.176.183 with SMTP id i52mr12113256wra.4.1507649574315; Tue, 10 Oct 2017 08:32:54 -0700 (PDT) Original-Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id 69sm12895482wmp.11.2017.10.10.08.32.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Oct 2017 08:32:52 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <59DCCA92.8090501@gmx.at> (martin rudalics's message of "Tue, 10 Oct 2017 15:26:42 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138185 Archived-At: --=-=-= Content-Type: text/plain martin rudalics 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Adjust-scrollbar-dimensions-when-scaling.patch >From 8efc99515108966cece1667dddb4b1abcc35f19c Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 10 Oct 2017 16:20:50 +0200 Subject: [PATCH] Adjust scrollbar dimensions when scaling 2017-10-10 Robert Pluim * 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 --=-=-=--