From 43fcfa22709b68800ec29d0d6e239c68003eaa69 Mon Sep 17 00:00:00 2001 From: rc-05 Date: Sat, 26 Oct 2024 18:25:12 +0200 Subject: [PATCH 1/3] Added opaque panel mode for light theme Added the possibility of setting the xfce panel to be transparent or opaque at build time. --- light/gtk-3.0/_xfce.scss | 3 ++- meson.build | 9 ++++++++- meson_options.txt | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/light/gtk-3.0/_xfce.scss b/light/gtk-3.0/_xfce.scss index 2b03604f..c7625f68 100644 --- a/light/gtk-3.0/_xfce.scss +++ b/light/gtk-3.0/_xfce.scss @@ -1,4 +1,5 @@ $variant: 'light'; +$opaque_panel: false; @import 'colors'; @@ -13,7 +14,7 @@ $variant: 'light'; } .xfce4-panel.background { - background-color: rgba(36, 36, 36, 0.8); + background-color: rgba(36, 36, 36, if($opaque_panel, 1, 0.8)); color: $panel_fg_color; font-weight: normal; button { diff --git a/meson.build b/meson.build index c0d6a59a..6fb9c3ba 100644 --- a/meson.build +++ b/meson.build @@ -22,4 +22,11 @@ if get_option('flatpak') else subdir('light') subdir('dark') -endif \ No newline at end of file +endif + +if get_option('opaque-panel-light-theme') + run_command('sed', '-i', '"s/\$opaque_panel: false;/\$opaque_panel: true;/"', 'light/gtk-3.0/_xfce.scss') + message('Panel transparency with light theme: opaque') +else + message('Panel transparency with light theme: semi-transparent') +endif diff --git a/meson_options.txt b/meson_options.txt index b10157b5..e04682b5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ option('generate_sourcemaps', type: 'boolean', value: false) option('flatpak', type: 'boolean', value: false) -option('flatpak-variant', type: 'combo', choices : ['light', 'dark'], value: 'light') \ No newline at end of file +option('flatpak-variant', type: 'combo', choices : ['light', 'dark'], value: 'light') +option('opaque-panel-light-theme', type: 'boolean', value: false) From f287ba899698314b1da205f5fb01f57f1192fc52 Mon Sep 17 00:00:00 2001 From: rc-05 Date: Sat, 26 Oct 2024 18:25:12 +0200 Subject: [PATCH 2/3] Added opaque panel mode for light theme Added the possibility of setting the xfce panel to be transparent or opaque at build time. --- light/gtk-3.0/_xfce.scss | 3 ++- meson.build | 9 ++++++++- meson_options.txt | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/light/gtk-3.0/_xfce.scss b/light/gtk-3.0/_xfce.scss index 2b03604f..c7625f68 100644 --- a/light/gtk-3.0/_xfce.scss +++ b/light/gtk-3.0/_xfce.scss @@ -1,4 +1,5 @@ $variant: 'light'; +$opaque_panel: false; @import 'colors'; @@ -13,7 +14,7 @@ $variant: 'light'; } .xfce4-panel.background { - background-color: rgba(36, 36, 36, 0.8); + background-color: rgba(36, 36, 36, if($opaque_panel, 1, 0.8)); color: $panel_fg_color; font-weight: normal; button { diff --git a/meson.build b/meson.build index c0d6a59a..6fb9c3ba 100644 --- a/meson.build +++ b/meson.build @@ -22,4 +22,11 @@ if get_option('flatpak') else subdir('light') subdir('dark') -endif \ No newline at end of file +endif + +if get_option('opaque-panel-light-theme') + run_command('sed', '-i', '"s/\$opaque_panel: false;/\$opaque_panel: true;/"', 'light/gtk-3.0/_xfce.scss') + message('Panel transparency with light theme: opaque') +else + message('Panel transparency with light theme: semi-transparent') +endif diff --git a/meson_options.txt b/meson_options.txt index b10157b5..e04682b5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ option('generate_sourcemaps', type: 'boolean', value: false) option('flatpak', type: 'boolean', value: false) -option('flatpak-variant', type: 'combo', choices : ['light', 'dark'], value: 'light') \ No newline at end of file +option('flatpak-variant', type: 'combo', choices : ['light', 'dark'], value: 'light') +option('opaque-panel-light-theme', type: 'boolean', value: false) From e61d920ad7cae0557437454bb312b6b54a052e66 Mon Sep 17 00:00:00 2001 From: rc-05 Date: Sat, 26 Oct 2024 18:43:54 +0200 Subject: [PATCH 3/3] Update meson.build --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 6fb9c3ba..c4538e82 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,7 @@ else endif if get_option('opaque-panel-light-theme') - run_command('sed', '-i', '"s/\$opaque_panel: false;/\$opaque_panel: true;/"', 'light/gtk-3.0/_xfce.scss') + run_command('sed', '-i', '"s/\$opaque_panel: false;/\$opaque_panel: true;/"', meson.source_root() + '/light/gtk-3.0/_xfce.scss') message('Panel transparency with light theme: opaque') else message('Panel transparency with light theme: semi-transparent')