unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46528: 27.1.91; Backport flat-button from emacs28
@ 2021-02-15  7:16 Pedro Andres Aranda Gutierrez
  2021-02-15 15:20 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2021-02-15  7:16 UTC (permalink / raw)
  To: 46528


[-- Attachment #1.1: Type: text/plain, Size: 165 bytes --]

This patch is a backport of he flat-button style from emacs28
-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

[-- Attachment #1.2: Type: text/html, Size: 367 bytes --]

[-- Attachment #2: flat-button.diff --]
[-- Type: text/x-patch, Size: 2840 bytes --]

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index a49f08d..c7fcd10 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2469,15 +2469,16 @@ Face Attributes
 whose top and bottom parts occupy the space of the underlying text,
 thus avoiding any increase in the character height.
 
-The value @var{color} specifies the color to draw with.  The default is
-the foreground color of the face for simple boxes, and the background
-color of the face for 3D boxes.
-
 The value @var{style} specifies whether to draw a 3D box.  If it is
-@code{released-button}, the box looks like a 3D button that is not being
-pressed.  If it is @code{pressed-button}, the box looks like a 3D button
-that is being pressed.  If it is @code{nil} or omitted, a plain 2D box
-is used.
+@code{released-button}, the box looks like a 3D button that is not
+being pressed.  If it is @code{pressed-button}, the box looks like a
+3D button that is being pressed.  If it is @code{nil},
+@code{flat-button} or omitted, a plain 2D box is used.
+
+The value @var{color} specifies the color to draw with.  The default
+is the background color of the face for 3D boxes and
+@code{flat-button}, and the foreground color of the face for other
+boxes.
 @end table
 
 @item :inverse-video
diff --git a/lisp/cus-face.el b/lisp/cus-face.el
index 5a1ffda..53ecd35 100644
--- a/lisp/cus-face.el
+++ b/lisp/cus-face.el
@@ -175,6 +175,7 @@ custom-face-attributes
 		   (choice :tag "Style"
 			   (const :tag "Raised" released-button)
 			   (const :tag "Sunken" pressed-button)
+			   (const :tag "Flat"   flat-button)
 			   (const :tag "None" nil))))
      ;; filter to make value suitable for customize
      (lambda (real-value)
diff --git a/src/xfaces.c b/src/xfaces.c
index 9d4b4ce..fb74007 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3170,7 +3170,8 @@ DEFUN ("internal-set-lisp-face-attribute", Finternal_set_lisp_face_attribute,
 		}
 	      else if (EQ (k, QCstyle))
 		{
-		  if (!EQ (v, Qpressed_button) && !EQ (v, Qreleased_button))
+		  if (!EQ (v, Qpressed_button) && !EQ (v, Qreleased_button)
+		      && !EQ(v, Qflat_button))
 		    break;
 		}
 	      else
@@ -5882,6 +5883,10 @@ realize_gui_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]
 		face->box = FACE_RAISED_BOX;
 	      else if (EQ (value, Qpressed_button))
 		face->box = FACE_SUNKEN_BOX;
+	      else if (EQ (value, Qflat_button)) {
+		face->box = FACE_SIMPLE_BOX;
+		face->box_color = face->background;
+	      }
 	    }
 	}
     }
@@ -6768,6 +6773,7 @@ syms_of_xfaces (void)
   DEFSYM (Qwave, "wave");
   DEFSYM (Qreleased_button, "released-button");
   DEFSYM (Qpressed_button, "pressed-button");
+  DEFSYM (Qflat_button, "flat-button");
   DEFSYM (Qnormal, "normal");
   DEFSYM (Qextra_light, "extra-light");
   DEFSYM (Qlight, "light");

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#46528: 27.1.91; Backport flat-button from emacs28
  2021-02-15  7:16 bug#46528: 27.1.91; Backport flat-button from emacs28 Pedro Andres Aranda Gutierrez
@ 2021-02-15 15:20 ` Eli Zaretskii
       [not found]   ` <CAO48Bk-uxw6J-owp_m=3gpsPgNAgKwjD2453bQ1WjVuXq7KSTQ@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-02-15 15:20 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: 46528

> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> Date: Mon, 15 Feb 2021 08:16:02 +0100
> 
> This patch is a backport of he flat-button style from emacs28

You mean, for the emacs-27 branch?  How serious is the problem, and
how urgent is it to solve it?  my intention was to release Emacs 27.2
_very_ soon.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46528: 27.1.91; Backport flat-button from emacs28
       [not found]   ` <CAO48Bk-uxw6J-owp_m=3gpsPgNAgKwjD2453bQ1WjVuXq7KSTQ@mail.gmail.com>
@ 2021-02-15 17:01     ` Eli Zaretskii
  2021-04-04  0:45       ` Stefan Kangas
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-02-15 17:01 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: 46528

> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> Date: Mon, 15 Feb 2021 16:42:36 +0100
> 
> It could go with 27.3 if you prefer. 

No problem here, but please note that there's no guarantee there will
be Emacs 27.3.  We could decide to release Emacs 28.1 as the next
version.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46528: 27.1.91; Backport flat-button from emacs28
  2021-02-15 17:01     ` Eli Zaretskii
@ 2021-04-04  0:45       ` Stefan Kangas
  2021-04-04  5:06         ` Pedro Andres Aranda Gutierrez
  2021-04-04  7:23         ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Kangas @ 2021-04-04  0:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Pedro Andres Aranda Gutierrez, 46528

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
>> Date: Mon, 15 Feb 2021 16:42:36 +0100
>>
>> It could go with 27.3 if you prefer.
>
> No problem here, but please note that there's no guarantee there will
> be Emacs 27.3.  We could decide to release Emacs 28.1 as the next
> version.

I suppose we could add this to the emacs-27 branch now that Emacs 27.2
is released.

Are there any issues with copyright papers here, or is that all sorted?





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46528: 27.1.91; Backport flat-button from emacs28
  2021-04-04  0:45       ` Stefan Kangas
@ 2021-04-04  5:06         ` Pedro Andres Aranda Gutierrez
  2021-04-04  7:23         ` Eli Zaretskii
  1 sibling, 0 replies; 7+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2021-04-04  5:06 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 46528

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

Hi,

I signed all the FSF papers a couple of months ago.

Best, /PA

On Sun, 4 Apr 2021 at 02:45, Stefan Kangas <stefan@marxist.se> wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> >> Date: Mon, 15 Feb 2021 16:42:36 +0100
> >>
> >> It could go with 27.3 if you prefer.
> >
> > No problem here, but please note that there's no guarantee there will
> > be Emacs 27.3.  We could decide to release Emacs 28.1 as the next
> > version.
>
> I suppose we could add this to the emacs-27 branch now that Emacs 27.2
> is released.
>
> Are there any issues with copyright papers here, or is that all sorted?
>


-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

[-- Attachment #2: Type: text/html, Size: 1498 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46528: 27.1.91; Backport flat-button from emacs28
  2021-04-04  0:45       ` Stefan Kangas
  2021-04-04  5:06         ` Pedro Andres Aranda Gutierrez
@ 2021-04-04  7:23         ` Eli Zaretskii
  2021-04-04  9:05           ` Stefan Kangas
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-04-04  7:23 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: paaguti, 46528

> From: Stefan Kangas <stefan@marxist.se>
> Date: Sat, 3 Apr 2021 19:45:30 -0500
> Cc: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>, 46528@debbugs.gnu.org
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> >> Date: Mon, 15 Feb 2021 16:42:36 +0100
> >>
> >> It could go with 27.3 if you prefer.
> >
> > No problem here, but please note that there's no guarantee there will
> > be Emacs 27.3.  We could decide to release Emacs 28.1 as the next
> > version.
> 
> I suppose we could add this to the emacs-27 branch now that Emacs 27.2
> is released.

Actually, I'd prefer not to, upon further thinking: this is a new
feature, and we don't add features to the release branch.  (I thought
I wrote that already?)

Sorry, I must have paid insufficient attention when I wrote the above
back then.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46528: 27.1.91; Backport flat-button from emacs28
  2021-04-04  7:23         ` Eli Zaretskii
@ 2021-04-04  9:05           ` Stefan Kangas
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Kangas @ 2021-04-04  9:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: paaguti, 46528

tags 46528 wontfix
close 46528
thanks

Eli Zaretskii <eliz@gnu.org> writes:

> Actually, I'd prefer not to, upon further thinking: this is a new
> feature, and we don't add features to the release branch.  (I thought
> I wrote that already?)

OK, I'm therefore closing this as wontfix.

Sorry, Pedro, this will have to wait until Emacs 28.  Let's hope we
won't have to wait too long for it.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-04  9:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15  7:16 bug#46528: 27.1.91; Backport flat-button from emacs28 Pedro Andres Aranda Gutierrez
2021-02-15 15:20 ` Eli Zaretskii
     [not found]   ` <CAO48Bk-uxw6J-owp_m=3gpsPgNAgKwjD2453bQ1WjVuXq7KSTQ@mail.gmail.com>
2021-02-15 17:01     ` Eli Zaretskii
2021-04-04  0:45       ` Stefan Kangas
2021-04-04  5:06         ` Pedro Andres Aranda Gutierrez
2021-04-04  7:23         ` Eli Zaretskii
2021-04-04  9:05           ` Stefan Kangas

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).