Forráskód Böngészése

rm bottom padding from tabbar and window

siduck76 3 éve
szülő
commit
31deeefe42
2 módosított fájl, 8 hozzáadás és 8 törlés
  1. 2 2
      chadwm/config.def.h
  2. 6 6
      chadwm/dwm.c

+ 2 - 2
chadwm/config.def.h

@@ -19,8 +19,8 @@ static const int showsystray        = 1;     /* 0 means no systray */
 static const int showbar            = 1;        /* 0 means no bar */
 enum showtab_modes { showtab_never, showtab_auto, showtab_nmodes, showtab_always };
 static const int showtab            = showtab_auto;
-static const int toptab             = False;
-static const int topbar             = 1;        /* 0 means bottom bar */
+static const int toptab             = True;
+static const int topbar             = 0;        /* 0 means bottom bar */
 static const int vertpad            = 10;       /* vertical padding of bar */
 static const int sidepad            = 10;       /* horizontal padding of bar */
 static const int horizpadbar        = 5;

+ 6 - 6
chadwm/dwm.c

@@ -1421,7 +1421,7 @@ drawtab(Monitor *m) {
 	int i;
         char *btn_prev = "";
 	char *btn_next = "";
-	char *btn_close = "";
+	char *btn_close = " ";
 	int buttons_w = 0;
 	int sorted_label_widths[MAXTABS];
 	int tot_width = 0;
@@ -2743,9 +2743,9 @@ void updatebarpos(Monitor *m) {
   m->wh = m->wh - vertpad - bh;
   m->by = m->topbar ? m->wy + vertpad : m->wy + m->wh;
   if (m->topbar)
-	m->wy += bh + vp;
+    	m->wy += bh + vertpad;
   } else
-    m->by = -bh - vp;
+        m->by = -bh - vertpad;
   	
   for(c = m->clients; c; c = c->next) {
 		if(ISVISIBLE(c)) ++nvis;
@@ -2753,10 +2753,10 @@ void updatebarpos(Monitor *m) {
 
   if(m->showtab == showtab_always
 	   || ((m->showtab == showtab_auto) && (nvis > 1) && (m->lt[m->sellt]->arrange == monocle))) {
-          	m->wh -= th + (topbar == toptab ? 0 : vertpad);
-		m->ty = m->toptab ? m->wy + (topbar ? 0 : vertpad) : m->wy + m->wh;
+         	m->wh -= th + ((topbar == toptab && m->showbar) ? 0 : vertpad) - gappov;
+		m->ty = m->toptab ? m->wy + ((topbar && m->showbar) ? 0 : vertpad) : m->wy + m->wh - gappov;
 		if ( m->toptab )
-                  m->wy += th + (topbar ? 0 : vertpad);
+                   m->wy += th + ((topbar && m->showbar) ? 0 : vertpad) - gappov;
 	} else {
             m->ty = -th - vertpad;
    }