From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62707: 30.0.50; [PATCH] Non toolkit scroll bar handle Date: Fri, 07 Apr 2023 09:55:21 +0200 Message-ID: <87pm8gdt3q.fsf@ledu-giraud.fr> References: <87h6tsfavd.fsf@ledu-giraud.fr> <83cz4gp3ps.fsf@gnu.org> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22114"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62707@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 07 09:56:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkgxO-0005ZA-1q for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Apr 2023 09:56:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkgx5-0006MS-Ep; Fri, 07 Apr 2023 03:56:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkgx1-0006KP-2V for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 03:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkgx0-00067Z-Js for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 03:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pkgx0-0000nF-GJ for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 03:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Apr 2023 07:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62707 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62707-submit@debbugs.gnu.org id=B62707.16808541272962 (code B ref 62707); Fri, 07 Apr 2023 07:56:02 +0000 Original-Received: (at 62707) by debbugs.gnu.org; 7 Apr 2023 07:55:27 +0000 Original-Received: from localhost ([127.0.0.1]:55635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkgwQ-0000lg-Nr for submit@debbugs.gnu.org; Fri, 07 Apr 2023 03:55:26 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]:46326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkgwO-0000lC-2u for 62707@debbugs.gnu.org; Fri, 07 Apr 2023 03:55:25 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=bA2y8aiT V/6IWuud6O/qVq+gLKEBJ/QwA56j5kFYvyk=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=fyPuwEVu+JoS1Y12u3Y3TcJb0Sk5fn hWHYcfgtvW9EB5BI580J5bSljgiMWm7hG2+uec0c8//xVhBCpdgqG9BA== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=bA2y8aiTV/6IWuud 6O/qVq+gLKEBJ/QwA56j5kFYvyk=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=0POyoMStaPsg68FqyQqCKJjP956Hi6zaN2QuDR buI5HwAkKUVyKXIXiii6Z1j1h5Drdx2QqNkpR+V899n4EvDxB0uGwa2ghVdqSU/F6c6+d7 xjg1kPpAsMWLuqOFaH6sV0Djgo6EBHp/v2E4Q1bWX1WeLbmX8SRv1ypK74ayhP3CjzHHh3 vMWmq+IVLN0Zma4gGMdSeMYVQzkdUoa06eEGfq83abx+J5rcbzTlnO0EB52NMZ6qQq+xUp MGRWib8dBtistQGZBq14/M8tA98ET1hpxyrARw5bRrMcjmpKKdJQRoecLas7rbRGYQA2Ul 5ej0PTYtuk3ht/fiPujHhE+w== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 954eea9f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 7 Apr 2023 09:55:22 +0200 (CEST) In-Reply-To: <83cz4gp3ps.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 07 Apr 2023 10:10:39 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259369 Archived-At: Eli Zaretskii writes: >> Date: Fri, 07 Apr 2023 08:46:14 +0200 >> From: Manuel Giraud via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> I'd like to fix how the handle of scroll bars in non-toolkit build keeps >> changing size when scrolling a file. > > Fix it in what way? what is wrong with what we have now? When I'm scrolling a file (with 'C-v'/'M-v' for example), the handle of the vertical scroll bar has its height that keeps changing even though the same amount of text is showed (there is no long line breaking involved). I think it is distracting and weird but I may be missing something. >> This first patch does not do this but it just simplify how those >> scroll bar are drawn. > > Please explain the rationale for each part of this change. It isn't > obvious, at least not to me. While I was trying to understand how the scroll bar and its handle are drawn, I read this code where drawing a scroll bar is: 1- Fill the rectangle area above the handle (with background) 2- Fill the rectangle area of the handle (with foreground) 3- Fill the rectangle area below the handle (with background) It seems more "natural" to me to: 1- Fill the entire scroll bar area (with background) 2- Fill the handle area on top of it (with foreground) -- Manuel Giraud