Участник:StasFomin/GTK/GTK-and-spacing-in-GTK-HeaderBar — различия между версиями

Материал из DISCOPAL
Перейти к: навигация, поиск
(Новая страница: «I want to make new Client Side Decoration buttons compatible with my metacity themes. In my metacity themes I have three compact button (minimize, maximize, clos…»)
 
 
(не показана одна промежуточная версия этого же участника)
Строка 1: Строка 1:
 
I want to make new Client Side Decoration buttons compatible with my metacity themes.
 
I want to make new Client Side Decoration buttons compatible with my metacity themes.
  
In my metacity themes I have three compact button (minimize, maximize, close) like that:
+
In my metacity themes I have three compact buttons (minimize, maximize, close) like that:
  
 
[[File:metacity-rosa-buttons.png|center]]
 
[[File:metacity-rosa-buttons.png|center]]
Строка 8: Строка 8:
  
 
[[File:csd-rosa-buttons.png|center]]
 
[[File:csd-rosa-buttons.png|center]]
 +
 +
You can see ugly unremovable spacing between titlebuttons.
  
 
This is because of «spacing=6» in parent GTKBox:
 
This is because of «spacing=6» in parent GTKBox:
  
 
[[File:csd-rosa-buttons-spacing-parasite.png|center]]
 
[[File:csd-rosa-buttons-spacing-parasite.png|center]]
 +
 +
How to remove this spacing by the GTK CSS?
 +
 +
I look in <tt>/gtk+3.0/gtk+-3.12.2/gtk/gtkheaderbar.c</tt>
 +
and this spacing is inherited from internal spacing of GtkHeaderBar
 +
(with hardcoded «#define DEFAULT_SPACING 6»)
 +
 +
But there is the function «gtk_header_bar_set_property»,
 +
 +
so may be there is some CSS Property like
 +
 +
«-GtkHeaderBar-spacing» or something else?
 +
 +
Please, give me any idea how to fix it without patching GTK.

Текущая версия на 15:19, 26 февраля 2015

I want to make new Client Side Decoration buttons compatible with my metacity themes.

In my metacity themes I have three compact buttons (minimize, maximize, close) like that:

Metacity-rosa-buttons.png

With lot of CSS I get

Csd-rosa-buttons.png

You can see ugly unremovable spacing between titlebuttons.

This is because of «spacing=6» in parent GTKBox:

Csd-rosa-buttons-spacing-parasite.png

How to remove this spacing by the GTK CSS?

I look in /gtk+3.0/gtk+-3.12.2/gtk/gtkheaderbar.c and this spacing is inherited from internal spacing of GtkHeaderBar (with hardcoded «#define DEFAULT_SPACING 6»)

But there is the function «gtk_header_bar_set_property»,

so may be there is some CSS Property like

«-GtkHeaderBar-spacing» or something else?

Please, give me any idea how to fix it without patching GTK.