Merge branch 'ci-pages' into 'master'

Rename the SCSS files for our themes

Closes #2423

See merge request GNOME/gtk!1423
This commit is contained in:
Matthias Clasen 2020-02-12 22:35:58 +00:00
commit 6c6b3d0d11
8 changed files with 61 additions and 52 deletions

View File

@ -20,8 +20,8 @@ xml += '''
<file>theme/Empty/gtk.css</file> <file>theme/Empty/gtk.css</file>
<file>theme/Adwaita/gtk.css</file> <file>theme/Adwaita/gtk.css</file>
<file>theme/Adwaita/gtk-dark.css</file> <file>theme/Adwaita/gtk-dark.css</file>
<file>theme/Adwaita/gtk-contained.css</file> <file alias='theme/Adwaita/gtk-contained.css'>theme/Adwaita/Adwaita.css</file>
<file>theme/Adwaita/gtk-contained-dark.css</file> <file alias='theme/Adwaita/gtk-contained-dark.css'>theme/Adwaita/Adwaita-dark.css</file>
''' '''
for f in get_files('theme/Adwaita/assets', '.png'): for f in get_files('theme/Adwaita/assets', '.png'):
@ -35,8 +35,8 @@ for f in get_files('theme/Adwaita/assets', '.svg'):
xml += ''' xml += '''
<file>theme/HighContrast/gtk.css</file> <file>theme/HighContrast/gtk.css</file>
<file alias='theme/HighContrastInverse/gtk.css'>theme/HighContrast/gtk-inverse.css</file> <file alias='theme/HighContrastInverse/gtk.css'>theme/HighContrast/gtk-inverse.css</file>
<file>theme/HighContrast/gtk-contained.css</file> <file alias='theme/HighContrast/gtk-contained.css'>theme/HighContrast/HighContrast.css</file>
<file>theme/HighContrast/gtk-contained-inverse.css</file> <file alias='theme/HighContrast/gtk-contained-inverse.css'>theme/HighContrast/HighContrast-inverse.css</file>
''' '''
for f in get_files('theme/HighContrast/assets', '.png'): for f in get_files('theme/HighContrast/assets', '.png'):

View File

@ -752,7 +752,6 @@ gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml',
]) ])
# Build the theme files # Build the theme files
theme_deps = []
sassc = find_program('sassc', required: false) sassc = find_program('sassc', required: false)
if not sassc.found() if not sassc.found()
subproject('sassc') subproject('sassc')
@ -764,16 +763,22 @@ sassc_opts = [ '-a', '-M', '-t', 'compact' ]
subdir('theme/Adwaita') subdir('theme/Adwaita')
subdir('theme/HighContrast') subdir('theme/HighContrast')
theme_deps = [
adwaita_theme_deps,
hc_theme_deps,
]
gtkresources = gnome.compile_resources('gtkresources', gtkresources = gnome.compile_resources('gtkresources',
gtk_gresources_xml, gtk_gresources_xml,
dependencies: theme_deps, dependencies: theme_deps,
source_dir: [ source_dir: [
# List in order of preference # List in order of preference
meson.current_build_dir(), meson.current_build_dir(),
meson.current_source_dir(), meson.current_source_dir(),
], ],
c_name: '_gtk', c_name: '_gtk',
extra_args: '--manual-register') extra_args: '--manual-register',
)
gtk_x11_sources = files([ gtk_x11_sources = files([
'gtkapplication-x11.c', 'gtkapplication-x11.c',

View File

@ -1,30 +1,32 @@
scss_files = files([ adwaita_scss_files = files([
'_colors-public.scss', '_colors-public.scss',
'_colors.scss', '_colors.scss',
'_common.scss', '_common.scss',
'_drawing.scss', '_drawing.scss',
]) ])
theme_variants = [ adwaita_theme_variants = [
'dark', 'dark',
] ]
theme_deps += custom_target('Adwaita', adwaita_theme_deps = [
input: 'gtk-contained.scss', custom_target('Adwaita theme',
output: 'gtk-contained.css', input: 'Adwaita.scss',
command: [ output: 'Adwaita.css',
sassc, sassc_opts, '@INPUT@', '@OUTPUT@', command: [
], sassc, sassc_opts, '@INPUT@', '@OUTPUT@',
depend_files: scss_files, ],
build_by_default: true) depend_files: adwaita_scss_files,
),
]
foreach variant: theme_variants foreach variant: adwaita_theme_variants
theme_deps += custom_target('Adwaita-' + variant, adwaita_theme_deps += custom_target('Adwaita theme variant: ' + variant,
input: 'gtk-contained-@0@.scss'.format(variant), input: 'Adwaita-@0@.scss'.format(variant),
output: 'gtk-contained-@0@.css'.format(variant), output: 'Adwaita-@0@.css'.format(variant),
command: [ command: [
sassc, sassc_opts, '@INPUT@', '@OUTPUT@', sassc, sassc_opts, '@INPUT@', '@OUTPUT@',
], ],
depend_files: scss_files, depend_files: adwaita_scss_files,
build_by_default: true) )
endforeach endforeach

View File

@ -1,29 +1,31 @@
scss_files = files([ hc_scss_files = files([
'_colors.scss', '_colors.scss',
'_common.scss', '_common.scss',
'_drawing.scss', '_drawing.scss',
]) ])
theme_variants = [ hc_theme_variants = [
'inverse', 'inverse',
] ]
theme_deps += custom_target('HighContrast', hc_theme_deps = [
input: 'gtk-contained.scss', custom_target('HighContrast theme',
output: 'gtk-contained.css', input: 'HighContrast.scss',
command: [ output: 'HighContrast.css',
sassc, sassc_opts, '@INPUT@', '@OUTPUT@', command: [
], sassc, sassc_opts, '@INPUT@', '@OUTPUT@',
depend_files: scss_files, ],
build_by_default: true) depend_files: hc_scss_files,
)
]
foreach variant: theme_variants foreach variant: hc_theme_variants
theme_deps += custom_target('HighContrast-' + variant, hc_theme_deps += custom_target('HighContrast theme variant: ' + variant,
input: 'gtk-contained-@0@.scss'.format(variant), input: 'HighContrast-@0@.scss'.format(variant),
output: 'gtk-contained-@0@.css'.format(variant), output: 'HighContrast-@0@.css'.format(variant),
command: [ command: [
sassc, sassc_opts, '@INPUT@', '@OUTPUT@', sassc, sassc_opts, '@INPUT@', '@OUTPUT@',
], ],
depend_files: scss_files, depend_files: hc_scss_files,
build_by_default: true) )
endforeach endforeach