Various style related changes.
authorMikael Magnusson <mikachu@comhem.se>
Mon, 23 Jul 2007 23:48:34 +0000 (01:48 +0200)
committerMikael Magnusson <mikachu@comhem.se>
Thu, 28 Feb 2008 03:35:29 +0000 (04:35 +0100)
This includes:
  Not forcing an even label_height
  Changing the cursor to BUSY (from BUSYPOINTER)
  Making the label area in the dirfocus popup different
  No menu item padding
  Nice blue colors for the focus cycle indicator
  Not making shadows increase text boundaries

openbox/focus_cycle_indicator.c
openbox/menuframe.c
openbox/popup.c
openbox/screen.c
render/font.c
render/theme.c

index 495a72305be16d2d86d1fe738e4015b2e13b46eb..bcc1f73c8641973c7781947b6d4b97d9973f4d63 100644 (file)
@@ -92,13 +92,13 @@ void focus_cycle_indicator_startup(gboolean reconfig)
     window_add(&focus_indicator.bottom.window,
                INTERNAL_AS_WINDOW(&focus_indicator.bottom));
 
-    color_white = RrColorNew(ob_rr_inst, 0xff, 0xff, 0xff);
+    color_white = RrColorNew(ob_rr_inst, 0x00, 0x00, 0xff);
 
     a_focus_indicator = RrAppearanceNew(ob_rr_inst, 4);
     a_focus_indicator->surface.grad = RR_SURFACE_SOLID;
     a_focus_indicator->surface.relief = RR_RELIEF_FLAT;
     a_focus_indicator->surface.primary = RrColorNew(ob_rr_inst,
-                                                    0, 0, 0);
+                                                    0xA6, 0xCA, 0xF4);
     a_focus_indicator->texture[0].type = RR_TEXTURE_LINE_ART;
     a_focus_indicator->texture[0].data.lineart.color = color_white;
     a_focus_indicator->texture[1].type = RR_TEXTURE_LINE_ART;
index 7b4c872b475b5b30f1ed0964d0758f3bbc70ee92..146c0fa5841c228160691298e278f3151029d32d 100644 (file)
@@ -28,7 +28,7 @@
 #include "obt/prop.h"
 #include "render/theme.h"
 
-#define PADDING 2
+#define PADDING 0
 #define MAX_MENU_WIDTH 400
 
 #define ITEM_HEIGHT (ob_rr_theme->menu_font_height + 2*PADDING)
@@ -758,6 +758,8 @@ void menu_frame_render(ObMenuFrame *self)
         h += th;
     }
 
+    w += 20;
+
     /* if the last entry is a labeled separator, then make its border
        overlap with the menu's outside border */
     it = g_list_last(self->entries);
index fd31846eb8c309b65f3ef2939a54472cad794761..f5ee7c424e3615d3b80c4e0290008712e694f872 100644 (file)
@@ -179,9 +179,15 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
 
     /* get the height, which is also used for the icon width */
     emptyy = t + b + ob_rr_theme->paddingy * 2;
-    if (self->h)
-        texth = self->h - emptyy;
-    h = texth * self->iconhm + emptyy;
+    if (self->hasicon) {
+        if (self->h)
+            h = self->h - emptyy;
+        h = h * self->iconhm + emptyy;
+    } else {
+        if (self->h)
+            texth = self->h - emptyy;
+        h = texth * self->iconhm + emptyy;
+    }
 
     if (self->textw)
         textw = self->textw;
@@ -190,8 +196,8 @@ void popup_delay_show(ObPopup *self, gulong usec, gchar *text)
 
     emptyx = l + r + ob_rr_theme->paddingx * 2;
     if (self->hasicon) {
-        iconw = texth * self->iconwm;
-        iconh = texth * self->iconhm;
+        iconw = h * self->iconwm;
+        iconh = h * self->iconhm;
         textx += iconw + ob_rr_theme->paddingx;
         if (textw)
             emptyx += ob_rr_theme->paddingx; /* between the icon and text */
index 221e338d0dded4a154de31c83970d2d16c63671f..888ff437f8fdca27848fbe78fae6a4e37de0a2ad 100644 (file)
@@ -1702,7 +1702,7 @@ void screen_set_root_cursor(void)
 {
     if (sn_app_starting())
         XDefineCursor(obt_display, obt_root(ob_screen),
-                      ob_cursor(OB_CURSOR_BUSYPOINTER));
+                      ob_cursor(OB_CURSOR_BUSY));
     else
         XDefineCursor(obt_display, obt_root(ob_screen),
                       ob_cursor(OB_CURSOR_POINTER));
index 583c9f7d7af277b2986429a4036fabc38500f907..10df5e090c49c381266fec2d40d500c16e610321 100644 (file)
@@ -169,8 +169,8 @@ static void font_measure_full(const RrFont *f, const gchar *str,
     rect.width = (rect.width + PANGO_SCALE - 1) / PANGO_SCALE;
     rect.height = (rect.height + PANGO_SCALE - 1) / PANGO_SCALE;
 #endif
-    *x = rect.width + ABS(shadow_x) + 4 /* we put a 2 px edge on each side */;
-    *y = rect.height + ABS(shadow_y);
+    *x = rect.width + /* ABS(shadow_x) +*/ 4 /* we put a 2 px edge on each side */;
+    *y = rect.height /*+ ABS(shadow_y) */;
 }
 
 RrSize *RrFontMeasureString(const RrFont *f, const gchar *str,
@@ -189,7 +189,7 @@ RrSize *RrFontMeasureString(const RrFont *f, const gchar *str,
 
 gint RrFontHeight(const RrFont *f, gint shadow_y)
 {
-    return (f->ascent + f->descent) / PANGO_SCALE + ABS(shadow_y);
+    return (f->ascent + f->descent) / PANGO_SCALE + 0-1;//ABS(shadow_y);
 }
 
 static inline int font_calculate_baseline(RrFont *f, gint height)
index cb0b16c3abc6eaaad9a4062f9c8455c28779c40b..5d5427b501e0463986ee71dc28e98b8215a33846 100644 (file)
@@ -1383,7 +1383,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name,
         RrMargins(theme->a_focused_label, &fl, &ft, &fr, &fb);
         RrMargins(theme->a_unfocused_label, &ul, &ut, &ur, &ub);
         theme->label_height = theme->win_font_height + MAX(ft + fb, ut + ub);
-        theme->label_height += theme->label_height % 2;
 
         /* this would be nice I think, since padding.width can now be 0,
            but it breaks frame.c horribly and I don't feel like fixing that