GNU bug report logs - #45735
Adding a flat-button style for boxes

Previous Next

Package: emacs;

Reported by: Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com>

Date: Sat, 9 Jan 2021 08:29:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45735 in the body.
You can then email your comments to 45735 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#45735; Package emacs. (Sat, 09 Jan 2021 08:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 09 Jan 2021 08:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Adding a flat-button style for boxes
Date: Sat, 9 Jan 2021 09:27:59 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

Create a flat-button style for boxes. It is based on the simple button
style but uses the background colour instead of the foreground colour
for the box.
This greatly simplifies the extension of Emacs themes to adapt them to
modern GUIs where the buttons are flat.

As an example, I like the mode-line to be a bit higher than the regular
mode line (à la doom-modeline, but not as big):

;; Definition of the styles without the patch:
;; I need to look up my theme and get the colours from it. For
;; nord-emacs it looks like this
;;
;; '(mode-line ((t (:inherit mode-line :background "#434C5E" :box
(:line-width 4 :color "#434C5E" )))))
;; '(mode-line-inactive ((t (:inherit mode-line-inactive :background
;; "#3B4252" :box (:line-width 4 :color "#3B4252" )))))

;; With the patch, I just need to indicate how many pixels higher (x 2)
;; I want the mode-line to be. I can reuse these settings across themes
;;
'(mode-line ((t (:inherit mode-line :box (:line-width 4 :style
flat-button)))))
'(mode-line-inactive ((t (:inherit mode-line-inactive :box (:line-width 4
:style flat-button )))))



In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
cairo version 1.16.0)
 of 2021-01-09 built on paag-EliteBook
Repository revision: 29c7f8c915c3889dfd5b25878aa0692f826cd38f
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12009000
System Description: Ubuntu 20.04.1 LTS

Configured using:
 'configure --build=x86_64-linux-gnu --prefix=/usr
 '--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
 '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var
 --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu'
 '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode
 --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib
 --program-suffix=28 --with-modules=yes --with-x --with-x-toolkit=gtk3
 --without-xaw3d 'CFLAGS=-g -O2
 -fdebug-prefix-map=/home/paag/Devel/emacs/emacs=. -fstack-protector-strong
 -Wformat -Werror=format-security' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

/Pedro A. Aranda
-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler
[Message part 2 (text/html, inline)]
[flat.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45735; Package emacs. (Sun, 10 Jan 2021 13:12:01 GMT) Full text and rfc822 format available.

Message #8 received at 45735 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com>
Cc: 45735 <at> debbugs.gnu.org
Subject: Re: bug#45735: Adding a flat-button style for boxes
Date: Sun, 10 Jan 2021 14:10:57 +0100
Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com> writes:

> Create a flat-button style for boxes. It is based on the simple button
> style but uses the background colour instead of the foreground colour
> for the box.
> This greatly simplifies the extension of Emacs themes to adapt them to
> modern GUIs where the buttons are flat.

Looks good to me, so I've pushed this to Emacs 28 (with added
documentation).

This change was small enough to apply without assigning copyright to the
FSF, but for future patches you want to submit, it might make sense to
get the paperwork started now, so that subsequent patches can be applied
speedily. Would you be willing to sign such paperwork?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 10 Jan 2021 13:12:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 45735 <at> debbugs.gnu.org and Pedro Andres Aranda Gutierrez <paaguti <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 10 Jan 2021 13:12:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 08 Feb 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 70 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.