Skip to content

Commit 4b620e4

Browse files
committed
Restore Dark
1 parent 87ea291 commit 4b620e4

16 files changed

+60
-1
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
theme_dir="${MESON_INSTALL_DESTDIR_PREFIX}/$1"
5+
project_name="$2"
6+
7+
cd "$3"
8+
9+
install -m755 -d "${theme_dir}"
10+
for ver in gtk-3.0; do
11+
install -m755 -d "${theme_dir}/${ver}"
12+
ln -sf "../../${project_name}/${ver}/gtk-dark.css" "${theme_dir}/${ver}/gtk.css"
13+
cp -r "${project_name}/${ver}/gtk-dark.css" "${theme_dir}/${ver}/gtk-dark.css"
14+
done

Helium-dark/gtk-3.0/meson.build

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
meson.add_install_script('install-dark-theme.sh', theme_dir, meson.project_name(), meson.project_build_root())
2+
gtk3_dark_dir = join_paths(theme_dir, 'gtk-3.0')
Loading
Loading
268 Bytes
Loading
Loading
Loading
369 Bytes
Loading
Loading
Loading
183 Bytes
Loading
Loading
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
theme_dir="${MESON_INSTALL_DESTDIR_PREFIX}/$1"
5+
project_name="$2"
6+
7+
cd "$3"
8+
9+
install -m755 -d "${theme_dir}"
10+
for ver in gtk-4.0; do
11+
install -m755 -d "${theme_dir}/${ver}"
12+
ln -sf "../../${project_name}/${ver}/gtk-dark.css" "${theme_dir}/${ver}/gtk.css"
13+
ln -sf "../../${project_name}/${ver}/assets" "${theme_dir}/${ver}/assets"
14+
# For the new dark theme switcher in GNOME 42+
15+
cp -r "${project_name}/${ver}/gtk-dark.css" "${theme_dir}/${ver}/gtk-dark.css"
16+
done

Helium-dark/gtk-4.0/meson.build

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# CSS and assets are just symlinks to the light themes as they are not modified
2+
meson.add_install_script('install-dark-theme.sh', theme_dir, meson.project_name(), meson.project_build_root())

Helium-dark/meson.build

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
theme_dir = join_paths(get_option('datadir'), 'themes', meson.project_name()+'-dark')
2+
3+
conf_data = configuration_data()
4+
conf_data.set('ThemeName', meson.project_name())
5+
conf_data.set('VariantThemeName', meson.project_name()+'-dark')
6+
configure_file(input : '../index.theme.in',
7+
output : 'index.theme',
8+
configuration : conf_data,
9+
install_dir: theme_dir)
10+
11+
if get_option('gtk3')
12+
subdir('gtk-3.0')
13+
endif
14+
15+
if get_option('gtk4')
16+
subdir('gtk-4.0')
17+
endif

meson.build

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ project('Helium',
55

66
sass = find_program('sass')
77

8-
subdir('Helium')
8+
subdir('Helium')
9+
10+
if get_option('dark')
11+
subdir('Helium-dark')
12+
endif

0 commit comments

Comments
 (0)