sargon/trayer-srg

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

http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=blob;f=x11-misc/trayer-srg/files/trayer-srg-1.1.2-panel_height.patch;h=a5d87cbf15a200394b4649348183603c18cb1ef1;hb=99bce18f66447dd744e3842af278c9d7b7a5dc39

--- 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);