diff --git a/gtk/gen-gtk-gresources-xml.py b/gtk/gen-gtk-gresources-xml.py index 95bccf9268..9f3ea374ef 100644 --- a/gtk/gen-gtk-gresources-xml.py +++ b/gtk/gen-gtk-gresources-xml.py @@ -20,8 +20,8 @@ xml += ''' theme/Empty/gtk.css theme/Adwaita/gtk.css theme/Adwaita/gtk-dark.css - theme/Adwaita/gtk-contained.css - theme/Adwaita/gtk-contained-dark.css + theme/Adwaita/Adwaita.css + theme/Adwaita/Adwaita-dark.css ''' for f in get_files('theme/Adwaita/assets', '.png'): @@ -35,8 +35,8 @@ for f in get_files('theme/Adwaita/assets', '.svg'): xml += ''' theme/HighContrast/gtk.css theme/HighContrast/gtk-inverse.css - theme/HighContrast/gtk-contained.css - theme/HighContrast/gtk-contained-inverse.css + theme/HighContrast/HighContrast.css + theme/HighContrast/HighContrast-inverse.css ''' for f in get_files('theme/HighContrast/assets', '.png'): diff --git a/gtk/meson.build b/gtk/meson.build index 52badca381..b57a7e33ad 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -752,7 +752,6 @@ gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml', ]) # Build the theme files -theme_deps = [] sassc = find_program('sassc', required: false) if not sassc.found() subproject('sassc') @@ -764,16 +763,22 @@ sassc_opts = [ '-a', '-M', '-t', 'compact' ] subdir('theme/Adwaita') subdir('theme/HighContrast') +theme_deps = [ + adwaita_theme_deps, + hc_theme_deps, +] + gtkresources = gnome.compile_resources('gtkresources', - gtk_gresources_xml, - dependencies: theme_deps, - source_dir: [ - # List in order of preference - meson.current_build_dir(), - meson.current_source_dir(), - ], - c_name: '_gtk', - extra_args: '--manual-register') + gtk_gresources_xml, + dependencies: theme_deps, + source_dir: [ + # List in order of preference + meson.current_build_dir(), + meson.current_source_dir(), + ], + c_name: '_gtk', + extra_args: '--manual-register', +) gtk_x11_sources = files([ 'gtkapplication-x11.c', diff --git a/gtk/theme/Adwaita/gtk-contained-dark.scss b/gtk/theme/Adwaita/Adwaita-dark.scss similarity index 100% rename from gtk/theme/Adwaita/gtk-contained-dark.scss rename to gtk/theme/Adwaita/Adwaita-dark.scss diff --git a/gtk/theme/Adwaita/gtk-contained.scss b/gtk/theme/Adwaita/Adwaita.scss similarity index 100% rename from gtk/theme/Adwaita/gtk-contained.scss rename to gtk/theme/Adwaita/Adwaita.scss diff --git a/gtk/theme/Adwaita/meson.build b/gtk/theme/Adwaita/meson.build index 7a799f947d..c829c9126a 100644 --- a/gtk/theme/Adwaita/meson.build +++ b/gtk/theme/Adwaita/meson.build @@ -1,30 +1,32 @@ -scss_files = files([ +adwaita_scss_files = files([ '_colors-public.scss', '_colors.scss', '_common.scss', '_drawing.scss', ]) -theme_variants = [ +adwaita_theme_variants = [ 'dark', ] -theme_deps += custom_target('Adwaita', - input: 'gtk-contained.scss', - output: 'gtk-contained.css', - command: [ - sassc, sassc_opts, '@INPUT@', '@OUTPUT@', - ], - depend_files: scss_files, - build_by_default: true) +adwaita_theme_deps = [ + custom_target('Adwaita theme', + input: 'Adwaita.scss', + output: 'Adwaita.css', + command: [ + sassc, sassc_opts, '@INPUT@', '@OUTPUT@', + ], + depend_files: adwaita_scss_files, + ), +] -foreach variant: theme_variants - theme_deps += custom_target('Adwaita-' + variant, - input: 'gtk-contained-@0@.scss'.format(variant), - output: 'gtk-contained-@0@.css'.format(variant), - command: [ - sassc, sassc_opts, '@INPUT@', '@OUTPUT@', - ], - depend_files: scss_files, - build_by_default: true) +foreach variant: adwaita_theme_variants + adwaita_theme_deps += custom_target('Adwaita theme variant: ' + variant, + input: 'Adwaita-@0@.scss'.format(variant), + output: 'Adwaita-@0@.css'.format(variant), + command: [ + sassc, sassc_opts, '@INPUT@', '@OUTPUT@', + ], + depend_files: adwaita_scss_files, + ) endforeach diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.scss b/gtk/theme/HighContrast/HighContrast-inverse.scss similarity index 100% rename from gtk/theme/HighContrast/gtk-contained-inverse.scss rename to gtk/theme/HighContrast/HighContrast-inverse.scss diff --git a/gtk/theme/HighContrast/gtk-contained.scss b/gtk/theme/HighContrast/HighContrast.scss similarity index 100% rename from gtk/theme/HighContrast/gtk-contained.scss rename to gtk/theme/HighContrast/HighContrast.scss diff --git a/gtk/theme/HighContrast/meson.build b/gtk/theme/HighContrast/meson.build index f3230353ef..da81db45c5 100644 --- a/gtk/theme/HighContrast/meson.build +++ b/gtk/theme/HighContrast/meson.build @@ -1,29 +1,31 @@ -scss_files = files([ +hc_scss_files = files([ '_colors.scss', '_common.scss', '_drawing.scss', ]) -theme_variants = [ +hc_theme_variants = [ 'inverse', ] -theme_deps += custom_target('HighContrast', - input: 'gtk-contained.scss', - output: 'gtk-contained.css', - command: [ - sassc, sassc_opts, '@INPUT@', '@OUTPUT@', - ], - depend_files: scss_files, - build_by_default: true) +hc_theme_deps = [ + custom_target('HighContrast theme', + input: 'HighContrast.scss', + output: 'HighContrast.css', + command: [ + sassc, sassc_opts, '@INPUT@', '@OUTPUT@', + ], + depend_files: hc_scss_files, + ) +] -foreach variant: theme_variants - theme_deps += custom_target('HighContrast-' + variant, - input: 'gtk-contained-@0@.scss'.format(variant), - output: 'gtk-contained-@0@.css'.format(variant), - command: [ - sassc, sassc_opts, '@INPUT@', '@OUTPUT@', - ], - depend_files: scss_files, - build_by_default: true) +foreach variant: hc_theme_variants + hc_theme_deps += custom_target('HighContrast theme variant: ' + variant, + input: 'HighContrast-@0@.scss'.format(variant), + output: 'HighContrast-@0@.css'.format(variant), + command: [ + sassc, sassc_opts, '@INPUT@', '@OUTPUT@', + ], + depend_files: hc_scss_files, + ) endforeach