aboutsummaryrefslogtreecommitdiffstats
path: root/default-plugins/session-manager/src/main.rs
diff options
context:
space:
mode:
authorDaniel Jankowski <Daniel.Jankowski@rub.de>2024-10-24 18:21:44 +0200
committerGitHub <noreply@github.com>2024-10-24 18:21:44 +0200
commit0cd6d5f4e5e7afcdd25cc45aaeeb80161498e322 (patch)
treef72011676c902a37828beee75f3d6e85a50124e4 /default-plugins/session-manager/src/main.rs
parentdocs(changelog): suspend commands in remote layouts (diff)
downloadsl0ppij-0cd6d5f4e5e7afcdd25cc45aaeeb80161498e322.tar.gz
sl0ppij-0cd6d5f4e5e7afcdd25cc45aaeeb80161498e322.tar.xz
sl0ppij-0cd6d5f4e5e7afcdd25cc45aaeeb80161498e322.zip
feat(plugins): add configurable black background for ui components (#3681)
* feat(plugins): add transparent background for text and nested_list * chore: fix formatting issue * feat: invert flag behaviour * feat: implement bg_black handling for table cells * fix: order of selected and bg_black in protocol * chore: rename from bg_black to opaque * fix: explicit selected, if opaque and selected for text * chore: fix formatting issues * feat: opaque tab-bar * feat: opaque session-manager bars * feat: opaque ribbon in plugin manager * feat: opaque one-line ui * feat: opaque tab-bar in configuration plugin
Diffstat (limited to 'default-plugins/session-manager/src/main.rs')
-rw-r--r--default-plugins/session-manager/src/main.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/default-plugins/session-manager/src/main.rs b/default-plugins/session-manager/src/main.rs
index 9aebb6df..3d4848af 100644
--- a/default-plugins/session-manager/src/main.rs
+++ b/default-plugins/session-manager/src/main.rs
@@ -122,10 +122,21 @@ impl ZellijPlugin for State {
fn render(&mut self, rows: usize, cols: usize) {
let (x, y, width, height) = self.main_menu_size(rows, cols);
+ let background = match self.colors.palette.theme_hue {
+ ThemeHue::Dark => self.colors.palette.black,
+ ThemeHue::Light => self.colors.palette.white,
+ };
+
if self.is_welcome_screen {
render_banner(x, 0, rows.saturating_sub(height), width);
}
- render_screen_toggle(self.active_screen, x, y, width.saturating_sub(2));
+ render_screen_toggle(
+ self.active_screen,
+ x,
+ y,
+ width.saturating_sub(2),
+ &background,
+ );
match self.active_screen {
ActiveScreen::NewSession => {