Solução oficial
Crie um arquivo ~/.config/gtk-3.0/settings.ini
com o seguinte conteúdo.
[Settings]
gtk-application-prefer-dark-theme=true
Logout para que essas configurações entrem em vigor.
gtk-application-prefer-dark-theme
e outras configurações são documentadas aqui .
Melhor solução
A solução oficial está longe de ser perfeita com o XFCE. Fique longe disso e adicione os dois arquivos a seguir ao seu sistema.
Isso resultará em um escuro XFCE Applications Menu
, bem como em painéis de menu escuros em todos os outros aplicativos GTK2 / 3, de acordo com as cores padrão do painel Xubuntu LTS.
Outras superfícies da interface do usuário GTK2 / 3 permanecem cinza Greybird. Obviamente, as definições de cores RGB hexadecimais podem ser alteradas como se gosta.
1) Adicione um arquivo .gtkrc-2.0
oculto ao seu diretor $HOME
com o seguinte conteúdo:
style "gtk-theme-config-menu" {
base[NORMAL] = "#2e3436"
bg[NORMAL] = "#2e3436"
bg[ACTIVE] = "#2e3436"
bg[INSENSITIVE] = "#2e3436"
text[NORMAL] = "#d3d7cf"
fg[NORMAL] = "#d3d7cf"
}
widget_class"*<GtkMenu>*"style"gtk-theme-config-menu"
2) Adicione um arquivo chamado gtk.css
ao diretório ~/.config/gtk-3.0/
com o conteúdo abaixo. A configuração panel
está comentada, mas é mantida aqui como referência.
/* Custom styles */
/* select-on */
@define-color selected_bg_color #398ee7;
@define-color selected_fg_color #fff;
@define-color theme_selected_bg_color @selected_bg_color;
@define-color theme_selected_fg_color @selected_fg_color;
/* select-on */
/* panel-off
@define-color panel_bg_color #2e3436;
@define-color panel_fg_color #ffffff;
PanelWidget,
PanelApplet,
PanelToplevel,
PanelSeparator,
PanelApplet > GtkMenuBar.menubar,
PanelApplet > GtkMenuBar.menubar.menuitem,
PanelApplet > menubar,
PanelApplet > menubar.menuitem,
PanelApplet > menubar menuitem,
PanelMenuBar.menubar,
PanelMenuBar.menubar.menuitem,
PanelMenuBar.menubar menuitem,
PanelAppletFrame,
UnityPanelWidget,
.gnome-panel-menu-bar,
.unity-panel,
.xfce4-panel,
.xfce4-panel.background {
background-color: @panel_bg_color;
background-image: -gtk-gradient(linear,left top,left bottom,from(shade(@panel_bg_color,1.2)),to(shade(@panel_bg_color,0.8)));
color: @panel_fg_color;
}
.unity-panel.menuitem,
.unity-panel .menuitem,
.unity-panel menuitem {
color: @panel_fg_color;
}
.unity-panel.menubar.menuitem:hover,
.unity-panel.menubar .menuitem *:hover,
.unity-panel.menubar menuitem *:hover {
border-color: shade(@panel_bg_color, 0.7);
border-image: none;
background-color: shade(@panel_bg_color, 0.97);
background-image: -gtk-gradient(linear,left top,left bottom,from(shade(@panel_bg_color, 0.97)),to(shade(@panel_bg_color, 0.82)));
color: @panel_fg_color;
}
PanelApplet .button,
PanelApplet button,
.xfce4-panel .button,
.xfce4-panel button {
border-color: transparent;
border-image: none;
background-color: transparent;
color: @panel_fg_color;
box-shadow: none;
text-shadow: none;
-unico-inner-stroke-width: 0;
}
PanelApplet .button:active,
PanelApplet button:active,
.xfce4-panel .button:active,
.xfce4-panel button:active {
border-color: shade(@panel_bg_color,0.8);
border-image: none;
background-color: shade(shade(@panel_bg_color,1.02),0.9);
background-image: -gtk-gradient(linear,left top,left bottom,from(shade(shade(@panel_bg_color,1.02),0.9)),to(shade(shade(@panel_bg_color,1.02),0.95)));
color: @panel_fg_color;
box-shadow: none;
text-shadow: none;
-unico-inner-stroke-width: 0;
}
PanelApplet .button:prelight,
PanelApplet button:prelight,
.xfce4-panel .button:hover,
.xfce4-panel button:hover {
border-color: transparent;
border-image: none;
background-color: shade(@panel_bg_color,1.2);
background-image: -gtk-gradient(linear,left top,left bottom,from(shade(@panel_bg_color,1.2)),to(shade(@panel_bg_color,1.0)));
color: @panel_fg_color;
box-shadow: none;
text-shadow: none;
-unico-inner-stroke-width: 0;
}
PanelApplet .button:active:prelight,
PanelApplet button:active:prelight,
.xfce4-panel .button:active:hover,
.xfce4-panel button:active:hover {
border-color: shade(@panel_bg_color,0.8);
border-image: none;
background-color: shade(shade(@panel_bg_color,1.02),1.0);
background-image: -gtk-gradient(linear,left top,left bottom,from(shade(shade(@panel_bg_color,1.02),1.0)),to(shade(shade(@panel_bg_color,1.02),1.05)));
color: @panel_fg_color;
box-shadow: none;
text-shadow: none;
-unico-inner-stroke-width: 0;
}
WnckPager,
WnckTasklist {
background-color: @panel_bg_color;
}
panel-off */
/* menu-on */
@define-color menu_bg_color #2e3436;
@define-color menu_fg_color #d3d7cf;
GtkTreeMenu.menu,
GtkMenuToolButton.menu,
GtkComboBox .menu,
GtkComboBox menu {
background-color: @menu_bg_color;
background-image: none;
}
.primary-toolbar .button .menu,
.primary-toolbar button menu,
.toolbar .menu,
toolbar menu,
.toolbar .primary-toolbar .menu,
toolbar .primary-toolbar menu,
.menu,
menu,
#toolbar-popup {
border-style: none;
background-image: none;
background-color: @menu_bg_color;
background-image: none;
color: @menu_fg_color;
box-shadow: none;
text-shadow: none;
-unico-inner-stroke-width: 0;
}
.menu.button:hover,
menu.button:hover,
.menu.button:active,
menu.button:active,
.menu.button:active:insensitive,
menu.button:active:insensitive,
.menu.button:insensitive,
menu.button:insensitive,
.menu.button,
menu.button {
background-color: @menu_bg_color;
background-image: none;
}
GtkTreeMenu .menuitem *,
GtkTreeMenu menuitem * {
color: @menu_fg_color;
}
.menuitem,
menuitem,
.menu .menuitem,
menu menuitem {
background-color: transparent;
background-image: none;
}
.menu .menuitem:active,
menu menuitem:active,
.menu .menuitem:hover,
menu menuitem:hover {
background-color: @theme_selected_bg_color;
background-image: none;
}
.menuitem.check,
menuitem.check,
.menuitem.radio,
menuitem.radio,
.menuitem.check:hover,
menuitem.check:hover,
.menuitem.radio:hover,
menuitem.radio:hover,
.menuitem.check:active,
menuitem.check:active,
.menuitem.radio:active,
menuitem.radio:active {
background-color: transparent;
background-image: none;
}
.menu .menuitem:insensitive,
menu menuitem:insensitive,
.menu .menuitem *:insensitive,
menu menuitem *:insensitive {
color: mix(@menu_fg_color,@menu_bg_color,0.5);
}
.menuitem.arrow,
menuitem.arrow {
color: alpha(@menu_fg_color, 0.6);
}
.menuitem .entry,
menuitem entry {
border-color: shade(@menu_bg_color,0.7);
border-image: none;
background-color: @menu_bg_color;
background-image: none;
color: @menu_fg_color;
}
.menuitem .accelerator,
menuitem accelerator {
color: alpha(@menu_fg_color,0.6);
}
.menuitem .accelerator:insensitive,
menuitem accelerator:insensitive {
color: alpha(mix(@menu_fg_color,@menu_bg_color,0.5),0.6);
text-shadow: none;
}
.menuitem.separator,
menuitem.separator {
background-color: transparent;
background-image: none;
color: shade(@menu_bg_color, 0.9);
}
.menuitem GtkCalendar,
menuitem calendar,
.menuitem GtkCalendar.button,
menuitem calendar.button,
.menuitem GtkCalendar.header,
menuitem calendar.header,
.menuitem GtkCalendar.view,
menuitem calendar.view {
border-color: shade(@menu_bg_color,0.8);
border-image: none;
background-color: @menu_bg_color;
background-image: none;
color: @menu_fg_color;
}
.menuitem GtkCalendar:inconsistent,
menuitem calendar:inconsistent {
color: mix(@menu_fg_color,@menu_bg_color,0.5);
}
/* menu-on */
/* End custom styles */
3) Efetue logout para que essas alterações entrem em vigor.