Reduce minimal panel height and add warnings (PANEL_HEIGHT_MIN)
Closed this issue · 0 comments
xmw commented
PANEL_HEIGHT_MIN is set to 16 in panel.h and overrides command line args w/o notification.
Some users like smaller setups like 13 or 10 pixel in height.
Please consider using this patch
--- trayer-srg-1.1.2/panel.h
+++ trayer-srg-1.1.2/panel.h
@@ -18,7 +18,7 @@
#define PANEL_HEIGHT_DEFAULT 26
#define PANEL_HEIGHT_MAX 200
-#define PANEL_HEIGHT_MIN 16
+#define PANEL_HEIGHT_MIN 2
typedef struct {
--- trayer-srg-1.1.2/panel.c
+++ trayer-srg-1.1.2/panel.c
@@ -337,10 +337,13 @@
p->width = 100;
p->heighttype = HEIGHT_PIXEL;
if (p->heighttype == HEIGHT_PIXEL) {
-
if (p->height < PANEL_HEIGHT_MIN)
-
if (p->height < PANEL_HEIGHT_MIN) {
-
ERR( "height is bound by %i pixels\n", PANEL_HEIGHT_MIN ); p->height = PANEL_HEIGHT_MIN;
-
else if (p->height > PANEL_HEIGHT_MAX)
- } else if (p->height > PANEL_HEIGHT_MAX) {
-
ERR( "height is bound by %i pixels\n", PANEL_HEIGHT_MAX ); p->height = PANEL_HEIGHT_MAX;
- }
}
panel_start_gui(p);
RET(1);