]> Dogcows Code - chaz/openbox/commitdiff
remove the title separator width thing.
authorDana Jansens <danakj@orodu.net>
Sat, 2 Jun 2007 21:19:49 +0000 (21:19 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 2 Jun 2007 21:19:49 +0000 (21:19 +0000)
add a separate color for the title separator

openbox/frame.c
openbox/framerender.c
render/theme.c
render/theme.h

index 6ca718c8e3f5a297d2f0d1ffe3aa153ba2108214..8ce2a16d9bbaa4e194e637704c68b4629304ca7a 100644 (file)
@@ -365,7 +365,7 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
                   self->cbwidth_b + (!self->max_horz || !self->max_vert ? self->bwidth : 0));
 
         if (self->decorations & OB_FRAME_DECOR_TITLEBAR)
-            self->size.top += ob_rr_theme->title_height + ob_rr_theme->tswidth;
+            self->size.top += ob_rr_theme->title_height + self->bwidth;
         if (self->decorations & OB_FRAME_DECOR_HANDLE &&
             ob_rr_theme->handle_height > 0)
         {
@@ -468,14 +468,12 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
                 XMapWindow(ob_display, self->titletopleft);
                 XMapWindow(ob_display, self->titletopright);
 
-                if (self->decorations & OB_FRAME_DECOR_TITLEBAR &&
-                    ob_rr_theme->tswidth)
-                {
+                if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
                     XMoveResizeWindow(ob_display, self->titlebottom,
                                       self->bwidth,
                                       ob_rr_theme->title_height + self->bwidth,
                                       self->width,
-                                      ob_rr_theme->tswidth);
+                                      self->bwidth);
 
                     XMapWindow(ob_display, self->titlebottom);
                 } else
index 2fec1a55d6c5e640b880f5754431114f89a8842d..f122eef87d038e11b0493d0bcb45e420639cf41a 100644 (file)
@@ -71,8 +71,6 @@ void framerender_frame(ObFrame *self)
         XClearWindow(ob_display, self->titletopright);
         XSetWindowBackground(ob_display, self->titleright, px);
         XClearWindow(ob_display, self->titleright);
-        XSetWindowBackground(ob_display, self->titlebottom, px);
-        XClearWindow(ob_display, self->titlebottom);
 
         XSetWindowBackground(ob_display, self->handleleft, px);
         XClearWindow(ob_display, self->handleleft);
@@ -96,6 +94,13 @@ void framerender_frame(ObFrame *self)
         XClearWindow(ob_display, self->rgriptop);
         XSetWindowBackground(ob_display, self->rgripbottom, px);
         XClearWindow(ob_display, self->rgripbottom);
+
+        px = (self->focused ?
+              RrColorPixel(ob_rr_theme->title_separator_focused_color) :
+              RrColorPixel(ob_rr_theme->title_separator_unfocused_color));
+
+        XSetWindowBackground(ob_display, self->titlebottom, px);
+        XClearWindow(ob_display, self->titlebottom);
     }
 
     if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
index cdddba169f2ba47280df6c3a8f6f55063ed15038..3e0f9d13d3cb9f49388212a422fc52c42f6413e1 100644 (file)
@@ -207,7 +207,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
     if (!FIND(int, L("dimensions","window","border"),
               &theme->fbwidth, 0, 100))
         theme->fbwidth = 1;
-    theme->tswidth = theme->fbwidth;
 
     /* menu border width inherits from frame border width */
     if (!FIND(int, L("dimensions","menu","border"),
@@ -222,6 +221,13 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
     if (!FIND(color, L("window","active","border"),
               &theme->frame_focused_border_color, NULL))
         theme->frame_focused_border_color = RrColorNew(inst, 0, 0, 0);
+    /* title separator focused color inherits from focused boder color */
+    if (!FIND(color, L("window","active","titleseparator"),
+              &theme->title_separator_focused_color, NULL))
+        theme->title_separator_focused_color =
+            RrColorNew(inst, theme->frame_focused_border_color->r,
+                       theme->frame_focused_border_color->g,
+                       theme->frame_focused_border_color->b);
     /* frame unfocused border color inherits from frame focused border color */
     if (!FIND(color, L("window","inactive","border"),
               &theme->frame_unfocused_border_color, NULL))
@@ -230,6 +236,13 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
                        theme->frame_focused_border_color->r,
                        theme->frame_focused_border_color->g,
                        theme->frame_focused_border_color->b);
+    /* title separator unfocused color inherits from unfocused boder color */
+    if (!FIND(color, L("window","inactive","titleseparator"),
+              &theme->title_separator_unfocused_color, NULL))
+        theme->title_separator_unfocused_color =
+            RrColorNew(inst, theme->frame_unfocused_border_color->r,
+                       theme->frame_unfocused_border_color->g,
+                       theme->frame_unfocused_border_color->b);
 
     /* menu border color inherits from frame focused border color */
     if (!FIND(color, L("menu","border"),
index 64c3abcf9e354af146e73f4c4a1b385028e5d708..e02a69e2a5a4a57cfdb50daed573f4b9823abefe 100644 (file)
@@ -41,8 +41,6 @@ struct _RrTheme {
     gint paddingy;
     gint handle_height;
     gint fbwidth; /*!< frame border width */
-    gint tswidth; /*!< title separator width - between the titlebar and the
-                    client */
     gint mbwidth; /*!< menu border width */
     gint cbwidthx;
     gint cbwidthy;
@@ -62,6 +60,8 @@ struct _RrTheme {
     RrColor *menu_border_color;
     RrColor *frame_focused_border_color;
     RrColor *frame_unfocused_border_color;
+    RrColor *title_separator_focused_color;
+    RrColor *title_separator_unfocused_color;
     RrColor *cb_focused_color;
     RrColor *cb_unfocused_color;
     RrColor *title_focused_color;
This page took 0.030971 seconds and 4 git commands to generate.