stylesheet icon indicating copy to clipboard operation
stylesheet copied to clipboard

The primary text in Granite.HeaderLabel misaligned when placed in Gtk.Popover

Open ryonakano opened this issue 2 years ago • 2 comments

What Happened?

2023-03-04 13 09 10 のスクリーンショット

The primary and secondary text in Granite.HeaderLabel are aligned to the start if it's placed in Gtk.Box. However, the primary text is not aligned to the start if the label is placed in Gtk.Popover.

Steps to Reproduce

  1. Clone, compile, and run the following demo app: https://github.com/ryonakano/junk/tree/headerlabel-test
  2. Click the "Open Popover" button to see the style differences between Granite.HeaderLabel in Gtk.Box and Granite.HeaderLabel in Gtk.Popover

Expected Behavior

The primary and secondary text in Granite.HeaderLabel should be aligned to the start, regardless of the widget where it is placed.

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

N/A

Hardware Info

Not relevant

ryonakano avatar Mar 04 '23 04:03 ryonakano

I thought we can simply fix this issue by removing this line which was introduced in #1233:

https://github.com/elementary/stylesheet/blob/be3742f3198541ff794c2c65469ea8dcf5f19367/src/gtk-4.0/widgets/_popovers.scss#L80

Then I can confirm the issue is fixed:

image

However, I noticed this fix introduce regressions in other places like Display plug:

Image

ryonakano avatar Apr 29 '25 23:04 ryonakano

Yeah it's trying to be overly clever tbh. We should remove it and then we'll have to fix the places where it breaks but it'll be more right

danirabbit avatar Apr 30 '25 00:04 danirabbit

@danirabbit Possibly you fixed this in #1325?

ryonakano avatar Jul 08 '25 21:07 ryonakano

@ryonakano thank you! I was looking for an issue report for this

danirabbit avatar Jul 08 '25 21:07 danirabbit