more bitmap merge fixes
This commit is contained in:
parent
01732a20db
commit
c196ecd878
2 changed files with 32 additions and 16 deletions
|
@ -1075,13 +1075,13 @@ void BScreen::LoadStyle(void) {
|
|||
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
|
||||
|
@ -1149,9 +1149,9 @@ void BScreen::LoadStyle(void) {
|
|||
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;
|
||||
|
@ -1190,7 +1190,7 @@ void BScreen::LoadStyle(void) {
|
|||
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;
|
||||
|
|
|
@ -2628,7 +2628,7 @@ void BlackboxWindow::redrawIconifyButton(bool pressed) const {
|
|||
|
||||
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);
|
||||
|
@ -2679,7 +2679,7 @@ void BlackboxWindow::redrawMaximizeButton(bool pressed) const {
|
|||
|
||||
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 );
|
||||
|
@ -2721,13 +2721,29 @@ void BlackboxWindow::redrawCloseButton(bool pressed) const {
|
|||
|
||||
BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
|
||||
screen->getWindowStyle()->b_pic_unfocus);
|
||||
|
||||
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) {
|
||||
if (flags.focused) {
|
||||
|
@ -2767,7 +2783,7 @@ void BlackboxWindow::redrawStickyButton(bool pressed) const {
|
|||
|
||||
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 );
|
||||
|
@ -3334,7 +3350,7 @@ void BlackboxWindow::doWorkspaceWarping(int x_root, int y_root, int &dx) {
|
|||
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 {
|
||||
|
|
Loading…
Reference in a new issue