unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54196: 29.0.50; flat-button face box style does not work as expected
@ 2022-02-28  9:30 David Ponce
  2022-02-28  9:58 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: David Ponce @ 2022-02-28  9:30 UTC (permalink / raw)
  To: 54196

Hello,

I noticed that the :box :style flat-button is not working as expected:
the line around the text seems to be there, but not visible.

Just evaluate the below code in the scratch buffer will show the
problem:

(insert
  (propertize "This buffer is for text"
	     'font-lock-face
	     '( :box ( :line-width (4 . 4)
		       :color "dark grey"
		       :style pressed-button)))
  "\n"
  (propertize "This buffer is for text"
	     'font-lock-face
	     '( :box ( :line-width (4 . 4)
		       :color "dark grey"
		       :style released-button)))
  "\n"
  (propertize "This buffer is for text"
	     'font-lock-face
	     '( :box ( :line-width (4 . 4)
		       :color "dark grey"
		       :style flat-button)))
  "\n"
  )

Thanks


In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4)
  of 2022-02-28 built on kilauea
Repository revision: 66899628f8a8c79ca8dfe32094f11a8320630fae
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 35 (KDE Plasma)

Configured using:
  'configure --prefix=/home/dponce --with-cairo --without-sqlite3
  PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
WEBP X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
   value of $LC_TIME: fr_FR.utf8
   value of $LANG: fr_FR.UTF-8
   locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
   tooltip-mode: t
   global-eldoc-mode: t
   eldoc-mode: t
   show-paren-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   indent-tabs-mode: t
   transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message yank-media rmc puny rfc822 mml
mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils mule-util info
help-fns radix-tree cl-print debug backtrace help-mode find-func
cus-theme eieio-custom xwidget url-handlers image-mode dired
dired-loaddefs exif browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars mailcap format-spec bookmark
text-property-search wid-browse tree-widget seq gv byte-opt bytecomp
byte-compile cconv crm thingatpt cus-edit pp cus-start cus-load wid-edit
time-date subr-x cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 124700 10967)
  (symbols 48 10190 1)
  (strings 32 32692 1842)
  (string-bytes 1 927675)
  (vectors 16 18068)
  (vector-slots 8 233951 17277)
  (floats 8 53 116)
  (intervals 56 5791 0)
  (buffers 992 14))





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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28  9:30 bug#54196: 29.0.50; flat-button face box style does not work as expected David Ponce
@ 2022-02-28  9:58 ` Lars Ingebrigtsen
  2022-02-28 10:16   ` David Ponce
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-28  9:58 UTC (permalink / raw)
  To: David Ponce; +Cc: 54196

David Ponce <da_vid@orange.fr> writes:

> I noticed that the :box :style flat-button is not working as expected:
> the line around the text seems to be there, but not visible.
>
> Just evaluate the below code in the scratch buffer will show the
> problem:
>
> (insert
>  (propertize "This buffer is for text"
> 	     'font-lock-face
> 	     '( :box ( :line-width (4 . 4)
> 		       :color "dark grey"
> 		       :style pressed-button)))
>  "\n"
>  (propertize "This buffer is for text"
> 	     'font-lock-face
> 	     '( :box ( :line-width (4 . 4)
> 		       :color "dark grey"
> 		       :style released-button)))
>  "\n"
>  (propertize "This buffer is for text"
> 	     'font-lock-face
> 	     '( :box ( :line-width (4 . 4)
> 		       :color "dark grey"
> 		       :style flat-button)))
>  "\n"
>  )

I'm not sure what I'm supposed to be looking for here.  Can you include
some screenshots and point to what you think is the problem?

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





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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28  9:58 ` Lars Ingebrigtsen
@ 2022-02-28 10:16   ` David Ponce
  2022-02-28 10:28     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: David Ponce @ 2022-02-28 10:16 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 54196

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

On 28/02/2022 10:58, Lars Ingebrigtsen wrote:
> David Ponce <da_vid@orange.fr> writes:
> 
>> I noticed that the :box :style flat-button is not working as expected:
>> the line around the text seems to be there, but not visible.
>>
>> Just evaluate the below code in the scratch buffer will show the
>> problem:
>>
>> (insert
>>   (propertize "This buffer is for text"
>> 	     'font-lock-face
>> 	     '( :box ( :line-width (4 . 4)
>> 		       :color "dark grey"
>> 		       :style pressed-button)))
>>   "\n"
>>   (propertize "This buffer is for text"
>> 	     'font-lock-face
>> 	     '( :box ( :line-width (4 . 4)
>> 		       :color "dark grey"
>> 		       :style released-button)))
>>   "\n"
>>   (propertize "This buffer is for text"
>> 	     'font-lock-face
>> 	     '( :box ( :line-width (4 . 4)
>> 		       :color "dark grey"
>> 		       :style flat-button)))
>>   "\n"
>>   )
> 
> I'm not sure what I'm supposed to be looking for here.  Can you include
> some screenshots and point to what you think is the problem?
> 
My example above to illustrate the issue, inserts 3 lines with the same text in the scratch buffer:

1st line with a gray pressed-button box around the text. Work as expected.
2nd line with a gray released-button box around the text. Work as expected.
3rd line with a gray flat-button box around the text. Doesn' work as expected. The gray line around the text is not visible.

I attached a screen shot.


[-- Attachment #2: face-box-screenshot.jpg --]
[-- Type: image/jpeg, Size: 97303 bytes --]

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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28 10:16   ` David Ponce
@ 2022-02-28 10:28     ` Lars Ingebrigtsen
  2022-02-28 10:36       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-28 10:28 UTC (permalink / raw)
  To: David Ponce; +Cc: 54196

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

David Ponce <da_vid@orange.fr> writes:

> 1st line with a gray pressed-button box around the text. Work as expected.
> 2nd line with a gray released-button box around the text. Work as expected.
> 3rd line with a gray flat-button box around the text. Doesn' work as
> expected. The gray line around the text is not visible.

With a flat button, there is no line around the button.  So you'd
typically say

 (propertize "This buffer is for text"
	     'font-lock-face
	     '( :box ( :line-width (4 . 4)
		       :style flat-button)
	      :background "dark grey"))


and get


[-- Attachment #2: Type: image/png, Size: 15221 bytes --]

[-- Attachment #3: Type: text/plain, Size: 107 bytes --]





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

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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28 10:28     ` Lars Ingebrigtsen
@ 2022-02-28 10:36       ` Lars Ingebrigtsen
  2022-02-28 10:42         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-28 10:36 UTC (permalink / raw)
  To: David Ponce; +Cc: 54196

Lars Ingebrigtsen <larsi@gnus.org> writes:

> With a flat button, there is no line around the button.  So you'd
> typically say

But there's a bug here.  It should be possible to specify the border
color, and if you do it in this order, you can:

 (propertize "This buffer is for text"
	     'font-lock-face
	     '( :box ( :line-width (20 . 20)
		       :style flat-button
		       :color "red")
	      :background "dark grey"))

I'll try to fix that...

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





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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28 10:36       ` Lars Ingebrigtsen
@ 2022-02-28 10:42         ` Lars Ingebrigtsen
  2022-02-28 11:15           ` David Ponce
  2022-02-28 12:55           ` Eli Zaretskii
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-28 10:42 UTC (permalink / raw)
  To: David Ponce; +Cc: 54196

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I'll try to fix that...

I've now fixed this in Emacs 29.

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





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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28 10:42         ` Lars Ingebrigtsen
@ 2022-02-28 11:15           ` David Ponce
  2022-02-28 12:55           ` Eli Zaretskii
  1 sibling, 0 replies; 11+ messages in thread
From: David Ponce @ 2022-02-28 11:15 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 54196

On 28/02/2022 11:42, Lars Ingebrigtsen wrote:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
> 
>> I'll try to fix that...
> 
> I've now fixed this in Emacs 29.
> 

Confirmed.

Thank you very much!





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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28 10:42         ` Lars Ingebrigtsen
  2022-02-28 11:15           ` David Ponce
@ 2022-02-28 12:55           ` Eli Zaretskii
  2022-02-28 12:57             ` Lars Ingebrigtsen
  1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-02-28 12:55 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: da_vid, 54196

> Resent-From: Lars Ingebrigtsen <larsi@gnus.org>
> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
> Resent-CC: bug-gnu-emacs@gnu.org
> Resent-Sender: help-debbugs@gnu.org
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Mon, 28 Feb 2022 11:42:11 +0100
> Cc: 54196@debbugs.gnu.org
> 
> Lars Ingebrigtsen <larsi@gnus.org> writes:
> 
> > I'll try to fix that...
> 
> I've now fixed this in Emacs 29.

Strangely enough, I don't see any difference in behavior before and
after the change.





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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28 12:55           ` Eli Zaretskii
@ 2022-02-28 12:57             ` Lars Ingebrigtsen
  2022-02-28 13:25               ` Eli Zaretskii
  0 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-28 12:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: da_vid, 54196

Eli Zaretskii <eliz@gnu.org> writes:

> Strangely enough, I don't see any difference in behavior before and
> after the change.

Did you test with the :color before the :style?

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





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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28 12:57             ` Lars Ingebrigtsen
@ 2022-02-28 13:25               ` Eli Zaretskii
  2022-03-01 15:10                 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-02-28 13:25 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: da_vid, 54196

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: da_vid@orange.fr,  54196@debbugs.gnu.org
> Date: Mon, 28 Feb 2022 13:57:02 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Strangely enough, I don't see any difference in behavior before and
> > after the change.
> 
> Did you test with the :color before the :style?

I've used the code you posted.  It behaved correctly (AFAIU) for me
even before the change, and it continues to behave correctly after the
change.





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

* bug#54196: 29.0.50; flat-button face box style does not work as expected
  2022-02-28 13:25               ` Eli Zaretskii
@ 2022-03-01 15:10                 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-01 15:10 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: da_vid, 54196

Eli Zaretskii <eliz@gnu.org> writes:

> I've used the code you posted.  It behaved correctly (AFAIU) for me
> even before the change, and it continues to behave correctly after the
> change.

Perhaps it somehow works differently on Windows?  Reading the code, I
don't see how, but I guess it's possible.

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





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

end of thread, other threads:[~2022-03-01 15:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28  9:30 bug#54196: 29.0.50; flat-button face box style does not work as expected David Ponce
2022-02-28  9:58 ` Lars Ingebrigtsen
2022-02-28 10:16   ` David Ponce
2022-02-28 10:28     ` Lars Ingebrigtsen
2022-02-28 10:36       ` Lars Ingebrigtsen
2022-02-28 10:42         ` Lars Ingebrigtsen
2022-02-28 11:15           ` David Ponce
2022-02-28 12:55           ` Eli Zaretskii
2022-02-28 12:57             ` Lars Ingebrigtsen
2022-02-28 13:25               ` Eli Zaretskii
2022-03-01 15:10                 ` Lars Ingebrigtsen

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