From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69942: 30.0.50; Fontification of radio-button widget labels Date: Mon, 01 Apr 2024 17:21:27 +0200 Message-ID: <871q7pw1l4.fsf@gmx.net> References: <87frwinw9c.fsf@rub.de> <864jcy1dt3.fsf@gnu.org> <259fef2b-e0bf-46c4-8b42-5e26f906accb@gmail.com> <87v85bqxfv.fsf@gmx.net> <87msqnqh2z.fsf@gmx.net> Reply-To: Stephen Berman Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28538"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69942@debbugs.gnu.org, Eli Zaretskii To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 01 17:22:18 2024 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 1rrJUH-0007FR-0v for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Apr 2024 17:22:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrJU4-0000Or-W6; Mon, 01 Apr 2024 11:22:05 -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 1rrJTz-0000OG-41 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 11:21:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrJTy-00021y-Ra for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 11:21:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrJU1-0003iC-Vs for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 11:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Apr 2024 15:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69942 X-GNU-PR-Package: emacs Original-Received: via spool by 69942-submit@debbugs.gnu.org id=B69942.171198490414232 (code B ref 69942); Mon, 01 Apr 2024 15:22:01 +0000 Original-Received: (at 69942) by debbugs.gnu.org; 1 Apr 2024 15:21:44 +0000 Original-Received: from localhost ([127.0.0.1]:51379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrJTg-0003hP-3A for submit@debbugs.gnu.org; Mon, 01 Apr 2024 11:21:44 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:50735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrJTd-0003hC-Gh for 69942@debbugs.gnu.org; Mon, 01 Apr 2024 11:21:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1711984888; x=1712589688; i=stephen.berman@gmx.net; bh=YQlx6Uf8V985W36uVojYmLlLeLEza7DgVfv36gaWsGs=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=TTH1b9c/+BZMqAE4mAdUJiRmwdVFaKzXCwPiuXktLnYjWswrgMhTmYzTF1dZbwHe ggXImVcTqf47Mxq+C+TQFEv5BDjBfqFdAADUfZzsKZNRNowuFoPqQnEQpY6lq0RFa XK2Yx/oozlM0ywmgP4Ps13V7RaA+ZeMTqfzmgw3Ahpxsyuj6fXyhH1vqzOrrZH36Q 9jFOrPAcGhQwNBv98EhfvBmGPt0I99Kbl7R9Ef+rg4RbljoQqEh14IC/qV+w2sluQ WK65oM+htcpi5GHcGMUdaYv18+tyeHVK3Fkx/e8NK9sPdews1d/mG5+TWSjumkKpi 3TokSOIz81kiMFLtCQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([94.134.95.171]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MwfWa-1sjXus0TQQ-00yBsb; Mon, 01 Apr 2024 17:21:28 +0200 In-Reply-To: <87msqnqh2z.fsf@gmx.net> (Stephen Berman's message of "Mon, 25 Mar 2024 01:40:36 +0100") X-Provags-ID: V03:K1:GAmG68+TLFrqMLWP7sLV2CPGSJdGQuB2y0VHiVGY4w66P1jR/Dw OK934scmRbsU8BFW4uXWc1sReeg3cKmoTdqeDtWiDIPnapb0dhixJfMUTw5px6HsHcEAp7c FT9MJlzhayKRlgQMNq2IO0gMRaoOiCUwcbj5u2XXz4aRW+cGlaXHF2FAMYae57uO9bbPuF4 wfIyS6dd/jSRRl8FHNN4w== UI-OutboundReport: notjunk:1;M01:P0:aQP52Tb9sGg=;TJ3TeRgyeUdBIDPjlvozHnltpB5 k6hZIRhTso9fP93P0C07iWZrCbtTotX8W8fGwkyjlzM7SjWFPUh2FByRSMYVwXoYw3sNltYp5 k8tC9aMqlc+F0vmJePAmrPgSKL6KBCksrSME46KqzgB6SINGTPhw+/o4kU8OcXmJvYvhHgMfq SdQc8xGOBDp9qAI4wiW1GAyqg4X17Z1tou/qMZp9kk63+Yd2Tn+jg//BzIJ60r/j0ZNUuuVzy nI1wkdrYo2Q+IuNiJQO4NKt3HQQCUbiAq79bRsqMF/DFKdVLmy4wEW2nIRkDCComUCsMTuVIm /VREp3nSgWSUq0o82rlg/ROmKvBpIcXmFa0C6+SWRC+bVps1Kw0cI2FNeAdaMIMtUfid6KNHr rbD3hqpyyPkpZfn9kw9Zzno0EoG6u4S9AVjsrluc7ATWmBLDNWOHyMdlkHNHtd71OCALKihMg JYAKfJR5wRT1V38w/Ovo/FhZ8yAIvb3x7CoIGxH8PpEd+//S6+jL5mi4JvJg5z8QFc+OBiC91 NQDkX58mrtK2tgG42ikda6nPSCl7v4znydkZF//ZxMwpxnSwMm+GQtnWhFRkFPnfcooECiYJX C9YNSPCAnWytdQ06+Tw74IxjSYRqbFcVD5x2OJuFDqwjkkH4pbY6sCR+rASWnhaoTTXVAEyQh ObkjNwDhyvzMjMVTc3niqQv2uf87Op6Hv/UAcJh1R39ln7ivJv65DC69HpdVAVfe8aHeFfdip dzBib/OR26BNGtyv6zrr2ea0+JGNzJgpFFyzk0bZdh0E1D3t1LN2Jkel8CGRTa8D5VLPPJ7N 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:282480 Archived-At: On Mon, 25 Mar 2024 01:40:36 +0100 Stephen Berman = wrote: > On Sun, 24 Mar 2024 19:47:16 +0100 Stephen Berman wrote: > >> On Sat, 23 Mar 2024 18:05:30 -0300 Mauro Aranda = wrote: >> >>> Stephen Berman writes: >>> >>>> In bug#69941 I reported a faulty fontification of radio-button widgets >>>> and noted in passing that the labels associated with the radio buttons >>>> also have unexpected faces, namely, the widget-inactive face regardless >>>> of whether the associated radio buttons are inactive or active (except >>>> for the label of a radio button that has been pressed, which has the >>>> default face).=C2=A0 While the faulty fontification discussed in bug#6= 9941 >>>> appears to be a real bug, the widget-inactive face assigned to >>>> radio-button labels is apparently by design -- it was present in the >>>> initial commit of the widget library.=C2=A0 But this seems to me to ha= ve been >>>> a UX mistake, since it effectively ignores the semantics implied by the >>>> name widget-inactive.=C2=A0 I think a less surprising UI would be for = the >>>> labels to be fontified according to the widget's activation state: >>>> default face when the widget is active and widget-inactive face when >>>> it's inactive.=C2=A0 The attached patches provide two possible >>>> implementations of this UI. >>>> >>>> The first patch makes the change unconditionally, treating the current >>>> fontification as a UI/UX bug.=C2=A0 But it may be argued that this asp= ect of >>>> the widget UI should not be unconditionally changed, since it was >>>> apparently a deliberate design choice and there have been (AFAIK) no >>>> complaints about the semantic discrepancy till now.=C2=A0 The lack of >>>> complaint could be because the widget-inactive face inherits the shadow >>>> face, so it is not sharply different from the default face. But if one >>>> uses a very different face (as I did for illustrative purposes in >>>> bug#69941), the inconsistency is very obvious and (IMO) jarring. >>>> Nevertheless, to allow keeping the current fontification, the second >>>> patch conditionalizes the change from the current fontification by mea= ns >>>> of a user option (with the default being the current fontification). >>>> >>>> Is either of these changes acceptable? >>> >>> Thanks for working on this.=C2=A0 What about adding a widget-unselected= face? >>> I think that might be the intention with using the widget-inactive face >>> for unselected radio items. >> >> Yes, I agree that was likely the intention. But I think it's >> superfluous: after all, the distinction between selected (or chosen) and >> unselected items is already clear from the appearance of the radio >> buttons or, with checklist widgets, the check boxes (my patch neglected >> checklists, but it's straightforward to account for them: in >> widget-checklist-add-item the (widget-apply child :deactivate) sexp >> should be wrapped in an (unless widget-radio-face-from-state ...)). >> >> On the other hand, with an unselected face for the labels of the radio >> button or check boxes, if it defaults to inheriting the shadow face for >> unselected items, that corresponds to the current appearance with the >> widget-inactive face, and by setting the widget-unselected face to the >> default face, all labels would appear the same, which is what I want. >> So for me that's an acceptable alternative to my proposed defcustom. I >> tried to implement it, but I'm not very conversant with the workings of >> widget properties and how to apply faces depending on the widget's >> state, and I haven't managed to come up with a working implementation >> yet. I'll keep trying, but you or someone else might be able to do it >> sooner. >> >> (There is another argument, besides superfluousness, against using a >> separate face for unselected items: using multiple check boxes instead >> of a checklist, as e.g. recentf-edit-list does. With these the label of >> each check box is supplied by the :tag property, so it is not touched by >> the current handling in terms of the child widget's activation state. >> I'm not sure if using an unselected face here would be unproblematic or >> not.) > > Ok, I've gotten further with implementing disinguishing by faces > selected (chosen) and unselected radio buttons in radio-button-choice > widgets and check boxes in checklist widgets, see the attached patch. > Initial tests seem ok, but it definitely needs more testing. Any comments on this patch for using a widget-unselected face? I have been detained from further testing this past week, but can now resume. Steve Berman