Skip to content

Commit

Permalink
Include Gtk3 window decoration icons in Greybird (Fixes #170)
Browse files Browse the repository at this point in the history
This means switching icon themes will not have any effect
on the window controls. This is desirable as long as Xfwm4
still draws decorations, as otherwise the icons may be
inconsistent.
  • Loading branch information
ochosi committed Mar 11, 2018
1 parent 9376aaf commit 9b7b218
Show file tree
Hide file tree
Showing 21 changed files with 88 additions and 1 deletion.
18 changes: 17 additions & 1 deletion gtk-3.0/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4235,14 +4235,30 @@ decoration {
}
}

// Window Close button
// Window buttons
button.titlebutton {
@extend %button_basic;

@extend %button_basic.flat;

@include _button_text_shadow;

&.close, &.maximize, &.minimize {
color: transparent;
background-color: transparent;
background-position: center;
background-repeat: no-repeat;

// fade the png buttons out on unfocused windows
&:backdrop { opacity: 0.5; }
}
// Load png assets for each button
@each $k in ('close','maximize', 'minimize') {
@each $l, $m in ('',''), (':backdrop','-backdrop'), (':hover','-hover'), (':active','-active') {
&.#{$k}#{$l} { background-image: url('assets/titlebutton-#{$k}#{$m}#{$asset_suffix}.png'); }
}
}

.selection-mode & {
@extend %button.flat.suggested-action;

Expand Down
Binary file added gtk-3.0/assets/titlebutton-close-active-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions gtk-3.0/assets/titlebutton-close-backdrop-dark.png
1 change: 1 addition & 0 deletions gtk-3.0/assets/titlebutton-close-backdrop.png
Binary file added gtk-3.0/assets/titlebutton-close-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions gtk-3.0/assets/titlebutton-close-hover-dark.png
Binary file modified gtk-3.0/assets/titlebutton-close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gtk-3.0/assets/titlebutton-maximize-active-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions gtk-3.0/assets/titlebutton-maximize-backdrop-dark.png
1 change: 1 addition & 0 deletions gtk-3.0/assets/titlebutton-maximize-backdrop.png
Binary file added gtk-3.0/assets/titlebutton-maximize-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions gtk-3.0/assets/titlebutton-maximize-hover-dark.png
Binary file modified gtk-3.0/assets/titlebutton-maximize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gtk-3.0/assets/titlebutton-minimize-active-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions gtk-3.0/assets/titlebutton-minimize-backdrop-dark.png
1 change: 1 addition & 0 deletions gtk-3.0/assets/titlebutton-minimize-backdrop.png
Binary file added gtk-3.0/assets/titlebutton-minimize-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions gtk-3.0/assets/titlebutton-minimize-hover-dark.png
Binary file modified gtk-3.0/assets/titlebutton-minimize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions gtk-3.0/gtk-contained-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -4141,6 +4141,37 @@ decoration {
button.titlebutton {
text-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
-gtk-icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176); }
button.titlebutton.close, button.titlebutton.maximize, button.titlebutton.minimize {
color: transparent;
background-color: transparent;
background-position: center;
background-repeat: no-repeat; }
button.titlebutton.close:backdrop, button.titlebutton.maximize:backdrop, button.titlebutton.minimize:backdrop {
opacity: 0.5; }
button.titlebutton.close {
background-image: url("assets/titlebutton-close-dark.png"); }
button.titlebutton.close:backdrop {
background-image: url("assets/titlebutton-close-backdrop-dark.png"); }
button.titlebutton.close:hover {
background-image: url("assets/titlebutton-close-hover-dark.png"); }
button.titlebutton.close:active {
background-image: url("assets/titlebutton-close-active-dark.png"); }
button.titlebutton.maximize {
background-image: url("assets/titlebutton-maximize-dark.png"); }
button.titlebutton.maximize:backdrop {
background-image: url("assets/titlebutton-maximize-backdrop-dark.png"); }
button.titlebutton.maximize:hover {
background-image: url("assets/titlebutton-maximize-hover-dark.png"); }
button.titlebutton.maximize:active {
background-image: url("assets/titlebutton-maximize-active-dark.png"); }
button.titlebutton.minimize {
background-image: url("assets/titlebutton-minimize-dark.png"); }
button.titlebutton.minimize:backdrop {
background-image: url("assets/titlebutton-minimize-backdrop-dark.png"); }
button.titlebutton.minimize:hover {
background-image: url("assets/titlebutton-minimize-hover-dark.png"); }
button.titlebutton.minimize:active {
background-image: url("assets/titlebutton-minimize-active-dark.png"); }
button.titlebutton:backdrop {
-gtk-icon-shadow: none; }

Expand Down
31 changes: 31 additions & 0 deletions gtk-3.0/gtk-contained.css
Original file line number Diff line number Diff line change
Expand Up @@ -4171,6 +4171,37 @@ decoration {
button.titlebutton {
text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
-gtk-icon-shadow: 0 1px rgba(255, 255, 255, 0.76923); }
button.titlebutton.close, button.titlebutton.maximize, button.titlebutton.minimize {
color: transparent;
background-color: transparent;
background-position: center;
background-repeat: no-repeat; }
button.titlebutton.close:backdrop, button.titlebutton.maximize:backdrop, button.titlebutton.minimize:backdrop {
opacity: 0.5; }
button.titlebutton.close {
background-image: url("assets/titlebutton-close.png"); }
button.titlebutton.close:backdrop {
background-image: url("assets/titlebutton-close-backdrop.png"); }
button.titlebutton.close:hover {
background-image: url("assets/titlebutton-close-hover.png"); }
button.titlebutton.close:active {
background-image: url("assets/titlebutton-close-active.png"); }
button.titlebutton.maximize {
background-image: url("assets/titlebutton-maximize.png"); }
button.titlebutton.maximize:backdrop {
background-image: url("assets/titlebutton-maximize-backdrop.png"); }
button.titlebutton.maximize:hover {
background-image: url("assets/titlebutton-maximize-hover.png"); }
button.titlebutton.maximize:active {
background-image: url("assets/titlebutton-maximize-active.png"); }
button.titlebutton.minimize {
background-image: url("assets/titlebutton-minimize.png"); }
button.titlebutton.minimize:backdrop {
background-image: url("assets/titlebutton-minimize-backdrop.png"); }
button.titlebutton.minimize:hover {
background-image: url("assets/titlebutton-minimize-hover.png"); }
button.titlebutton.minimize:active {
background-image: url("assets/titlebutton-minimize-active.png"); }
button.titlebutton:backdrop {
-gtk-icon-shadow: none; }

Expand Down

0 comments on commit 9b7b218

Please sign in to comment.