]> Dogcows Code - chaz/openbox/blobdiff - otk/renderstyle.cc
smaller, non-bold font
[chaz/openbox] / otk / renderstyle.cc
index 8361ce4ddeb1ad0279056a7601f23690e82e8c3c..de34e034615257dd03aee594c20cfe91f8b93cb3 100644 (file)
@@ -14,6 +14,8 @@ RenderStyle::RenderStyle(int screen, const std::string &stylefile)
   : _screen(screen),
     _file(stylefile)
 {
+  _root_color = new RenderColor(_screen, 0x272a2f);
+  
   _text_color_focus = new RenderColor(_screen, 0x272a2f);
   _text_color_unfocus = new RenderColor(_screen, 0x676869);
 
@@ -57,8 +59,8 @@ RenderStyle::RenderStyle(int screen, const std::string &stylefile)
                                    true,
                                    RenderTexture::Vertical,
                                    false,
-                                   0x858687,
-                                   0x373a3f,
+                                   0x96ba86,
+                                   0x5a724c,
                                    0x181f24,
                                    0x0);
   _label_unfocus = new RenderTexture(_screen,
@@ -78,7 +80,7 @@ RenderStyle::RenderStyle(int screen, const std::string &stylefile)
                                     false,
                                     RenderTexture::Flat,
                                     RenderTexture::Bevel1,
-                                    true,
+                                    false,
                                     RenderTexture::Vertical,
                                     false,
                                     0x858687,
@@ -167,87 +169,61 @@ RenderStyle::RenderStyle(int screen, const std::string &stylefile)
                                     0x0,
                                     0x0);
 
-  _label_font = new Font(_screen, "Arial,Sans-9:bold", true, 1, 0x40);
+  _label_font = new Font(_screen, "Arial,Sans-8", true, 1, 0x40);
+  _label_justify = RightJustify;
 
-  XImage *image = XCreateImage(**display,
-                               display->screenInfo(_screen)->visual(),
-                               2, XYBitmap, 0, NULL, 8, 8, 0, 0);
-  assert(image);
-  
   _max_mask = new PixmapMask();
   _max_mask->w = _max_mask->h = 8;
   {
-    unsigned char data[] = {
-      0,1,1,1,1,1,1,0,
-      1,1,1,1,1,1,1,1,
-      1,1,0,0,0,0,1,1,
-      1,1,0,0,0,0,1,1,
-      1,1,0,0,0,0,1,1,
-      1,1,0,0,0,0,1,1,
-      1,1,1,1,1,1,1,1,
-      0,1,1,1,1,1,1,0 };
-    image->data = (char*)data;
-    XPutImage(**display, _max_mask->mask, DefaultGC(**display, _screen),
-              image, 0, 0, 0, 0, 8, 8);
+    //char data[] = { 0x7e, 0xff, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0x7e };
+    char data []  = {0x00, 0x00, 0x18, 0x3c, 0x66, 0x42, 0x00, 0x00 };
+    _max_mask->mask =
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
   }
 
   _icon_mask = new PixmapMask();
   _icon_mask->w = _icon_mask->h = 8;
   {
-    unsigned char data[] = {
-      0,0,0,0,0,0,0,0,
-      0,0,0,0,0,0,0,0,
-      1,1,0,0,0,0,1,1,
-      1,1,1,0,0,1,1,1,
-      0,1,1,1,1,1,1,0,
-      0,0,1,1,1,1,0,0,
-      0,0,0,1,1,0,0,0,
-      0,0,0,0,0,0,0,0 };
-    image->data = (char*)data;
-    XPutImage(**display, _icon_mask->mask, DefaultGC(**display, _screen),
-              image, 0, 0, 0, 0, 8, 8);
+    //char data[] = { 0x00, 0x00, 0xc3, 0xe7, 0x7e, 0x3c, 0x18, 0x00 };
+    char data[] = { 0x00, 0x00, 0x42, 0x66, 0x3c, 0x18, 0x00, 0x00 };
+    _icon_mask->mask =
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
   }
   
-  _stick_mask = new PixmapMask();
-  _stick_mask->w = _stick_mask->h = 8;
+  _alldesk_mask = new PixmapMask();
+  _alldesk_mask->w = _alldesk_mask->h = 8;
   {
-    unsigned char data[] = {
-      0,0,0,0,0,0,0,0,
-      0,0,0,0,0,0,0,0,
-      0,0,0,1,1,0,0,0,
-      0,0,1,1,1,1,0,0,
-      0,0,1,1,1,1,0,0,
-      0,0,0,1,1,0,0,0,
-      0,0,0,0,0,0,0,0,
-      0,0,0,0,0,0,0,0 };    
-    image->data = (char*)data;
-    XPutImage(**display, _stick_mask->mask, DefaultGC(**display, _screen),
-              image, 0, 0, 0, 0, 8, 8);
+    //char data[] = { 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00 };
+    char data[] = { 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x00 };
+    _alldesk_mask->mask =
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
   }
   
   _close_mask = new PixmapMask();
   _close_mask->w = _close_mask->h = 8;
   {
-    unsigned char data[] = {
-      1,1,0,0,0,0,1,1,
-      1,1,1,0,0,1,1,1,
-      0,1,1,1,1,1,1,0,
-      0,0,1,1,1,1,0,0,
-      0,0,1,1,1,1,0,0,
-      0,1,1,1,1,1,1,0,
-      1,1,1,0,0,1,1,1,
-      1,1,0,0,0,0,1,1 };
-    image->data = (char*)data;
-    XPutImage(**display, _close_mask->mask, DefaultGC(**display, _screen),
-              image, 0, 0, 0, 0, 8, 8);
+    //char data[] = { 0xc3, 0xe7, 0x7e, 0x3c, 0x3c, 0x7e, 0xe7, 0xc3 };
+    char data[] = { 0x00, 0xc3, 0x66, 0x3c, 0x3c, 0x66, 0xc3, 0x00 };
+    _close_mask->mask =
+      XCreateBitmapFromData(**display,
+                            display->screenInfo(_screen)->rootWindow(),
+                            data, 8, 8);
   }
 
-  image->data = NULL;
-  XDestroyImage(image);
+  _bevel_width = 1;
+  _handle_width = 4;
 }
 
 RenderStyle::~RenderStyle()
 {
+  delete _root_color;
+  
   delete _text_color_focus;
   delete _text_color_unfocus;
 
@@ -280,7 +256,7 @@ RenderStyle::~RenderStyle()
 
   delete _max_mask;
   delete _icon_mask;
-  delete _stick_mask;
+  delete _alldesk_mask;
   delete _close_mask;
 }
 
This page took 0.031002 seconds and 4 git commands to generate.