]> Dogcows Code - chaz/openbox/commitdiff
make focus and unfocus fonts for window titles. change 'xftfont' to 'font' in the...
authorDana Jansens <danakj@orodu.net>
Fri, 22 Aug 2003 06:14:20 +0000 (06:14 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 22 Aug 2003 06:14:20 +0000 (06:14 +0000)
render/theme.c
render/theme.h
themes/BBstylE/themerc
themes/I-merry/themerc
themes/Light-Industry-big/themerc
themes/Light-Industry/themerc
themes/Om4Ob/openbox-3/themerc
themes/TheBear/openbox-3/themerc
themes/greenz/themerc
themes/planton/themerc

index 6880f008a44665b691c9f7967d6ab8506e63fe50..71770f8356f9e7cbf95a3fd4b567a2351c7caa20 100644 (file)
@@ -87,14 +87,24 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name)
     }
 
     /* load the font stuff */
-    if (!read_string(db, "window.title.xftfont", &font_str))
+    if (!read_string(db, "window.focus.font", &font_str))
         font_str = "arial,sans:bold:pixelsize=10:shadow=y:shadowtint=50";
 
-    if (!(theme->winfont = RrFontOpen(inst, font_str))) {
+    if (!(theme->winfont_focused = RrFontOpen(inst, font_str))) {
         RrThemeFree(theme);
         return NULL;
     }
-    theme->winfont_height = RrFontHeight(theme->winfont);
+    theme->winfont_height = RrFontHeight(theme->winfont_focused);
+
+    if (!read_string(db, "window.unfocus.font", &font_str))
+        /* font_str will already be set to the last one */;
+
+    if (!(theme->winfont_unfocused = RrFontOpen(inst, font_str))) {
+        RrThemeFree(theme);
+        return NULL;
+    }
+    theme->winfont_height = MAX(theme->winfont_height,
+                                RrFontHeight(theme->winfont_unfocused));
 
     winjust = RR_JUSTIFY_LEFT;
     if (read_string(db, "window.justify", &str)) {
@@ -104,7 +114,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name)
             winjust = RR_JUSTIFY_CENTER;
     }
 
-    if (!read_string(db, "menu.title.xftfont", &font_str))
+    if (!read_string(db, "menu.title.font", &font_str))
         font_str = "arial,sans:bold:pixelsize=12:shadow=y";
 
     if (!(theme->mtitlefont = RrFontOpen(inst, font_str))) {
@@ -121,7 +131,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name)
             mtitlejust = RR_JUSTIFY_CENTER;
     }
 
-    if (!read_string(db, "menu.frame.xftfont", &font_str))
+    if (!read_string(db, "menu.frame.font", &font_str))
         font_str = "arial,sans:bold:pixelsize=11:shadow=y";
 
     if (!(theme->mfont = RrFontOpen(inst, font_str))) {
@@ -606,7 +616,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name)
     theme->a_focused_label->texture[0].data.text.justify = winjust;
     theme->app_hilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
     theme->a_focused_label->texture[0].data.text.font =
-        theme->app_hilite_label->texture[0].data.text.font = theme->winfont;
+        theme->app_hilite_label->texture[0].data.text.font =
+        theme->winfont_focused;
     theme->a_focused_label->texture[0].data.text.color =
         theme->app_hilite_label->texture[0].data.text.color =
         theme->title_focused_color;
@@ -616,7 +627,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name)
     theme->a_unfocused_label->texture[0].data.text.justify = winjust;
     theme->app_unhilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
     theme->a_unfocused_label->texture[0].data.text.font =
-        theme->app_unhilite_label->texture[0].data.text.font = theme->winfont;
+        theme->app_unhilite_label->texture[0].data.text.font =
+        theme->winfont_unfocused;
     theme->a_unfocused_label->texture[0].data.text.color =
         theme->app_unhilite_label->texture[0].data.text.color =
         theme->title_unfocused_color;
@@ -886,7 +898,8 @@ void RrThemeFree(RrTheme *theme)
         RrPixmapMaskFree(theme->close_pressed_mask);
         RrPixmapMaskFree(theme->menu_bullet_mask);
 
-        RrFontClose(theme->winfont);
+        RrFontClose(theme->winfont_focused); 
+        RrFontClose(theme->winfont_unfocused);
         RrFontClose(theme->mtitlefont);
         RrFontClose(theme->mfont);
 
index e425ae2ae40140b996d82f987719057e5cff1041..db5eb3aac5df8097f73df2ffb164219c11120da4 100644 (file)
@@ -46,7 +46,8 @@ struct _RrTheme {
 
     /* style settings - fonts */
     gint winfont_height;
-    RrFont *winfont;
+    RrFont *winfont_focused;
+    RrFont *winfont_unfocused;
     gint mtitlefont_height;
     RrFont *mtitlefont;
     gint mfont_height;
index 99760fc0afeb18b2cea3d524264135ccc457ecbd..3f9bbf785f0012bcc1b9a6b53d1bbfac7055911a 100644 (file)
@@ -138,9 +138,9 @@ rootCommand: wmsetbg /win/lin/lefm.png
 window.title.layout:   ILMC
 
 !! font me!
-window.title.xftfont: Borzoi:pixelsize=10
-menu.frame.xftfont: National First Font:pixelsize=15
-menu.title.xftfont: Borzoi:pixelsize=10
+window.focus.font: Borzoi:pixelsize=10
+menu.frame.font: National First Font:pixelsize=15
+menu.title.font: Borzoi:pixelsize=10
 
 
 
index 93714732564c5b344795a2300c69bd1403f531e4..85833ccc8ed4a3e2ed8c5819483bb4178bc206ce 100644 (file)
@@ -128,6 +128,6 @@ frameWidth: 0
 !! Miscellaneous settings
 borderColor: #222222
 !! font me!
-window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10
-menu.frame.xftfont: National First Font:pixelsize=15
-menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10
+window.focus.font: Bitstream Vera Sans:bold:pixelsize=10
+menu.frame.font: National First Font:pixelsize=15
+menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
index fba750417324e712700edf2603ced8811ba548a2..46b81a231c7e4c778eaa733dafcbcabf968aea79 100644 (file)
@@ -111,8 +111,9 @@ frameWidth: 0
 borderColor: #091d2e
 
 !! font me!
-!window.title.xftfont: Borzoi:pixelsize=9:shadow=y:shadowtint=75
-window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=11:shadow=y:shadowtint=30
-menu.frame.xftfont: National First Font:pixelsize=15
-!menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75
-menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10
+!window.title.font: Borzoi:pixelsize=9:shadow=y:shadowtint=75
+window.focus.font: Bitstream Vera Sans:bold:pixelsize=11:shadow=y:shadowtint=30
+window.unfocus.font: Bitstream Vera Sans:bold:pixelsize=11
+menu.frame.font: National First Font:pixelsize=15
+!menu.title.font: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75
+menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
index 141a3e672efbaeca9a1f64ad4b0d7e4a367df31f..769dd3d29d494937c9587c4e81c7fe52a0938fa9 100644 (file)
@@ -115,8 +115,9 @@ frameWidth: 0
 borderColor: #091d2e
 
 !! font me!
-!window.title.xftfont: Borzoi:pixelsize=11
-window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10
-menu.frame.xftfont: National First Font:pixelsize=15
-!menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75
-menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10
+!window.title.font: Borzoi:pixelsize=11
+window.focus.font: Bitstream Vera Sans:bold:pixelsize=10:shadow=y:shadowoffset=1:shadowtint=75
+window.unfocus.font: Bitstream Vera Sans:bold:pixelsize=10
+menu.frame.font: National First Font:pixelsize=15
+!menu.title.font: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75
+menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
index 5361e3e60bb398684e4e1db73f531f7080f202ed..064f93f84c7fe44774cf08d4906c1a76edfca14b 100644 (file)
@@ -1,9 +1,9 @@
 style.author:  miklos
 style.date:    Aug 1, 2003
 
-window.title.xftfont: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1
-menu.title.xftfont: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1
-menu.frame.xftfont: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1
+window.focus.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1
+menu.title.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1
+menu.frame.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1
 
 
 ! Menu settings...
index 8adb78f15ea8673c162addccc245c3912801883f..bf7b0f048d30d3e88c5d80508abbefa4df4b48a1 100644 (file)
@@ -113,6 +113,6 @@ frameWidth: 0
 borderColor: #222222
 
 !! font me!
-window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=90
-menu.frame.xftfont: National First Font:pixelsize=15
-menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10
+window.focus.font: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=90
+menu.frame.font: National First Font:pixelsize=15
+menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
index 75bfb5956f10ce16f94b736aa19db230d98aef00..85dc3dc32af427c17dfb18585308c45d862bde47 100644 (file)
@@ -113,8 +113,8 @@ borderColor: #091d2e
 window.title.layout:   NLIMC
 
 !! font me!
-#window.title.xftfont: Borzoi:pixelsize=11
-window.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10
-menu.frame.xftfont: National First Font:pixelsize=15
-#menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75
-menu.title.xftfont: Bitstream Vera Sans:bold:pixelsize=10
+#window.focus.font: Borzoi:pixelsize=11
+window.focus.font: Bitstream Vera Sans:bold:pixelsize=10
+menu.frame.font: National First Font:pixelsize=15
+#menu.title.font: Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowtint=75
+menu.title.font: Bitstream Vera Sans:bold:pixelsize=10
index 7a826c8ef20cfddcff8a8aa063f379c4c34ce68e..96814bb39e853bb85be41d410e3e43233c78af78 100644 (file)
@@ -7,12 +7,6 @@ menu.title.colorTo: #39658b
 menu.title.borderColor: #000000
 menu.title.textColor: #ffffff
 menu.title.justify: center
-menu.title.font: -b&h-lucida-medium-r-normal-sans-10-100-75-75-p-58-iso8859-1
-menu.title.xft.font: Microsoft Sans Serif
-menu.title.xft.size: 6
-menu.title.xft.flags: normal
-menu.title.xft.shadow.offset: 1
-menu.title.xft.shadow.tint: 25
 
 menu.frame: raised solid bevel1
 menu.frame.color: #f6f6f6
@@ -127,8 +121,8 @@ borderColor: #24272f
 #borderColor: #222222
 
 !! font me!
-window.title.xftfont: Borzoi:pixelsize=10
-menu.frame.xftfont: National First Font:pixelsize=15
-menu.title.xftfont: Borzoi:pixelsize=10
+window.focus.font: Borzoi:pixelsize=10
+menu.frame.font: National First Font:pixelsize=15
+menu.title.font: Borzoi:pixelsize=10
 
 
This page took 0.034092 seconds and 4 git commands to generate.