Various style related changes.
authorMikael Magnusson <mikachu@comhem.se>
Mon, 23 Jul 2007 23:48:34 +0000 (01:48 +0200)
committerMikael Magnusson <mikachu@gmail.com>
Sat, 11 Oct 2014 00:17:20 +0000 (02:17 +0200)
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

obrender/font.c
obrender/theme.c
openbox/focus_cycle_indicator.c
openbox/menuframe.c
openbox/screen.c

index a22e23f50b1d9f19be1dfe2a32c14f4dd738aaec..2462f5a4ad57ab5b9a87731c764ff4941673e46d 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 7cdf29f22e242fa7bbd927293bc74c39ea121157..efec1838f34721ace3971b3781053783e8d08578 100644 (file)
@@ -1562,7 +1562,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
index 895279037eb2fce32d1e13c6d9636cfb5fd92c20..82d2111120253a4b3a57997251f94ad18fb7fd0b 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 c390c0784c9f64e6343c10dffdfe2d0b584ddc1c..a6da628566259475c9fffa864f6e6b9365b537b6 100644 (file)
@@ -30,7 +30,7 @@
 #include "obt/keyboard.h"
 #include "obrender/theme.h"
 
-#define PADDING 2
+#define PADDING 0
 #define MAX_MENU_WIDTH 400
 
 #define ITEM_HEIGHT (ob_rr_theme->menu_font_height + 2*PADDING)
@@ -809,6 +809,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 e758ada1c5207f2abd82fd2e94351ea61d2d89e5..7444a692c5306c7ac4b15d3a83a7bd49e1b5035c 100644 (file)
@@ -1880,7 +1880,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));