bar height

This commit is contained in:
2025-09-29 10:51:21 +02:00
parent 7a6eca395d
commit 0ce3d286e2
5 changed files with 12 additions and 2 deletions

View File

@@ -51,3 +51,4 @@ if app_config is None:
VINYL = app_config.get("vinyl", {"enable": False}) VINYL = app_config.get("vinyl", {"enable": False})
BATTERY = app_config.get("battery", {"enable": False}) BATTERY = app_config.get("battery", {"enable": False})
BAR_HEIGHT = app_config.get("bar_height", 40)

View File

@@ -20,7 +20,7 @@ from fabric.utils import (
) )
from fabric.widgets.circularprogressbar import CircularProgressBar from fabric.widgets.circularprogressbar import CircularProgressBar
from bar.config import VINYL, BATTERY from bar.config import VINYL, BATTERY, BAR_HEIGHT
class StatusBar(Window): class StatusBar(Window):
@@ -132,6 +132,9 @@ class StatusBar(Window):
invoke_repeater(1000, self.update_progress_bars) invoke_repeater(1000, self.update_progress_bars)
# Set the bar height
self.set_size_request(-1, BAR_HEIGHT)
self.show_all() self.show_all()
def update_progress_bars(self): def update_progress_bars(self):

View File

@@ -3,7 +3,6 @@
border-bottom: solid 2px; border-bottom: solid 2px;
border-color: var(--border-color); border-color: var(--border-color);
background-color: var(--window-bg); background-color: var(--window-bg);
min-height: 28px;
} }
#center-container { #center-container {

View File

@@ -1,3 +1,4 @@
bar_height: 42
vinyl: vinyl:
enable: true enable: true
battery: battery:

View File

@@ -82,11 +82,17 @@
default = false; default = false;
}; };
}; };
bar_height = lib.mkOption {
type = lib.types.int;
default = 40;
description = "Height of the status bar in pixels";
};
}; };
}; };
default = { default = {
vinyl.enable = false; vinyl.enable = false;
battery.enable = false; battery.enable = false;
bar_height = 40;
}; };
}; };
}; };