Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceliuice committed Apr 17, 2021
2 parents d8a31c6 + 7801413 commit 4d585f0
Show file tree
Hide file tree
Showing 368 changed files with 327,167 additions and 6,441 deletions.
27 changes: 26 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ THEME_VARIANTS=('' '-purple' '-pink' '-red' '-orange' '-yellow' '-green' '-grey'
COLOR_VARIANTS=('' '-light' '-dark')
SIZE_VARIANTS=('' '-compact')

if [[ "$(command -v gnome-shell)" ]]; then
SHELL_VERSION="$(gnome-shell --version | cut -d ' ' -f 3 | cut -d . -f -2)"
if [[ "${SHELL_VERSION:-}" == '40.0' ]]; then
GS_VERSION="new"
else
GS_VERSION="old"
fi
else
echo "'gnome-shell' not found, using styles for last gnome-shell version available."
GS_VERSION="new"
fi

usage() {
cat << EOF
Usage: $0 [OPTION]...
Expand Down Expand Up @@ -77,7 +89,13 @@ install() {

mkdir -p "${THEME_DIR}/gnome-shell"
cp -ur "${SRC_DIR}/gnome-shell/"{extensions,message-indicator-symbolic.svg,pad-osd.css} "${THEME_DIR}/gnome-shell"
cp -ur "${SRC_DIR}/gnome-shell/gnome-shell$theme${ELSE_DARK:-}$size.css" "${THEME_DIR}/gnome-shell/gnome-shell.css"

if [[ "${GS_VERSION:-}" == 'new' ]]; then
cp -r "${SRC_DIR}/gnome-shell/shell-40-0/gnome-shell$theme${ELSE_DARK:-}$size.css" "${THEME_DIR}/gnome-shell/gnome-shell.css"
else
cp -r "${SRC_DIR}/gnome-shell/shell-3-28/gnome-shell$theme${ELSE_DARK:-}$size.css" "${THEME_DIR}/gnome-shell/gnome-shell.css"
fi

cp -ur "${SRC_DIR}/gnome-shell/common-assets" "${THEME_DIR}/gnome-shell/assets"
cp -ur "${SRC_DIR}/gnome-shell/assets${ELSE_DARK:-}/"*.svg "${THEME_DIR}/gnome-shell/assets"
cp -ur "${SRC_DIR}/gnome-shell/theme$theme/checkbox${ELSE_DARK:-}.svg" "${THEME_DIR}/gnome-shell/assets/checkbox.svg"
Expand All @@ -101,6 +119,13 @@ install() {
[[ "$color" != '-dark' ]] && \
cp -r "$SRC_DIR/gtk/3.0/gtk$theme-dark$size.css" "$THEME_DIR/gtk-3.0/gtk-dark.css"

mkdir -p "$THEME_DIR/gtk-4.0"
cp -r "$SRC_DIR/gtk/assets$theme" "$THEME_DIR/gtk-4.0/assets"
cp -r "$SRC_DIR/gtk/scalable" "$THEME_DIR/gtk-4.0/assets"
cp -r "$SRC_DIR/gtk/4.0/gtk$theme$color$size.css" "$THEME_DIR/gtk-4.0/gtk.css"
[[ "$color" != '-dark' ]] && \
cp -r "$SRC_DIR/gtk/4.0/gtk$theme-dark$size.css" "$THEME_DIR/gtk-4.0/gtk-dark.css"

mkdir -p "${THEME_DIR}/xfwm4"
cp -r "${SRC_DIR}/xfwm4/assets${ELSE_LIGHT:-}/"*.png "${THEME_DIR}/xfwm4"
cp -r "${SRC_DIR}/xfwm4/themerc${ELSE_LIGHT:-}" "${THEME_DIR}/xfwm4/themerc"
Expand Down
4 changes: 3 additions & 1 deletion parse-sass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ for theme in "${_THEME_VARIANTS[@]}"; do
for color in "${_COLOR_VARIANTS[@]}"; do
for size in "${_SIZE_VARIANTS[@]}"; do
sassc "${SASSC_OPT[@]}" "src/gtk/3.0/gtk$theme$color$size."{scss,css}
sassc "${SASSC_OPT[@]}" "src/gtk/4.0/gtk$theme$color$size."{scss,css}
done
done
done

for theme in "${_THEME_VARIANTS[@]}"; do
for color in "${_GCOLOR_VARIANTS[@]}"; do
for size in "${_SIZE_VARIANTS[@]}"; do
sassc "${SASSC_OPT[@]}" "src/gnome-shell/gnome-shell$theme$color$size."{scss,css}
sassc "${SASSC_OPT[@]}" "src/gnome-shell/shell-3-28/gnome-shell$theme$color$size."{scss,css}
sassc "${SASSC_OPT[@]}" "src/gnome-shell/shell-40-0/gnome-shell$theme$color$size."{scss,css}
done
done
done
Expand Down
4 changes: 2 additions & 2 deletions src/_sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ $base: if($variant == 'light', #FFFFFF, #2C2C2C
$base-alt: if($variant == 'light', #FAFAFA, #242424);

$os-background: #212121;
$tooltip: rgba(#616161, 0.9);
$tooltip: rgba(#363636, 0.9);
$scrim: rgba(black, 0.6);
$scrim-alt: rgba(black, 0.3);
$scrim-inverse: rgba(white, 0.1);
Expand All @@ -104,7 +104,7 @@ $suggested: $primary;
$destructive: $error;

$frame: if($variant == 'light', rgba(black, 0.08), rgba(black, 0.16)); // instead of shadows
$solid-border: if($variant == 'light', darken($background, 10%), transparent);
$solid-border: if($variant == 'light', darken($background, 8%), lighten($background, 12%));
$border-alt: rgba(black, 0.16); // darker border color for Chrome and Firefox
$titlebar-indicator: if($topbar == 'dark', currentColor, $primary);

Expand Down
4 changes: 2 additions & 2 deletions src/_sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ $theme-asset-suffix: if($topbar == 'dark', if($variant == 'dark', '-dark', ''),

$container-padding: if($compact == 'false', 6px, 4px);

$small-size: if($compact == 'false', 24px, 24px);
$small-size: if($compact == 'false', 24px, 22px);
$medium-size: if($compact == 'false', 36px, 32px);
$large-size: if($compact == 'false', 48px, 40px);

$bar-size: 6px;
$menuitem-size: 28px;
$menuitem-size: if($compact == 'false', 28px, 24px);

//
// Radii
Expand Down
8 changes: 8 additions & 0 deletions src/_sass/gtk/_apps-4.0.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import 'apps/gnome-3.22';
@import 'apps/misc';
@import 'apps/unity';
@import 'apps/mate';
@import 'apps/budgie';
@import 'apps/xfce';
@import 'apps/lightdm';
@import 'apps/nemo';
134 changes: 84 additions & 50 deletions src/_sass/gtk/_common-3.20.scss
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ button {
min-width: 24px;
padding: ($medium-size - 24px) / 2;

@extend %circular_button;
@extend %circular-button;
}

// NOTE: Some image-only buttons use this as well
Expand Down Expand Up @@ -610,20 +610,20 @@ button {
.inline-toolbar & {
// @extend %button-flat;

&:not(.text-button) { @extend %circular_button; }
&:not(.text-button) { @extend %circular-button; }
}

.primary-toolbar & { -gtk-icon-shadow: none; } // tango icons don't need shadows

@at-root %circular_button,
@at-root %circular-button,
&.close,
&.circular { // The Bloody Circul Button
border-radius: $circular-radius;

// label { padding: 0; }
}

@at-root %small_button {
@at-root %small-button {
min-height: $small-size;
min-width: $small-size;
padding: 0;
Expand Down Expand Up @@ -690,7 +690,7 @@ modelbutton.flat,
.menuitem.button.flat {
min-height: $menuitem-size;
padding: 0 8px;
border-radius: $corner-radius;
border-radius: $corner-radius - $container-padding;
color: $text;

@extend %button-flat-simple;
Expand Down Expand Up @@ -762,7 +762,7 @@ spinbutton {

button {
@extend %button-flat-simple;
@extend %small_button;
@extend %small-button;

// margin: $container-padding;
border: solid $container-padding transparent;
Expand Down Expand Up @@ -813,7 +813,7 @@ spinbutton {

button {
@extend %button-flat-simple;
@extend %small_button;
@extend %small-button;
padding: 0;

border: solid $container-padding transparent;
Expand Down Expand Up @@ -912,7 +912,7 @@ combobox {

> .linked:not(.vertical) > button:not(:only-child) {
@extend %button-flat;
// @extend %small_button;
// @extend %small-button;

min-height: 16px;
min-width: 16px;
Expand Down Expand Up @@ -1341,6 +1341,35 @@ headerbar {
margin-top: 5px;
margin-bottom: 5px;
}

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

> button.popup {
label, image { min-height: 0; }
}

viewswitchertitle > squeezer {
margin-top: 0;
margin-bottom: 0;
background: none;

> viewswitcher {
margin: 0 0;
background: none;

> box.horizontal > button.radio {
margin: 0;
padding: 0;
border-radius: 0;
}
}
}
}
}

// Development versions of apps to use a differently styled headerbar
Expand Down Expand Up @@ -1698,6 +1727,47 @@ popover.background {
/*************
* Notebooks *
*************/

%tabs_tab {
transition: $transition,
background-size 0ms,
background-image 0ms;
min-height: $small-size;
min-width: $small-size;
padding: $container-padding 12px;

border-width: 1px;
border-color: transparent;
border-style: solid;

outline: none;
background-clip: padding-box;

color: $text-secondary;
font-weight: 500;

&:hover {
background-color: $frame;
color: $text;
}

&:disabled { color: $text-secondary-disabled; }

&:checked {
transition: $transition;
background-color: $base;
background-clip: padding-box;
border-color: $frame;
color: $text;

&:disabled { color: $text-disabled; }

&.reorderable-page {
background-color: $base;
}
}
}

notebook {
frame > paned > & > header,
&.frame > header { background-color: $base-alt; }
Expand Down Expand Up @@ -1851,43 +1921,7 @@ notebook {
}

tab {
transition: $transition,
background-size 0ms,
background-image 0ms;
min-height: $small-size;
min-width: $small-size;
padding: $container-padding 12px;

border-width: 1px;
border-color: transparent;
border-style: solid;

outline: none;
background-clip: padding-box;

color: $text-secondary;
font-weight: 500;

&:hover {
background-color: $frame;
color: $text;
}

&:disabled { color: $text-secondary-disabled; }

&:checked {
transition: $transition;
background-color: $base;
background-clip: padding-box;
border-color: $frame;
color: $text;

&:disabled { color: $text-disabled; }

&.reorderable-page {
background-color: $base;
}
}
@extend %tabs_tab;

// FIXME: The tab node doesn't have :drop(active), instead its child box has it.
> box {
Expand All @@ -1903,7 +1937,7 @@ notebook {

// colors the button like the label, overridden otherwise
button.flat {
@extend %small_button;
@extend %small-button;

&:last-child {
margin-left: $container-padding;
Expand Down Expand Up @@ -2187,7 +2221,7 @@ radio {
padding: ($check_radio_size - 24px) / 2;

@extend %button-flat-simple;
@extend %circular_button;
@extend %circular-button;

&:checked, &:indeterminate {
color: $check_radio_primary;
Expand Down Expand Up @@ -2960,7 +2994,7 @@ filechooser {

> stack > box > button { // The new folder button
@extend %button-flat;
@extend %circular_button;
@extend %circular-button;
}
}

Expand Down Expand Up @@ -3141,7 +3175,7 @@ placessidebar.sidebar {

button.sidebar-button {
@extend %button-flat-simple;
@extend %small_button;
@extend %small-button;
}

&.sidebar-placeholder-row { background-color: $overlay-hover; }
Expand Down Expand Up @@ -3554,7 +3588,7 @@ decoration {
button.titlebutton {
// @extend %button-flat-simple;

@extend %circular_button;
@extend %circular-button;

// .selection-mode & { }
}
Expand Down
Loading

0 comments on commit 4d585f0

Please sign in to comment.