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

View File

@ -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',

View File

@ -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

View File

@ -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