Skip to content

Commit

Permalink
Add gtk-4.o support!
Browse files Browse the repository at this point in the history
vinceliuice committed Jun 28, 2021
1 parent 7f1850c commit f453d93
Showing 50 changed files with 32,208 additions and 1,144 deletions.
10 changes: 8 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -91,9 +91,15 @@ install() {

mkdir -p ${THEME_DIR}/gtk-3.0
ln -sf ../gtk-assets ${THEME_DIR}/gtk-3.0/assets
cp -ur ${SRC_DIR}/src/gtk/gtk${color}${solid}.css ${THEME_DIR}/gtk-3.0/gtk.css
cp -ur ${SRC_DIR}/src/gtk/3.0/gtk${color}${solid}.css ${THEME_DIR}/gtk-3.0/gtk.css
[[ ${color} != '-dark' ]] && \
cp -ur ${SRC_DIR}/src/gtk/gtk-dark${solid}.css ${THEME_DIR}/gtk-3.0/gtk-dark.css
cp -ur ${SRC_DIR}/src/gtk/3.0/gtk-dark${solid}.css ${THEME_DIR}/gtk-3.0/gtk-dark.css

mkdir -p ${THEME_DIR}/gtk-4.0
ln -sf ../gtk-assets ${THEME_DIR}/gtk-4.0/assets
cp -ur ${SRC_DIR}/src/gtk/4.0/gtk${color}${solid}.css ${THEME_DIR}/gtk-4.0/gtk.css
[[ ${color} != '-dark' ]] && \
cp -ur ${SRC_DIR}/src/gtk/4.0/gtk-dark${solid}.css ${THEME_DIR}/gtk-4.0/gtk-dark.css

mkdir -p ${THEME_DIR}/xfwm4
cp -ur ${SRC_DIR}/src/xfwm4/assets${ELSE_LIGHT}/*.png ${THEME_DIR}/xfwm4
6 changes: 4 additions & 2 deletions parse-sass.sh
Original file line number Diff line number Diff line change
@@ -20,8 +20,10 @@ SASSC_OPT="-M -t expanded"

for color in "${_COLOR_VARIANTS[@]}"; do
for solid in "${_SOLID_VARIANTS[@]}"; do
sassc $SASSC_OPT src/gtk/gtk${color}${solid}.{scss,css}
echo ">> generating gtk${color}${solid}.css."
sassc $SASSC_OPT src/gtk/3.0/gtk${color}${solid}.{scss,css}
echo ">> generating 3.0 gtk${color}${solid}.css."
sassc $SASSC_OPT src/gtk/4.0/gtk${color}${solid}.{scss,css}
echo ">> generating 4.0 gtk${color}${solid}.css."
done
done

13 changes: 9 additions & 4 deletions src/_sass/_colors.scss
Original file line number Diff line number Diff line change
@@ -16,13 +16,13 @@ $dark_fg_color: rgba($black, 0.87);
$light_fg_color: $white;

$fg_color: if($variant == 'light', rgba($black, 0.75), $white);
$button_fg_color: if($variant == 'light', rgba($black, 0.62), rgba($white, 0.8)); // extra fg color for raised buttons
$secondary_fg_color: if($variant == 'light', rgba($black, 0.54), rgba($white, 0.7));
$button_fg_color: if($variant == 'light', rgba($black, 0.65), rgba($white, 0.8)); // extra fg color for raised buttons
$secondary_fg_color: if($variant == 'light', rgba($black, 0.55), rgba($white, 0.7));
$hint_fg_color: if($variant == 'light', rgba($black, 0.38), rgba($white, 0.5));
$disabled_fg_color: if($variant == 'light', rgba($black, 0.38), rgba($white, 0.5));
$disabled_secondary_fg_color: if($variant == 'light', rgba($black, 0.26), rgba($white, 0.3));
$track_color: if($variant == 'light', rgba($black, 0.26), rgba($white, 0.3));
$divider_color: if($variant == 'light', rgba($black, 0.12), rgba($white, 0.12));
$track_color: if($variant == 'light', rgba($black, 0.2), rgba($white, 0.2));
$divider_color: if($variant == 'light', rgba($black, 0.08), rgba($white, 0.08));

$titlebar_fg_color: if($titlebar == 'light', rgba($black, 0.75), $white);
$titlebar_secondary_fg_color: if($titlebar == 'light', rgba($black, 0.54), rgba($white, 0.7));
@@ -79,6 +79,11 @@ $menu_fg_color: if($titlebar == 'light' and $variant == 'light', rgba($black
$menu_disabled_fg: if($titlebar == 'light' and $variant == 'light', rgba($black, 0.26), rgba($white, 0.3));
$menu_border_color: if($titlebar == 'light' and $variant == 'light', rgba($black, 0.1), rgba($white, 0.1));

$popover_bg: if($variant == 'light', $grey_850, $lighter_bg_color);
$popover_fg: rgba($white, 0.8);
$popover_disabled_fg: rgba($white, 0.3);
$popover_border: rgba($white, 0.12);

$fill_color: gtkalpha(currentColor, $lower_opacity);
$semi_fill_color: gtkalpha(currentColor, $lower_opacity / 2);
$row_fill_color: gtkalpha(currentColor, 0.05);
6 changes: 6 additions & 0 deletions src/_sass/gtk/_apps-3.0.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import 'apps-3.0/gnome';
@import 'apps-3.0/misc';
@import 'apps-3.0/unity';
@import 'apps-3.0/mate';
@import 'apps-3.0/budgie';
@import 'apps-3.0/lightdm';
2 changes: 2 additions & 0 deletions src/_sass/gtk/_apps-4.0.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//@import 'apps-4.0/gnome';
//@import 'apps-4.0/misc';
6 changes: 0 additions & 6 deletions src/_sass/gtk/_apps.scss

This file was deleted.

20 changes: 11 additions & 9 deletions src/_sass/gtk/_common.scss → src/_sass/gtk/_common-3.0.scss
Original file line number Diff line number Diff line change
@@ -1065,7 +1065,6 @@ actionbar { // set bottom border radius
/***************
* Header bars *
***************/
%titlebar,
headerbar {
transition: background-color $shorter_duration $deceleration_curve, color $shorter_duration $deceleration_curve;
min-height: $large_size;
@@ -1207,9 +1206,9 @@ headerbar {
}

.linked:not(.vertical).path-bar,
.linked:not(.vertical):not(.path-bar).stack-switcher {

> button {
.linked:not(.vertical):not(.path-bar).stack-switcher,
&.windowhandle viewswitcher {
button:not(.suggested-action):not(.destructive-action) {
padding-left: 8px; padding-right: 8px;
label { padding-left: 8px; padding-right: 8px; }

@@ -1258,6 +1257,14 @@ headerbar {
}
}

&.windowhandle viewswitcher button:not(.suggested-action):not(.destructive-action) {
margin-top: 0;
margin-bottom: 0;
border-radius: 0;

&:checked { background-color: $semi_fill_color; }
}

// headerbar titlebutton separator
separator.titlebutton { @extend %header_separator; }

@@ -1753,11 +1760,6 @@ menuitem {
* Popovers *
************/

$popover_bg: if($variant == 'light', $grey_850, $lighter_bg_color);
$popover_fg: rgba($white, 0.7);
$popover_disabled_fg: rgba($white, 0.3);
$popover_border: rgba($white, 0.12);

%popover_flat_button {
color: $popover_fg;
background-color: transparent;
Loading

0 comments on commit f453d93

Please sign in to comment.