From f6b6049bc59137274b99d4b6d2e95b61e2720c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 22 Mar 2023 15:25:19 +0100 Subject: [PATCH] classic: Use light color scheme instead of classic styling gnome-shell now includes a light variant, and supports switching between dark- and light styling at runtime. That means we no longer have to build our own stylesheet, and can instead just instruct gnome-shell to always use the light style in the classic session. Part-of: --- .gitlab-ci.yml | 2 - .gitmodules | 3 - data/classic.json.in | 2 +- data/gnome-classic-high-contrast.css | 5 -- data/gnome-classic.scss | 95 ---------------------------- data/gnome-shell-sass | 1 - data/meson.build | 63 ------------------ meson.build | 1 - meson/generate-stylesheets.py | 13 ---- 9 files changed, 1 insertion(+), 184 deletions(-) delete mode 100644 .gitmodules delete mode 100644 data/gnome-classic-high-contrast.css delete mode 100644 data/gnome-classic.scss delete mode 160000 data/gnome-shell-sass delete mode 100644 meson/generate-stylesheets.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a53e93fe..b1562b3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -132,8 +132,6 @@ fedora-build: stage: build needs: - build-fedora-container - variables: - GIT_SUBMODULE_STRATEGY: normal script: - meson setup build --werror -Dextension_set=all -Dclassic_mode=true - meson compile -C build diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 8703c71d..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "data/gnome-shell-sass"] - path = data/gnome-shell-sass - url = https://gitlab.gnome.org/GNOME/gnome-shell-sass.git diff --git a/data/classic.json.in b/data/classic.json.in index 41976b69..601a8995 100644 --- a/data/classic.json.in +++ b/data/classic.json.in @@ -1,6 +1,6 @@ { "parentMode": "user", - "stylesheetName": "gnome-classic.css", + "colorScheme": "force-light", "hasOverview": false, "showWelcomeDialog": false, "enabledExtensions": [@CLASSIC_EXTENSIONS@], diff --git a/data/gnome-classic-high-contrast.css b/data/gnome-classic-high-contrast.css deleted file mode 100644 index 7e4e7712..00000000 --- a/data/gnome-classic-high-contrast.css +++ /dev/null @@ -1,5 +0,0 @@ -@import url("gnome-classic.css"); - -stage { - -st-icon-style: symbolic; -} diff --git a/data/gnome-classic.scss b/data/gnome-classic.scss deleted file mode 100644 index 33399f86..00000000 --- a/data/gnome-classic.scss +++ /dev/null @@ -1,95 +0,0 @@ -/* Use the gnome-shell theme, but with light colors */ -$variant: 'light'; - -@import "gnome-shell-sass/_colors"; //use gtk colors -@import "gnome-shell-sass/_drawing"; -@import "gnome-shell-sass/_common"; -@import "gnome-shell-sass/_widgets"; - -/* Overrides */ - -#panel, #panel.solid { - font-weight: normal; - background-color: $bg_color; - background-gradient-direction: vertical; - background-gradient-end: darken($bg_color,5%); - border-top-color: #666; /* we don't support non-uniform border-colors and - use the top border color for any border, so we - need to set it even if all we want is a bottom - border */ - border-bottom: 1px solid #666; - app-icon-bottom-clip: 0px; - &:overview { - background-color: #000; - background-gradient-end: #000; - border-top-color: #000; - border-bottom: 1px solid #000; - .panel-button { color: #fff; } - } - - .panel-button { - -natural-hpadding: 8px; - -minimum-hpadding: 4px; - font-weight: normal; - color: $fg_color; - text-shadow: none; - transition-duration: 0ms; - border: 0; - border-radius: 0px; - - &.clock-display { - .clock { - transition-duration: 0ms; - border: 0; - border-radius: 0px; - } - } - - &:hover { - color: lighten($fg_color,10%); - text-shadow: none; - & .system-status-icon { icon-shadow: none; } - } - &:active, &:overview, &:focus, &:checked { - // Trick due to St limitations. It needs a background to draw - // a box-shadow - background-color: $selected_bg_color; - color: $selected_fg_color; - box-shadow: none; - & > .system-status-icon { icon-shadow: none; } - } - - .app-menu-icon { width: 0; height: 0; margin: 0; } // shell's display:none; :D - - .system-status-icon { - icon-shadow: none; - } - } - - .panel-corner, - .panel-corner:active, - .panel-corner:overview, - .panel-corner:focus { - -panel-corner-radius: 0; - } - &.lock-screen, - &.unlock-screen, - &.login-screen { - background-color: transparentize($bg_color, 0.5); - background-gradient-start: transparentize($bg_color, 0.5); - background-gradient-end: transparentize($bg_color, 0.5); - border-bottom: none; - .panel-button { color: $osd_fg_color; } - } -} - -#appMenu { - spinner-image: url("classic-process-working.svg"); - .panel-status-menu-box { padding: 0; } -} -.tile-preview-left.on-primary, -.tile-preview-right.on-primary, -.tile-preview-left.tile-preview-right.on-primary { - /* keep in sync with -panel-corner-radius */ - border-radius: 0; -} diff --git a/data/gnome-shell-sass b/data/gnome-shell-sass deleted file mode 160000 index adeed6c9..00000000 --- a/data/gnome-shell-sass +++ /dev/null @@ -1 +0,0 @@ -Subproject commit adeed6c9b448521bf044bb153f0f29dc950c33ea diff --git a/data/meson.build b/data/meson.build index b8a72979..2219aa5e 100644 --- a/data/meson.build +++ b/data/meson.build @@ -46,68 +46,5 @@ configure_file( install_dir: modedir ) -theme_sources = files( - 'gnome-shell-sass/_colors.scss', - 'gnome-shell-sass/_common.scss', - 'gnome-shell-sass/_drawing.scss', - 'gnome-shell-sass/_high-contrast-colors.scss', - 'gnome-shell-sass/_widgets.scss', - 'gnome-shell-sass/widgets/_a11y.scss', - 'gnome-shell-sass/widgets/_app-grid.scss', - 'gnome-shell-sass/widgets/_base.scss', - 'gnome-shell-sass/widgets/_buttons.scss', - 'gnome-shell-sass/widgets/_calendar.scss', - 'gnome-shell-sass/widgets/_check-box.scss', - 'gnome-shell-sass/widgets/_corner-ripple.scss', - 'gnome-shell-sass/widgets/_dash.scss', - 'gnome-shell-sass/widgets/_dialogs.scss', - 'gnome-shell-sass/widgets/_entries.scss', - 'gnome-shell-sass/widgets/_hotplug.scss', - 'gnome-shell-sass/widgets/_ibus-popup.scss', - 'gnome-shell-sass/widgets/_keyboard.scss', - 'gnome-shell-sass/widgets/_login-lock.scss', - 'gnome-shell-sass/widgets/_looking-glass.scss', - 'gnome-shell-sass/widgets/_message-list.scss', - 'gnome-shell-sass/widgets/_misc.scss', - 'gnome-shell-sass/widgets/_notifications.scss', - 'gnome-shell-sass/widgets/_osd.scss', - 'gnome-shell-sass/widgets/_overview.scss', - 'gnome-shell-sass/widgets/_panel.scss', - 'gnome-shell-sass/widgets/_popovers.scss', - 'gnome-shell-sass/widgets/_quick-settings.scss', - 'gnome-shell-sass/widgets/_screenshot.scss', - 'gnome-shell-sass/widgets/_scrollbars.scss', - 'gnome-shell-sass/widgets/_search-entry.scss', - 'gnome-shell-sass/widgets/_search-results.scss', - 'gnome-shell-sass/widgets/_slider.scss', - 'gnome-shell-sass/widgets/_switcher-popup.scss', - 'gnome-shell-sass/widgets/_switches.scss', - 'gnome-shell-sass/widgets/_window-picker.scss', - 'gnome-shell-sass/widgets/_workspace-switcher.scss', - 'gnome-shell-sass/widgets/_workspace-thumbnails.scss' -) - -theme_data = [ - 'classic-process-working.svg', - 'gnome-classic-high-contrast.css' -] - -stylesheet = 'gnome-classic.css' -if fs.exists(stylesheet) - install_data(stylesheet, install_dir: themedir) -else - sassc = find_program('sassc', required: true) - custom_target(stylesheet, - input: fs.replace_suffix(stylesheet, '.scss'), - output: stylesheet, - depend_files: theme_sources, - command: [sassc, '-a', '@INPUT@', '@OUTPUT@'], - install: true, - install_dir: themedir - ) -endif - -install_data(theme_data, install_dir: themedir) - classic_override = '00_org.gnome.shell.extensions.classic.gschema.override' install_data(classic_override, install_dir: schemadir) diff --git a/meson.build b/meson.build index f3160208..2eda9e7d 100644 --- a/meson.build +++ b/meson.build @@ -97,7 +97,6 @@ gnome.post_install( glib_compile_schemas: true, ) -meson.add_dist_script('meson/generate-stylesheets.py') meson.add_dist_script('meson/check-version.py', meson.project_version(), 'NEWS') diff --git a/meson/generate-stylesheets.py b/meson/generate-stylesheets.py deleted file mode 100644 index 599d098f..00000000 --- a/meson/generate-stylesheets.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python3 - -import os -from pathlib import PurePath -import subprocess - -sourceroot = os.environ.get('MESON_SOURCE_ROOT') -distroot = os.environ.get('MESON_DIST_ROOT') - -stylesheet_path = PurePath('data/gnome-classic.css') -src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss')) -dst = PurePath(distroot, stylesheet_path) -subprocess.run(['sassc', '-a', src, dst], check=True)