From 278bcc1d0d41bcf5e5fe0e1413a4b04e25b988c0 Mon Sep 17 00:00:00 2001 From: Mat Date: Sat, 9 Sep 2023 15:34:41 +0300 Subject: [PATCH] Add GTK 4 variant of Greybird-dark --- dark/gtk-3.0/meson.build | 60 ++++++++++++++++++++++++ dark/gtk-4.0/Gemfile | 1 + dark/gtk-4.0/README | 1 + dark/gtk-4.0/_colors-public.scss | 1 + dark/gtk-4.0/_colors.scss | 1 + dark/gtk-4.0/_common.scss | 1 + dark/gtk-4.0/_drawing.scss | 1 + dark/gtk-4.0/apps | 1 + dark/gtk-4.0/assets | 1 + dark/gtk-4.0/gtk-contained-dark.scss | 1 + dark/gtk-4.0/gtk-contained.scss | 12 +++++ dark/gtk-4.0/gtk-dark.scss | 1 + dark/gtk-4.0/gtk.gresource.xml | 1 + dark/gtk-4.0/gtk.scss | 1 + dark/gtk-4.0/meson.build | 54 ++++++++++++++++++++++ dark/meson.build | 66 +-------------------------- light/gtk-4.0/gtk-contained-dark.scss | 1 - light/gtk-4.0/settings.ini | 3 -- light/meson.build | 2 +- 19 files changed, 141 insertions(+), 69 deletions(-) create mode 100644 dark/gtk-3.0/meson.build create mode 120000 dark/gtk-4.0/Gemfile create mode 120000 dark/gtk-4.0/README create mode 120000 dark/gtk-4.0/_colors-public.scss create mode 120000 dark/gtk-4.0/_colors.scss create mode 120000 dark/gtk-4.0/_common.scss create mode 120000 dark/gtk-4.0/_drawing.scss create mode 120000 dark/gtk-4.0/apps create mode 120000 dark/gtk-4.0/assets create mode 120000 dark/gtk-4.0/gtk-contained-dark.scss create mode 100644 dark/gtk-4.0/gtk-contained.scss create mode 120000 dark/gtk-4.0/gtk-dark.scss create mode 120000 dark/gtk-4.0/gtk.gresource.xml create mode 120000 dark/gtk-4.0/gtk.scss create mode 100644 dark/gtk-4.0/meson.build delete mode 100644 light/gtk-4.0/settings.ini diff --git a/dark/gtk-3.0/meson.build b/dark/gtk-3.0/meson.build new file mode 100644 index 00000000..72fc8684 --- /dev/null +++ b/dark/gtk-3.0/meson.build @@ -0,0 +1,60 @@ +gtk3_dir = join_paths(theme_path, 'gtk-3.0') + +scss_files = files([ + '_colors-public.scss', + '_colors.scss', + '_common.scss', + '_drawing.scss', + '_gnome-apps.scss', + '_lightdm-gtk-greeter.scss', + '_others.scss', + '_unity.scss', + '_xfce.scss' +]) + +# +# Installing +# + +install_subdir('assets', install_dir: gtk3_dir) +install_subdir('apps', install_dir: gtk3_dir) +install_data('settings.ini', install_dir : gtk3_dir) + +theme_deps += custom_target('Greybird-Dark', + input: 'gtk-contained.scss', + output: 'gtk.css', + command: [ + sassc, sassc_opts, '@INPUT@', '@OUTPUT@' + ], + depend_files: scss_files, + build_by_default: true, + install: true, + install_dir: gtk3_dir) + +theme_deps += custom_target('Greybird-Dark-Dark', + input: 'gtk-contained-dark.scss', + output: 'gtk-dark.css', + command: [ + sassc, sassc_opts, '@INPUT@', '@OUTPUT@' + ], + depend_files: scss_files, + build_by_default: true, + install: true, + install_dir: gtk3_dir) + +# we're commenting this out because of a meson bug in the version found in Leap +#gtk_dark_gresources = gnome.compile_resources('gtk', 'gtk.gresource.xml', +# source_dir: join_paths(meson.source_root(), 'light/gtk-3.0'), +# install: true, +# gresource_bundle: true, +# install_dir: gtk3_dir) + +gtk_dark_gresources = custom_target('gtk-dark-gresources', + input: 'gtk.gresource.xml', + output: 'gtk.gresource', + command: [ + glib_compile_resources, '@INPUT@', '--target', '@OUTPUT@', '--sourcedir', meson.current_source_dir() + ], + build_by_default: true, + install: true, + install_dir: gtk3_dir) diff --git a/dark/gtk-4.0/Gemfile b/dark/gtk-4.0/Gemfile new file mode 120000 index 00000000..0c7555c4 --- /dev/null +++ b/dark/gtk-4.0/Gemfile @@ -0,0 +1 @@ +../../light/gtk-4.0/Gemfile \ No newline at end of file diff --git a/dark/gtk-4.0/README b/dark/gtk-4.0/README new file mode 120000 index 00000000..42e34a4d --- /dev/null +++ b/dark/gtk-4.0/README @@ -0,0 +1 @@ +../../light/gtk-4.0/README \ No newline at end of file diff --git a/dark/gtk-4.0/_colors-public.scss b/dark/gtk-4.0/_colors-public.scss new file mode 120000 index 00000000..c855f677 --- /dev/null +++ b/dark/gtk-4.0/_colors-public.scss @@ -0,0 +1 @@ +../../light/gtk-4.0/_colors-public.scss \ No newline at end of file diff --git a/dark/gtk-4.0/_colors.scss b/dark/gtk-4.0/_colors.scss new file mode 120000 index 00000000..9fd0f37b --- /dev/null +++ b/dark/gtk-4.0/_colors.scss @@ -0,0 +1 @@ +../../light/gtk-4.0/_colors.scss \ No newline at end of file diff --git a/dark/gtk-4.0/_common.scss b/dark/gtk-4.0/_common.scss new file mode 120000 index 00000000..48b1deb0 --- /dev/null +++ b/dark/gtk-4.0/_common.scss @@ -0,0 +1 @@ +../../light/gtk-4.0/_common.scss \ No newline at end of file diff --git a/dark/gtk-4.0/_drawing.scss b/dark/gtk-4.0/_drawing.scss new file mode 120000 index 00000000..4f553c97 --- /dev/null +++ b/dark/gtk-4.0/_drawing.scss @@ -0,0 +1 @@ +../../light/gtk-4.0/_drawing.scss \ No newline at end of file diff --git a/dark/gtk-4.0/apps b/dark/gtk-4.0/apps new file mode 120000 index 00000000..b33db053 --- /dev/null +++ b/dark/gtk-4.0/apps @@ -0,0 +1 @@ +../../light/gtk-4.0/apps/ \ No newline at end of file diff --git a/dark/gtk-4.0/assets b/dark/gtk-4.0/assets new file mode 120000 index 00000000..38c1ffab --- /dev/null +++ b/dark/gtk-4.0/assets @@ -0,0 +1 @@ +../../light/gtk-4.0/assets/ \ No newline at end of file diff --git a/dark/gtk-4.0/gtk-contained-dark.scss b/dark/gtk-4.0/gtk-contained-dark.scss new file mode 120000 index 00000000..1d89d481 --- /dev/null +++ b/dark/gtk-4.0/gtk-contained-dark.scss @@ -0,0 +1 @@ +../../light/gtk-4.0/gtk-contained-dark.scss \ No newline at end of file diff --git a/dark/gtk-4.0/gtk-contained.scss b/dark/gtk-4.0/gtk-contained.scss new file mode 100644 index 00000000..4ca3bfd4 --- /dev/null +++ b/dark/gtk-4.0/gtk-contained.scss @@ -0,0 +1,12 @@ +// General guidelines: +// - very unlikely you want to edit something else than _common.scss +// - keep the number of defined colors to a minimum, use the color blending functions if +// you need a subtle shade +// - if you need to inverse a color function use the @if directive to match for dark $variant + +$variant: 'dark'; + +@import 'colors'; +@import 'drawing'; +@import 'common'; +@import 'colors-public'; diff --git a/dark/gtk-4.0/gtk-dark.scss b/dark/gtk-4.0/gtk-dark.scss new file mode 120000 index 00000000..6c18bfa7 --- /dev/null +++ b/dark/gtk-4.0/gtk-dark.scss @@ -0,0 +1 @@ +../../light/gtk-4.0/gtk-dark.scss \ No newline at end of file diff --git a/dark/gtk-4.0/gtk.gresource.xml b/dark/gtk-4.0/gtk.gresource.xml new file mode 120000 index 00000000..69d0cc25 --- /dev/null +++ b/dark/gtk-4.0/gtk.gresource.xml @@ -0,0 +1 @@ +../../light/gtk-4.0/gtk.gresource.xml \ No newline at end of file diff --git a/dark/gtk-4.0/gtk.scss b/dark/gtk-4.0/gtk.scss new file mode 120000 index 00000000..4f9628ff --- /dev/null +++ b/dark/gtk-4.0/gtk.scss @@ -0,0 +1 @@ +../../light/gtk-4.0/gtk.scss \ No newline at end of file diff --git a/dark/gtk-4.0/meson.build b/dark/gtk-4.0/meson.build new file mode 100644 index 00000000..995f735d --- /dev/null +++ b/dark/gtk-4.0/meson.build @@ -0,0 +1,54 @@ +gtk4_dir = join_paths(theme_path, 'gtk-4.0') + +scss_files = files([ + '_colors-public.scss', + '_colors.scss', + '_common.scss', + '_drawing.scss' +]) + +# +# Installing +# + +install_subdir('assets', install_dir: gtk4_dir) +install_subdir('apps', install_dir: gtk4_dir) + +theme_deps += custom_target('Greybird-Dark', + input: 'gtk-contained.scss', + output: 'gtk.css', + command: [ + sassc, sassc_opts, '@INPUT@', '@OUTPUT@' + ], + depend_files: scss_files, + build_by_default: true, + install: true, + install_dir: gtk4_dir) + +theme_deps += custom_target('Greybird-Dark-Dark', + input: 'gtk-contained-dark.scss', + output: 'gtk-dark.css', + command: [ + sassc, sassc_opts, '@INPUT@', '@OUTPUT@' + ], + depend_files: scss_files, + build_by_default: true, + install: true, + install_dir: gtk4_dir) + +# we're commenting this out because of a meson bug in the version found in Leap +#gtk_dark_gresources = gnome.compile_resources('gtk', 'gtk.gresource.xml', +# source_dir: join_paths(meson.source_root(), 'light/gtk-3.0'), +# install: true, +# gresource_bundle: true, +# install_dir: gtk4_dir) + +gtk_dark_gresources = custom_target('gtk-dark-gresources', + input: 'gtk.gresource.xml', + output: 'gtk.gresource', + command: [ + glib_compile_resources, '@INPUT@', '--target', '@OUTPUT@', '--sourcedir', meson.current_source_dir() + ], + build_by_default: true, + install: true, + install_dir: gtk4_dir) diff --git a/dark/meson.build b/dark/meson.build index d63a9da6..e51c92c0 100644 --- a/dark/meson.build +++ b/dark/meson.build @@ -2,72 +2,10 @@ theme_path = join_paths(get_option('datadir'), 'themes/Greybird-dark') a11y_theme_path = join_paths(get_option('datadir'), 'themes/Greybird-dark-accessibility') compact_theme_path = join_paths(get_option('datadir'), 'themes/Greybird-dark-compact') -# -# GTK+-3.0 Files -# - -scss_files = files([ - 'gtk-3.0/_colors-public.scss', - 'gtk-3.0/_colors.scss', - 'gtk-3.0/_common.scss', - 'gtk-3.0/_drawing.scss', - 'gtk-3.0/_gnome-apps.scss', - 'gtk-3.0/_lightdm-gtk-greeter.scss', - 'gtk-3.0/_others.scss', - 'gtk-3.0/_unity.scss', - 'gtk-3.0/_xfce.scss' -]) - -# -# Installing -# - -# index.theme, always install this install_data('index.theme', install_dir : theme_path) -# gtk3 stuff, also always install this -install_subdir('gtk-3.0/assets', install_dir: theme_path / 'gtk-3.0') -install_subdir('gtk-3.0/apps', install_dir: theme_path / 'gtk-3.0') -install_data('gtk-3.0/settings.ini', install_dir : join_paths(theme_path, 'gtk-3.0')) - -theme_deps += custom_target('Greybird-Dark', - input: 'gtk-3.0/gtk-contained.scss', - output: 'gtk.css', - command: [ - sassc, sassc_opts, '@INPUT@', '@OUTPUT@' - ], - depend_files: scss_files, - build_by_default: true, - install: true, - install_dir: join_paths(theme_path, 'gtk-3.0')) - -theme_deps += custom_target('Greybird-Dark-Dark', - input: 'gtk-3.0/gtk-contained-dark.scss', - output: 'gtk-dark.css', - command: [ - sassc, sassc_opts, '@INPUT@', '@OUTPUT@' - ], - depend_files: scss_files, - build_by_default: true, - install: true, - install_dir: join_paths(theme_path, 'gtk-3.0')) - -# we're commenting this out because of a meson bug in the version found in Leap -#gtk_dark_gresources = gnome.compile_resources('gtk', 'gtk-3.0/gtk.gresource.xml', -# source_dir: join_paths(meson.source_root(), 'light/gtk-3.0'), -# install: true, -# gresource_bundle: true, -# install_dir: join_paths(theme_path, 'gtk-3.0')) - -gtk_dark_gresources = custom_target('gtk-dark-gresources', - input: 'gtk-3.0/gtk.gresource.xml', - output: 'gtk.gresource', - command: [ - glib_compile_resources, '@INPUT@', '--target', '@OUTPUT@', '--sourcedir', join_paths(meson.current_source_dir(), 'gtk-3.0') - ], - build_by_default: true, - install: true, - install_dir: join_paths(theme_path, 'gtk-3.0')) +subdir('gtk-3.0') +subdir('gtk-4.0') # we don't want to install these in the flatpak if not get_option('flatpak') diff --git a/light/gtk-4.0/gtk-contained-dark.scss b/light/gtk-4.0/gtk-contained-dark.scss index 1277d416..6e575395 100644 --- a/light/gtk-4.0/gtk-contained-dark.scss +++ b/light/gtk-4.0/gtk-contained-dark.scss @@ -4,4 +4,3 @@ $variant: 'dark'; @import 'drawing'; @import 'common'; @import 'colors-public'; -@import 'gnome-apps'; diff --git a/light/gtk-4.0/settings.ini b/light/gtk-4.0/settings.ini deleted file mode 100644 index 9aa01e55..00000000 --- a/light/gtk-4.0/settings.ini +++ /dev/null @@ -1,3 +0,0 @@ -[Settings] -gtk-auto-mnemonics = 1 -gtk-visible-focus = automatic diff --git a/light/meson.build b/light/meson.build index 1e8c3503..a603a477 100644 --- a/light/meson.build +++ b/light/meson.build @@ -3,13 +3,13 @@ a11y_theme_path = join_paths(get_option('datadir'), 'themes/Greybird-accessibili compact_theme_path = join_paths(get_option('datadir'), 'themes/Greybird-compact') bright_theme_path = join_paths(get_option('datadir'), 'themes/Greybird-bright') +install_data('index.theme', install_dir : theme_path) subdir('gtk-3.0') subdir('gtk-4.0') # we don't want to install these in the flatpak if not get_option('flatpak') - install_data('index.theme', install_dir : theme_path) install_data('Greybird.emerald', install_dir : theme_path) install_subdir('gtk-2.0', install_dir : theme_path) install_subdir('gnome-shell', install_dir : theme_path)