resource.wstyle.icon_button.mask =
resource.wstyle.icon_button.mask = None;
- readDatabaseMask("window.button.close_mask", resource.wstyle.close_button,
+ readDatabaseMask("window.button.close.mask", resource.wstyle.close_button,
style);
- readDatabaseMask("window.button.max_mask", resource.wstyle.max_button,
+ readDatabaseMask("window.button.max.mask", resource.wstyle.max_button,
style);
- readDatabaseMask("window.button.icon_mask", resource.wstyle.icon_button,
+ readDatabaseMask("window.button.icon.mask", resource.wstyle.icon_button,
style);
- readDatabaseMask("window.button.stick_mask", resource.wstyle.stick_button,
+ readDatabaseMask("window.button.stick.mask", resource.wstyle.stick_button,
style);
// we create the window.frame texture by hand because it exists only to
readDatabaseColor("toolbar.clock.textColor", "white", style);
resource.tstyle.b_pic =
readDatabaseColor("toolbar.button.picColor", "black", style);
- readDatabaseMask("toolbar.button.left_mask", resource.tstyle.left_button,
+ readDatabaseMask("toolbar.button.left.mask", resource.tstyle.left_button,
style);
- readDatabaseMask("toolbar.button.right_mask", resource.tstyle.right_button,
+ readDatabaseMask("toolbar.button.right.mask", resource.tstyle.right_button,
style);
resource.tstyle.justify = LeftJustify;
readDatabaseColor("menu.frame.disableColor", "black", style);
resource.mstyle.h_text =
readDatabaseColor("menu.hilite.textColor", "black", style);
- readDatabaseMask("menu.bullet.mask", resource.mstyle.bullet_image, style);
+ readDatabaseMask("menu.arrow.mask", resource.mstyle.bullet_image, style);
readDatabaseMask("menu.selected.mask", resource.mstyle.tick_image, style);
resource.mstyle.t_justify = LeftJustify;
XFillRectangle(blackbox->getXDisplay(), frame.iconify_button, pen.gc(),
(frame.button_w - pm.w)/2, (frame.button_w - pm.h)/2,
- pm.w, pm.h);
+ (frame.button_w + pm.w)/2, (frame.button_w + pm.h)/2);
XSetClipMask(blackbox->getXDisplay(), pen.gc(), None);
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0);
XFillRectangle(blackbox->getXDisplay(), frame.maximize_button, pen.gc(),
(frame.button_w - pm.w)/2, (frame.button_w - pm.h)/2,
- pm.w, pm.h);
+ (frame.button_w + pm.w)/2, (frame.button_w + pm.h)/2);
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0 );
XSetClipMask( blackbox->getXDisplay(), pen.gc(), None );
BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
screen->getWindowStyle()->b_pic_unfocus);
- XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(),
- 2, 2, (frame.button_w - 3), (frame.button_w - 3));
- XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(),
- 2, (frame.button_w - 3), (frame.button_w - 3), 2);
-}
+ PixmapMask pm = screen->getWindowStyle()->close_button;
+
+ if (pm.mask != None) {
+ XSetClipMask(blackbox->getXDisplay(), pen.gc(), pm.mask);
+ XSetClipOrigin(blackbox->getXDisplay(), pen.gc(),
+ (frame.button_w - pm.w)/2, (frame.button_w - pm.h)/2);
+
+ XFillRectangle(blackbox->getXDisplay(), frame.close_button, pen.gc(),
+ (frame.button_w - pm.w)/2, (frame.button_w - pm.h)/2,
+ (frame.button_w + pm.w)/2, (frame.button_w + pm.h)/2);
+
+
+ XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0 );
+ XSetClipMask( blackbox->getXDisplay(), pen.gc(), None );
+ } else {
+ XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(),
+ 2, 2, (frame.button_w - 3), (frame.button_w - 3));
+ XDrawLine(blackbox->getXDisplay(), frame.close_button, pen.gc(),
+ 2, (frame.button_w - 3), (frame.button_w - 3), 2);
+ }
+}
void BlackboxWindow::redrawStickyButton(bool pressed) const {
if (! pressed) {
XFillRectangle(blackbox->getXDisplay(), frame.stick_button, pen.gc(),
(frame.button_w - pm.w)/2, (frame.button_w - pm.h)/2,
- pm.w, pm.h);
+ (frame.button_w + pm.w)/2, (frame.button_w + pm.h)/2);
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0 );
bool focus = flags.focused; // had focus while moving?
int dest_x = x_root;
- if (x_root <= 0) {
+ if (x_root < 0) {
dest_x += screen->getRect().width() - 1;
dx += screen->getRect().width() - 1;
} else {