X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Frenderstyle.cc;h=7e8b6446539b5eb5351e172a6dc3bac3cd08773b;hb=e64d90be4d5b86a497ed8f03c6ba40512765e239;hp=22622931de7cc8579fbc4b595ab0022f3229b92b;hpb=75e8fc2705d9c606a702eb7057e9e503be90618b;p=chaz%2Fopenbox diff --git a/otk/renderstyle.cc b/otk/renderstyle.cc index 22622931..7e8b6446 100644 --- a/otk/renderstyle.cc +++ b/otk/renderstyle.cc @@ -5,6 +5,8 @@ #endif // HAVE_CONFIG_H #include "renderstyle.hh" +#include "display.hh" +#include "screeninfo.hh" namespace otk { @@ -166,6 +168,50 @@ RenderStyle::RenderStyle(int screen, const std::string &stylefile) 0x0); _label_font = new Font(_screen, "Arial,Sans-9:bold", true, 1, 0x40); + _label_justify = RightJustify; + + _max_mask = new PixmapMask(); + _max_mask->w = _max_mask->h = 8; + { + char data[] = { 0x7e, 0xff, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0x7e }; + _max_mask->mask= + XCreateBitmapFromData(**display, + display->screenInfo(_screen)->rootWindow(), + data, 8, 8); + } + + _icon_mask = new PixmapMask(); + _icon_mask->w = _icon_mask->h = 8; + { + char data[] = { 0x00, 0x00, 0xc3, 0xe7, 0x7e, 0x3c, 0x18, 0x00 }; + _icon_mask->mask= + XCreateBitmapFromData(**display, + display->screenInfo(_screen)->rootWindow(), + data, 8, 8); + } + + _stick_mask = new PixmapMask(); + _stick_mask->w = _stick_mask->h = 8; + { + char data[] = { 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00 }; + _icon_mask->mask= + XCreateBitmapFromData(**display, + display->screenInfo(_screen)->rootWindow(), + data, 8, 8); + } + + _close_mask = new PixmapMask(); + _close_mask->w = _close_mask->h = 8; + { + char data[] = { 0xc3, 0xe7, 0x7e, 0x3c, 0x3c, 0x7e, 0xe7, 0xc3 }; + _icon_mask->mask= + XCreateBitmapFromData(**display, + display->screenInfo(_screen)->rootWindow(), + data, 8, 8); + } + + _bevel_width = 1; + _handle_width = 4; } RenderStyle::~RenderStyle() @@ -199,6 +245,11 @@ RenderStyle::~RenderStyle() delete _grip_unfocus; delete _label_font; + + delete _max_mask; + delete _icon_mask; + delete _stick_mask; + delete _close_mask; } }