From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix display box cursor under image with margins Date: Sun, 10 May 2020 17:08:50 +0300 Message-ID: References: <83imhwk7sr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000b43d5605a54bc5ef" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="77990"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Stefan Monnier , emacs-devel To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 10 16:10:07 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jXmec-000K8M-Vq for ged-emacs-devel@m.gmane-mx.org; Sun, 10 May 2020 16:10:07 +0200 Original-Received: from localhost ([::1]:32804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXmeb-0007n3-Ht for ged-emacs-devel@m.gmane-mx.org; Sun, 10 May 2020 10:10:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXmdc-0005tx-Tq for emacs-devel@gnu.org; Sun, 10 May 2020 10:09:04 -0400 Original-Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]:37348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXmdb-0000eJ-S9; Sun, 10 May 2020 10:09:04 -0400 Original-Received: by mail-lf1-x12b.google.com with SMTP id 8so2498714lfp.4; Sun, 10 May 2020 07:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W3TAM+e+0CPWx5dnlJReSKUKjiJGlSNUcCdgUdYk2PA=; b=owGRWPRBktLdm4OQcUaJ9Z6STkKBszjbRlQyonBAdQusfPII+ElQQcVmAGtvYp5/Rw wzgTJl206W4wVy9wd1q2qTbE3EDQqfrNTI22C9HAjVDgvonjLvFUPi0sRxfldGWplDca o3NaY+DxJPZoAWiZd+CYXi7JnRNXwO5Uhq2Mj9b5g7qCza7HZ5VMPGxRu9RqUV+zdCz2 77rnqdDIzXD7v8rLFlbVTis6uMGEUDt6fYUY9y+CKjzYP+NWGZiAiF7R3nzaXbMT+438 mNcVhNFrvbJu2ugSYqXsUSwlHwxkVvMTk3n37yBJpBtka1BSAyr9dFmUnxUicFoAS0I7 agVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W3TAM+e+0CPWx5dnlJReSKUKjiJGlSNUcCdgUdYk2PA=; b=SgMROZdr7De/+jBaz8o7cJnZzbOKVuenSqKbfhhtkvYDUKupp7qKgaiXc09cQ+rECT 4x4FT0c8PdUE9RjC5n8W5yyaYKs9hYEkGOJzp0LJ+qUOelunvJweJbaqX10cXD1q5iOh lkmDPbGE0N6+wHKI8NOknw62IKipjXhHIflB0mn/OgxiIA+v4bjQ/Ku4iwRYbU8Mprfv HOzW33mqKVXWbrYY0vzXmGsPWhb3w857pXqhqpgDNGTZTUGsn6n2fTfoq0Sz6Pi0XfMS feNs4U6wt0FiInoGHjIyRIqk54guUUumEPjSV10MeRYqPa9EczQZ/gJCE3h9opK9SLFS LAUQ== X-Gm-Message-State: AOAM533y1ai4tpIhGQ6MIQ1PDoDjCLA0EKCd9gjrcgWz87iyh/DzHVbi s1CC81EBOvbvuTNw3wo0eHBovX+mdX6tmGsbqxg= X-Google-Smtp-Source: ABdhPJzEx14Q8pe4cxgj6L2yMSP1+vqhBnAx89KXN6oeN1rCOnhfIWzDcYKMUogCa4dJm3Y5/YhU6+0Jr7HCq3Ptyhw= X-Received: by 2002:a19:7104:: with SMTP id m4mr4342471lfc.75.1589119741605; Sun, 10 May 2020 07:09:01 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::12b; envelope-from=lg.zevlg@gmail.com; helo=mail-lf1-x12b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:249659 Archived-At: --000000000000b43d5605a54bc5ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D0=B2=D1=81, 10 =D0=BC=D0=B0=D1=8F 2020 =D0=B3. =D0=B2 15:52, Stefan Kanga= s : > Evgeny Zajcev writes: > > > =D1=81=D0=B1, 25 =D0=B0=D0=BF=D1=80. 2020 =D0=B3. =D0=B2 15:09, Stefan = Monnier : > > > >> > Here is first screenshot how hollow cursor looks on image with margi= n > - > >> > http://lgarc.narod.ru/pics/emacs-hollow-cursor.png > >> > > >> > And here is how it looks with patch applied - > >> > http://lgarc.narod.ru/pics/emacs-box-cursor.png > >> > >> Would it be possible to keep the two thin horizontal lines when the > >> window is active? > >> > > I figured out, how to do this in "easy" way. Here is patches update > > > > And screenshots: http://lgarc.narod.ru/pics/emacs-box-margin1.png > > http://lgarc.narod.ru/pics/emacs-box-margin2.png > > I think your second set of screenshots looks better. > On second screeshot, image has vertical margin as (10 . 4) specifies, that is why horizontal lines are not thin On first screenshot, there is only hmargin as (10 . 0) specifies > But the horizontal lines are not thin, right? > > What happens when you switch the active window? Will the cursor change > the size of that line, causing things to move vertically? And what's > the result when you have many images in a buffer, as in image-dired? > No moves, margins are part of the image size displayed in Emacs window. Cursor just uses that margins to fulfill with cursor color In both screenshots below window shows how it looks in inactive window. It looks unchanged from how they look in current Emacs without patch I filmed short video how it looks in dynamic - http://lgarc.narod.ru/pics/IMG_9721.MOV --=20 lg --000000000000b43d5605a54bc5ef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
=D0=B2=D1=81, 10 =D0=BC=D0=B0=D1=8F 2= 020 =D0=B3. =D0=B2 15:52, Stefan Kangas <stefankangas@gmail.com>:
Evgeny Zajcev <lg.zevlg@gmail.com> writes:

> =D1=81=D0=B1, 25 =D0=B0=D0=BF=D1=80. 2020 =D0=B3. =D0=B2 15:09, Stefan= Monnier <= monnier@iro.umontreal.ca>:
>
>> > Here is first screenshot how hollow cursor looks on image wit= h margin -
>> > http://lgarc.narod.ru/pics/emacs-hol= low-cursor.png
>> >
>> > And here is how it looks with patch applied -
>> > http://lgarc.narod.ru/pics/emacs-box-cu= rsor.png
>>
>> Would it be possible to keep the two thin horizontal lines when th= e
>> window is active?
>>
> I figured out, how to do this in "easy" way.=C2=A0 Here is p= atches update
>
> And screenshots: http://lgarc.narod.ru/pics/ema= cs-box-margin1.png
> http://lgarc.narod.ru/pics/emacs-box-margin2.pn= g

I think your second set of screenshots looks better.
<= br>
On second screeshot, image has vertical margin as (10 . 4) sp= ecifies, that is why horizontal lines are not thin

On first screenshot, there is only hmargin as (10 . 0) specifies
=


But the horizontal lines are not thin, right?

What happens when you switch the active window?=C2=A0 Will the cursor chang= e
the size of that line, causing things to move vertically?=C2=A0 And what= 9;s
the result when you have many images in a buffer, as in image-dired?

No moves, margins are part of the image size = displayed in Emacs window.=C2=A0 Cursor just uses that margins to fulfill w= ith cursor color

In both screenshots below win= dow shows how it looks in inactive window.=C2=A0 It looks unchanged from ho= w they look in current Emacs without patch

I film= ed short video how it looks in dynamic - http://lgarc.narod.ru/pics/IMG_9721.MOV
--
lg
--000000000000b43d5605a54bc5ef--