Giter Site home page Giter Site logo

Comments (10)

Fausto-Korpsvart avatar Fausto-Korpsvart commented on August 16, 2024 2

So I spent a little bit of time yesterday digging. GTK-4 applications already have the rounded border applied to them (thanks Gnome? lol). However on Cinnamon anything GTK-3 and under is rendered using the metacity-theme-3 xml file.

This was a huge disappointment, as I was hoping it was as easy as applying a border-radius and border. Thankfully, this wasn't the first time I've had to deal with editing Metacity files.

My findings

Rendering with Metacity is like only being allowed to draw with a ruler and a paintbrush that can draw circles and rectangles. Technically that's all one really needs to render a "close-enough" rounded corner with primitives...

Screenshot from 2022-11-10 10-18-11

If you look closely, you can tell it's not perfect 😂 Even with my best attempts, the positioning system Metacity uses seems to round to the nearest integer, so getting "good-enough" suddenly became "that's all you're gonna get."

Additionally, this only works for HiDPI screens, which means that for 1x and 2x global scaling in cinnamon I would need to make two separate themes just for rounded corners 🤯

The reason I use Cinnamon instead of Gnome is namely it's sane HiDPI support. While I don't agree with every decision the DE makes for me, it's seem to have hit the sweet-spot for making the "2x" global scale actually look more like 150% fractional scaling on Gnome w/ Wayland. This is perfect for me because I need a handful of X11 apps that wont work well in Wayland, and fractional scaling on X11 in Gnome is horrible.

How I did it

  • First I updated the constants to make borders aware of the active/inactive color setting
   <!-- ::: CONSTANTS ::: -->
   <constant name="C_titlebar_gradient_a" value="gtk:custom(titlebar_gradient_a,shade/gtk:bg[NORMAL]/1.07)" />
   <constant name="C_titlebar_gradient_b" value="gtk:custom(titlebar_gradient_b,gtk:bg[NORMAL])" />
-  <constant name="C_border_focused" value="gtk:custom(wm_border_focused,shade/gtk:bg[NORMAL]/0.65)" />
-  <constant name="C_border_unfocused" value="gtk:custom(wm_border_unfocused,shade/gtk:bg[NORMAL]/0.75)" />
+  <constant name="C_border_focused" value="#d84f76" />
+  <constant name="C_border_unfocused" value="#4b4673" />
   <constant name="C_title_focused" value="gtk:custom(wm_title_focused,blend/gtk:fg[NORMAL]/gtk:bg[NORMAL]/0.3)" />
   <constant name="C_title_focused_shadow" value="gtk:custom(wm_title_focused_shadow,shade/gtk:bg[NORMAL]/1.1)" />
   <constant name="C_title_unfocused" value="gtk:custom(wm_title_unfocused,blend/gtk:fg[NORMAL]/gtk:bg[NORMAL]/0.6)" />
  • Then I updated the frame geometry (how Metactiy sees window boundaries) to make sure that the bottom of the window did not clip into the newly made Rounded corners
   <!-- ::: GEOMETRY ::: -->
-  <frame_geometry name="normal" title_scale="medium" rounded_top_left="10" rounded_top_right="10">
-    <distance name="left_width" value="5" />
-    <distance name="right_width" value="5" />
-    <distance name="bottom_height" value="5" />
+  <frame_geometry name="normal" title_scale="medium" rounded_top_left="14" rounded_top_right="14" rounded_bottom_left="14" rounded_bottom_right="14">
+    <distance name="left_width" value="6" />
+    <distance name="right_width" value="6" />
+    <distance name="bottom_height" value="6" />
     <distance name="left_titlebar_edge" value="10" />
     <distance name="right_titlebar_edge" value="10" />
     <distance name="title_vertical_pad" value="6" /
  • And finally, I swapped out the draw_ops for focused and unfocused windows to use new line widths on all sides, render a white rectangle on each corner, and then draw the window background color on top to make it appear like a rounded corner on each side.

The main reason the corners can't be perfect is the positioning of circles seems to be based on the top left rectangular bounds of the circle, not the origin of the circle (which would have made this so much easier)

<draw_ops name="rounded_border_focused">
-    <line color="C_border_focused" x1="12" y1="0" x2="width-13" y2="0" />
-    <line color="C_border_focused" x1="0" y1="height-1" x2="width-1" y2="height-1" />
-    <line color="C_border_focused" x1="0" y1="12" x2="0" y2="height-2" />
-    <line color="C_border_focused" x1="width-1" y1="12" x2="width-1" y2="height-2" />
-    <arc color="C_border_focused" x="0" y="0" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_border_focused" x="width-26" y="0" width="25" height="25" start_angle="0" extent_angle="90" />
-    <!-- double arcs for darker borders -->
-    <arc color="C_border_focused" x="0" y="0" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_border_focused" x="width-26" y="0" width="25" height="25" start_angle="0" extent_angle="90" />
-    <line color="C_highlight" x1="13" y1="1" x2="width - 14" y2="1" />
-    <arc color="C_highlight" x="0" y="1" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_highlight" x="width - 26" y="1" width="25" height="25" start_angle="0" extent_angle="90" />
+    <!-- Lines are drawn from their sides (so the offset needs to match the width always)-->
+    <!-- They are should be drawn in a way that allows us to bridge the gap properly using arcs (border radius * 2)-->
+    <!--Left-->
+    <line color="C_border_focused" width="2" x1="2" y1="28" x2="2" y2="height-28" />
+    <!--Right-->    
+    <line color="C_border_focused" width="2" x1="width-2" y1="28" x2="width-2" y2="height-28" />
+    <!--Top-->    
+    <line color="C_border_focused" width="2" x1="28" y1="2" x2="width-28" y2="2" />
+    <!--Bottom-->
+    <line color="C_border_focused" width="2" x1="28" y1="height-2" x2="width-28" y2="height-2" />
+    <!-- Border radius means that the arcs (which are weirdly just circles) be twice the size of the gap (border radius * 4)-->
+    <!-- Distances from each corner should roughly be the same as the border radius-->
+    <!-- Metacity is using X11 crap so we need to overlay drawn maps for modern & legacy Metacity views (yuck) -->
+    <!-- Top Left Corner-->
+    <rectangle color="C_border_focused" x="0" y="0" width="28" height="28" filled="true" />
+    <arc color="C_background" x="4.5" y="4.5" width="50" height="50" start_angle="270" extent_angle="90" filled="true" />
+    <!-- Top Right Corner-->
+    <rectangle color="C_border_focused" x="width-28" y="0" width="28" height="28" filled="true" />
+    <arc color="C_background" x="width-4.5-50" y="4.5" width="50" height="50" start_angle="0" extent_angle="90" filled="true" />
+    <!-- Bottom Right Corner-->
+    <rectangle color="C_border_focused" x="width-28" y="height-28" width="28" height="28" filled="true" />
+    <arc color="C_background" x="width-4.5-50" y="height-4.5-50" width="50" height="50" start_angle="90" extent_angle="90" filled="true" />
+    <!-- Bottom Left Corner-->
+    <rectangle color="C_border_focused" x="0" y="height-28" width="28" height="28" filled="true" />
+    <arc color="C_background" x="4.5" y="height-4.5-50" width="50" height="50" start_angle="180" extent_angle="90" filled="true" />
   </draw_ops>
 
   <draw_ops name="rounded_border_unfocused">
-    <line color="C_border_unfocused" x1="12" y1="0" x2="width-13" y2="0" />
-    <line color="C_border_unfocused" x1="0" y1="height-1" x2="width-1" y2="height-1" />
-    <line color="C_border_unfocused" x1="0" y1="12" x2="0" y2="height-2" />
-    <line color="C_border_unfocused" x1="width-1" y1="12" x2="width-1" y2="height-2" />
-    <arc color="C_border_unfocused" x="0" y="0" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_border_unfocused" x="width-26" y="0" width="25" height="25" start_angle="0" extent_angle="90" />
-    <!-- double arcs for darker borders -->
-    <arc color="C_border_unfocused" x="0" y="0" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_border_unfocused" x="width-26" y="0" width="25" height="25" start_angle="0" extent_angle="90" />
-    <line color="C_highlight" x1="13" y1="1" x2="width - 14" y2="1" />
-    <arc color="C_highlight" x="0" y="1" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_highlight" x="width - 26" y="1" width="25" height="25" start_angle="0" extent_angle="90" />
+    <!-- Lines are drawn from their sides (so the offset needs to match the width always)-->
+    <!-- They are should be drawn in a way that allows us to bridge the gap properly using arcs (border radius * 2)-->
+    <!--Left-->
+    <line color="C_border_unfocused" width="2" x1="2" y1="28" x2="2" y2="height-28" />
+    <!--Right-->    
+    <line color="C_border_unfocused" width="2" x1="width-2" y1="28" x2="width-2" y2="height-28" />
+    <!--Top-->    
+    <line color="C_border_unfocused" width="2" x1="28" y1="2" x2="width-28" y2="2" />
+    <!--Bottom-->
+    <line color="C_border_unfocused" width="2" x1="28" y1="height-2" x2="width-28" y2="height-2" />
+    <!-- Border radius means that the arcs (which are weirdly just circles) be twice the size of the gap (border radius * 4)-->
+    <!-- Distances from each corner should roughly be the same as the border radius-->
+    <!-- Metacity is using X11 crap so we need to overlay drawn maps for modern & legacy Metacity views (yuck) -->
+    <!-- Top Left Corner-->
+    <rectangle color="C_border_unfocused" x="0" y="0" width="28" height="28" filled="true" />
+    <arc color="C_background" x="4.5" y="4.5" width="50" height="50" start_angle="270" extent_angle="90" filled="true" />
+    <!-- Top Right Corner-->
+    <rectangle color="C_border_unfocused" x="width-28" y="0" width="28" height="28" filled="true" />
+    <arc color="C_background" x="width-4.5-50" y="4.5" width="50" height="50" start_angle="0" extent_angle="90" filled="true" />
+    <!-- Bottom Right Corner-->
+    <rectangle color="C_border_unfocused" x="width-28" y="height-28" width="28" height="28" filled="true" />
+    <arc color="C_background" x="width-4.5-50" y="height-4.5-50" width="50" height="50" start_angle="90" extent_angle="90" filled="true" />
+    <!-- Bottom Left Corner-->
+    <rectangle color="C_border_unfocused" x="0" y="height-28" width="28" height="28" filled="true" />
+    <arc color="C_background" x="4.5" y="height-4.5-50" width="50" height="50" start_angle="180" extent_angle="90" filled="true" />
   </draw_ops>

Why I'm closing this issue

As much as I want to make a PR that fixes this theme upstream for Cinnamon, the maintainability of adding multiple permutations of this theme just for cinnamon seems like too much work. Each global scaling factor will need their own themes as 2x global scale wont render well on 1x and e.c.t.

That said, as far as I've been able to tell, few if any Metacity themes do corners like this - so it might be worth me maintaining Cinnamon support in a fork so I can track these patches.

@Fausto-Korpsvart I appreciate you putting this theme out into the open. It's the only dark theme that aesthetically hits all the right notes for me.

Greetings, @f1yn
I'm sorry to reply until now, but I've not been very healthy in the last few days.
Anyway, I plan to pick up on Monday to review what you propose, I've had a quick look at the modifications you've made and I understand what you mean, but as I mentioned, I hope to pick up in the next few days and review in more detail and try to play around a bit to see the results.

I'm also surprised that Metacity is the one in charge of all this, I was more focused on looking at GTK3 with no results.
Luckily with GTK4 we don't have that rounded corners problem anymore, it was about time xD
Anyway, thank you very much for taking the time and sharing this information, it will surely be very helpful.

Thanks for your great contribution and support, it's this kind of details that motivate me to keep working. }:]

from nightfox-gtk-theme.

Fausto-Korpsvart avatar Fausto-Korpsvart commented on August 16, 2024 1

I've been checking it out, and it's not really a bug, I haven't looked for a way to change it for Cinnamon, I've been more focused on Gnome which the theme for Cinnamon is pretty generic, but thanks for reporting it, as I'm trying to add more details for other desktop environments.

from nightfox-gtk-theme.

f1yn avatar f1yn commented on August 16, 2024

No worries. I will be taking a look later this week, I've been meaning to see how Cinnamon handles stylesheets for a while now.

I'll post back once I have more information 👍🏻

from nightfox-gtk-theme.

Fausto-Korpsvart avatar Fausto-Korpsvart commented on August 16, 2024

No worries. I will be taking a look later this week, I've been meaning to see how Cinnamon handles stylesheets for a while now.

I'll post back once I have more information 👍🏻

I've always wanted to go deeper into Cinnamon stylesheets to add more details like in Gnome, but due to lack of time I focus a bit more on Gnome, I'll be looking more into Cinnamon styles little by little to understand its behaviour.
I will also post here for when I have more information on the subject.

Thanks for reporting and for your support. }:-]

from nightfox-gtk-theme.

f1yn avatar f1yn commented on August 16, 2024

So I spent a little bit of time yesterday digging. GTK-4 applications already have the rounded border applied to them (thanks Gnome? lol). However on Cinnamon anything GTK-3 and under is rendered using the metacity-theme-3 xml file.

This was a huge disappointment, as I was hoping it was as easy as applying a border-radius and border. Thankfully, this wasn't the first time I've had to deal with editing Metacity files.

My findings

Rendering with Metacity is like only being allowed to draw with a ruler and a paintbrush that can draw circles and rectangles. Technically that's all one really needs to render a "close-enough" rounded corner with primitives...

Screenshot from 2022-11-10 10-18-11

If you look closely, you can tell it's not perfect 😂 Even with my best attempts, the positioning system Metacity uses seems to round to the nearest integer, so getting "good-enough" suddenly became "that's all you're gonna get."

Additionally, this only works for HiDPI screens, which means that for 1x and 2x global scaling in cinnamon I would need to make two separate themes just for rounded corners 🤯

The reason I use Cinnamon instead of Gnome is namely it's sane HiDPI support. While I don't agree with every decision the DE makes for me, it's seem to have hit the sweet-spot for making the "2x" global scale actually look more like 150% fractional scaling on Gnome w/ Wayland. This is perfect for me because I need a handful of X11 apps that wont work well in Wayland, and fractional scaling on X11 in Gnome is horrible.

How I did it

  • First I updated the constants to make borders aware of the active/inactive color setting
   <!-- ::: CONSTANTS ::: -->
   <constant name="C_titlebar_gradient_a" value="gtk:custom(titlebar_gradient_a,shade/gtk:bg[NORMAL]/1.07)" />
   <constant name="C_titlebar_gradient_b" value="gtk:custom(titlebar_gradient_b,gtk:bg[NORMAL])" />
-  <constant name="C_border_focused" value="gtk:custom(wm_border_focused,shade/gtk:bg[NORMAL]/0.65)" />
-  <constant name="C_border_unfocused" value="gtk:custom(wm_border_unfocused,shade/gtk:bg[NORMAL]/0.75)" />
+  <constant name="C_border_focused" value="#d84f76" />
+  <constant name="C_border_unfocused" value="#4b4673" />
   <constant name="C_title_focused" value="gtk:custom(wm_title_focused,blend/gtk:fg[NORMAL]/gtk:bg[NORMAL]/0.3)" />
   <constant name="C_title_focused_shadow" value="gtk:custom(wm_title_focused_shadow,shade/gtk:bg[NORMAL]/1.1)" />
   <constant name="C_title_unfocused" value="gtk:custom(wm_title_unfocused,blend/gtk:fg[NORMAL]/gtk:bg[NORMAL]/0.6)" />
  • Then I updated the frame geometry (how Metactiy sees window boundaries) to make sure that the bottom of the window did not clip into the newly made Rounded corners
   <!-- ::: GEOMETRY ::: -->
-  <frame_geometry name="normal" title_scale="medium" rounded_top_left="10" rounded_top_right="10">
-    <distance name="left_width" value="5" />
-    <distance name="right_width" value="5" />
-    <distance name="bottom_height" value="5" />
+  <frame_geometry name="normal" title_scale="medium" rounded_top_left="14" rounded_top_right="14" rounded_bottom_left="14" rounded_bottom_right="14">
+    <distance name="left_width" value="6" />
+    <distance name="right_width" value="6" />
+    <distance name="bottom_height" value="6" />
     <distance name="left_titlebar_edge" value="10" />
     <distance name="right_titlebar_edge" value="10" />
     <distance name="title_vertical_pad" value="6" /
  • And finally, I swapped out the draw_ops for focused and unfocused windows to use new line widths on all sides, render a white rectangle on each corner, and then draw the window background color on top to make it appear like a rounded corner on each side.

The main reason the corners can't be perfect is the positioning of circles seems to be based on the top left rectangular bounds of the circle, not the origin of the circle (which would have made this so much easier)

<draw_ops name="rounded_border_focused">
-    <line color="C_border_focused" x1="12" y1="0" x2="width-13" y2="0" />
-    <line color="C_border_focused" x1="0" y1="height-1" x2="width-1" y2="height-1" />
-    <line color="C_border_focused" x1="0" y1="12" x2="0" y2="height-2" />
-    <line color="C_border_focused" x1="width-1" y1="12" x2="width-1" y2="height-2" />
-    <arc color="C_border_focused" x="0" y="0" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_border_focused" x="width-26" y="0" width="25" height="25" start_angle="0" extent_angle="90" />
-    <!-- double arcs for darker borders -->
-    <arc color="C_border_focused" x="0" y="0" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_border_focused" x="width-26" y="0" width="25" height="25" start_angle="0" extent_angle="90" />
-    <line color="C_highlight" x1="13" y1="1" x2="width - 14" y2="1" />
-    <arc color="C_highlight" x="0" y="1" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_highlight" x="width - 26" y="1" width="25" height="25" start_angle="0" extent_angle="90" />
+    <!-- Lines are drawn from their sides (so the offset needs to match the width always)-->
+    <!-- They are should be drawn in a way that allows us to bridge the gap properly using arcs (border radius * 2)-->
+    <!--Left-->
+    <line color="C_border_focused" width="2" x1="2" y1="28" x2="2" y2="height-28" />
+    <!--Right-->    
+    <line color="C_border_focused" width="2" x1="width-2" y1="28" x2="width-2" y2="height-28" />
+    <!--Top-->    
+    <line color="C_border_focused" width="2" x1="28" y1="2" x2="width-28" y2="2" />
+    <!--Bottom-->
+    <line color="C_border_focused" width="2" x1="28" y1="height-2" x2="width-28" y2="height-2" />
+    <!-- Border radius means that the arcs (which are weirdly just circles) be twice the size of the gap (border radius * 4)-->
+    <!-- Distances from each corner should roughly be the same as the border radius-->
+    <!-- Metacity is using X11 crap so we need to overlay drawn maps for modern & legacy Metacity views (yuck) -->
+    <!-- Top Left Corner-->
+    <rectangle color="C_border_focused" x="0" y="0" width="28" height="28" filled="true" />
+    <arc color="C_background" x="4.5" y="4.5" width="50" height="50" start_angle="270" extent_angle="90" filled="true" />
+    <!-- Top Right Corner-->
+    <rectangle color="C_border_focused" x="width-28" y="0" width="28" height="28" filled="true" />
+    <arc color="C_background" x="width-4.5-50" y="4.5" width="50" height="50" start_angle="0" extent_angle="90" filled="true" />
+    <!-- Bottom Right Corner-->
+    <rectangle color="C_border_focused" x="width-28" y="height-28" width="28" height="28" filled="true" />
+    <arc color="C_background" x="width-4.5-50" y="height-4.5-50" width="50" height="50" start_angle="90" extent_angle="90" filled="true" />
+    <!-- Bottom Left Corner-->
+    <rectangle color="C_border_focused" x="0" y="height-28" width="28" height="28" filled="true" />
+    <arc color="C_background" x="4.5" y="height-4.5-50" width="50" height="50" start_angle="180" extent_angle="90" filled="true" />
   </draw_ops>
 
   <draw_ops name="rounded_border_unfocused">
-    <line color="C_border_unfocused" x1="12" y1="0" x2="width-13" y2="0" />
-    <line color="C_border_unfocused" x1="0" y1="height-1" x2="width-1" y2="height-1" />
-    <line color="C_border_unfocused" x1="0" y1="12" x2="0" y2="height-2" />
-    <line color="C_border_unfocused" x1="width-1" y1="12" x2="width-1" y2="height-2" />
-    <arc color="C_border_unfocused" x="0" y="0" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_border_unfocused" x="width-26" y="0" width="25" height="25" start_angle="0" extent_angle="90" />
-    <!-- double arcs for darker borders -->
-    <arc color="C_border_unfocused" x="0" y="0" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_border_unfocused" x="width-26" y="0" width="25" height="25" start_angle="0" extent_angle="90" />
-    <line color="C_highlight" x1="13" y1="1" x2="width - 14" y2="1" />
-    <arc color="C_highlight" x="0" y="1" width="25" height="25" start_angle="270" extent_angle="90" />
-    <arc color="C_highlight" x="width - 26" y="1" width="25" height="25" start_angle="0" extent_angle="90" />
+    <!-- Lines are drawn from their sides (so the offset needs to match the width always)-->
+    <!-- They are should be drawn in a way that allows us to bridge the gap properly using arcs (border radius * 2)-->
+    <!--Left-->
+    <line color="C_border_unfocused" width="2" x1="2" y1="28" x2="2" y2="height-28" />
+    <!--Right-->    
+    <line color="C_border_unfocused" width="2" x1="width-2" y1="28" x2="width-2" y2="height-28" />
+    <!--Top-->    
+    <line color="C_border_unfocused" width="2" x1="28" y1="2" x2="width-28" y2="2" />
+    <!--Bottom-->
+    <line color="C_border_unfocused" width="2" x1="28" y1="height-2" x2="width-28" y2="height-2" />
+    <!-- Border radius means that the arcs (which are weirdly just circles) be twice the size of the gap (border radius * 4)-->
+    <!-- Distances from each corner should roughly be the same as the border radius-->
+    <!-- Metacity is using X11 crap so we need to overlay drawn maps for modern & legacy Metacity views (yuck) -->
+    <!-- Top Left Corner-->
+    <rectangle color="C_border_unfocused" x="0" y="0" width="28" height="28" filled="true" />
+    <arc color="C_background" x="4.5" y="4.5" width="50" height="50" start_angle="270" extent_angle="90" filled="true" />
+    <!-- Top Right Corner-->
+    <rectangle color="C_border_unfocused" x="width-28" y="0" width="28" height="28" filled="true" />
+    <arc color="C_background" x="width-4.5-50" y="4.5" width="50" height="50" start_angle="0" extent_angle="90" filled="true" />
+    <!-- Bottom Right Corner-->
+    <rectangle color="C_border_unfocused" x="width-28" y="height-28" width="28" height="28" filled="true" />
+    <arc color="C_background" x="width-4.5-50" y="height-4.5-50" width="50" height="50" start_angle="90" extent_angle="90" filled="true" />
+    <!-- Bottom Left Corner-->
+    <rectangle color="C_border_unfocused" x="0" y="height-28" width="28" height="28" filled="true" />
+    <arc color="C_background" x="4.5" y="height-4.5-50" width="50" height="50" start_angle="180" extent_angle="90" filled="true" />
   </draw_ops>

Why I'm closing this issue

As much as I want to make a PR that fixes this theme upstream for Cinnamon, the maintainability of adding multiple permutations of this theme just for cinnamon seems like too much work. Each global scaling factor will need their own themes as 2x global scale wont render well on 1x and e.c.t.

That said, as far as I've been able to tell, few if any Metacity themes do corners like this - so it might be worth me maintaining Cinnamon support in a fork so I can track these patches.

@Fausto-Korpsvart I appreciate you putting this theme out into the open. It's the only dark theme that aesthetically hits all the right notes for me.

from nightfox-gtk-theme.

f1yn avatar f1yn commented on August 16, 2024

Good news and bad news. The Fedora 37 release was a few days ago, so I was safely able to update to Cinnamon 5.4.12 from 5.2. Modern Cinnamon has completely thrown Metacity out the window, and honesty - good riddance.

The bad news is that now I'm dealing with the same bug that was reported here: Fausto-Korpsvart/Material-GTK-Themes#1 - where the GTK stylesheet is not decorating the window border correctly. It seems to be reverting to the base styles from the Graphite GTK theme (which makes sense as that's the base for most of these themes). No color states for normal GTK windows (Gnome windows are fine), and there's missing border radius on the bottom of windows.

I'm going to fork this repo and see if I can figure out over the weekend how to get the GTK theme to match whatever Gnome and/or libadwaita is doing. If it's an easy fix, I might be able to suggest a way to patch your other themes as well.

from nightfox-gtk-theme.

f1yn avatar f1yn commented on August 16, 2024

How it looks on Cinnamon 5.4.12:

Screenshot from 2022-11-19 01-32-09

from nightfox-gtk-theme.

Fausto-Korpsvart avatar Fausto-Korpsvart commented on August 16, 2024

Good news and bad news. The Fedora 37 release was a few days ago, so I was safely able to update to Cinnamon 5.4.12 from 5.2. Modern Cinnamon has completely thrown Metacity out the window, and honesty - good riddance.

The bad news is that now I'm dealing with the same bug that was reported here: Fausto-Korpsvart/Material-GTK-Themes#1 - where the GTK stylesheet is not decorating the window border correctly. It seems to be reverting to the base styles from the Graphite GTK theme (which makes sense as that's the base for most of these themes). No color states for normal GTK windows (Gnome windows are fine), and there's missing border radius on the bottom of windows.

I'm going to fork this repo and see if I can figure out over the weekend how to get the GTK theme to match whatever Gnome and/or libadwaita is doing. If it's an easy fix, I might be able to suggest a way to patch your other themes as well.

Yes, I noticed yesterday, I reinstalled all my virtual machines and noticed that in the theme settings in Cinnamon the Metacity part is no longer there; which leaves us again with the border problem.

I'm also looking for a way to improve the themes for Cinnamon a bit, I think it must be in GTK3, as I have no news that GTK4/Libadwaita is already being implemented in Cinnamon.

Any news I will let you know, thanks for the support.

from nightfox-gtk-theme.

f1yn avatar f1yn commented on August 16, 2024

@Fausto-Korpsvart I submitted a pull request with the fix along with my findings. I will also be looking into some sort of bash solution to see if I can maybe make it easier to port this fix to other themes.

from nightfox-gtk-theme.

Fausto-Korpsvart avatar Fausto-Korpsvart commented on August 16, 2024

@Fausto-Korpsvart I submitted a pull request with the fix along with my findings. I will also be looking into some sort of bash solution to see if I can maybe make it easier to port this fix to other themes.

@f1yn Great, that explains why it wasn't working, I thought it was in the .csd, I did try .ssd, but it didn't seem to work, maybe because it was handled by Metacity before.

I've already updated the repository to the latest version of Graphite, so I've already started adding the solution to update the themes this week.

Thanks for taking the time to research and provide a solution to this problem, I'm going to mention you in the description to give you credit for this Cinnamon window decoration solution.

Great, that explains why it wasn't working, I thought it was in the .csd, I did try .ssd, but it didn't seem to work, maybe because it was handled by Metacity before.
I've already updated the repository to the latest version of Graphite, so I've already started adding the solution to update the themes this week.
Thanks for taking the time to research and provide a solution to this problem, I'm going to mention you in the description to give you credit for this Cinnamon window decoration solution.

Again, thanks for your support and time }:]

from nightfox-gtk-theme.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.