summaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorScott Moynes <smoynes@nexus.carleton.ca>2002-09-14 05:43:57 +0000
committerScott Moynes <smoynes@nexus.carleton.ca>2002-09-14 05:43:57 +0000
commite0d619e309a7fe6de1524b2574ecc9d77aee5a35 (patch)
tree11f16f66b56955fec23c7c389ab01cd3d22170e8 /src/Toolbar.cc
parentc196ecd8783e5640380ad1b5f55bcd860abd0c62 (diff)
added a configure flag for enabling/disabling bitmap buttons
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc46
1 files changed, 27 insertions, 19 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index d7dc36a4..d2e2f15f 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -633,16 +633,8 @@ void Toolbar::drawArrow(Drawable surface, bool left) const {
if (left) {
- if (style->left_button.mask == None) {
- pts[0].x = hw - bullet_size;
- pts[0].y = hh;
- pts[1].x = 2 * bullet_size;
- pts[1].y = bullet_size;
- pts[2].x = 0;
- pts[2].y = -(2 * bullet_size);
- XFillPolygon(display, surface, pen.gc(), pts, 3, Convex,
- CoordModePrevious);
- } else {
+#ifdef BITMAPBUTTONS
+ if (style->left_button.mask != None) {
XSetClipMask(blackbox->getXDisplay(), pen.gc(), style->left_button.mask);
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(),
(frame.button_w - style->left_button.w)/2,
@@ -655,18 +647,22 @@ void Toolbar::drawArrow(Drawable surface, bool left) const {
XSetClipMask(blackbox->getXDisplay(), pen.gc(), None);
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0);
- }
- } else {
- if (style->right_button.mask == None) {
+ } else {
+#endif // BITMAPBUTTONS
pts[0].x = hw - bullet_size;
- pts[0].y = hh - bullet_size;
- pts[1].x = (2 * bullet_size);
- pts[1].y = bullet_size;
- pts[2].x = -(2 * bullet_size);
- pts[2].y = bullet_size;
+ pts[0].y = hh;
+ pts[1].x = 2 * bullet_size;
+ pts[1].y = bullet_size;
+ pts[2].x = 0;
+ pts[2].y = -(2 * bullet_size);
XFillPolygon(display, surface, pen.gc(), pts, 3, Convex,
CoordModePrevious);
- } else {
+#ifdef BITMAPBUTTONS
+ }
+#endif // BITMAPBUTTONS
+ } else {
+#ifdef BITMAPBUTTONS
+ if (style->right_button.mask != None) {
XSetClipMask(blackbox->getXDisplay(), pen.gc(),
style->right_button.mask);
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(),
@@ -681,7 +677,19 @@ void Toolbar::drawArrow(Drawable surface, bool left) const {
XSetClipMask(blackbox->getXDisplay(), pen.gc(), None);
XSetClipOrigin(blackbox->getXDisplay(), pen.gc(), 0, 0);
+ } else {
+#endif // BITMAPBUTTONS
+ pts[0].x = hw - bullet_size;
+ pts[0].y = hh - bullet_size;
+ pts[1].x = (2 * bullet_size);
+ pts[1].y = bullet_size;
+ pts[2].x = -(2 * bullet_size);
+ pts[2].y = bullet_size;
+ XFillPolygon(display, surface, pen.gc(), pts, 3, Convex,
+ CoordModePrevious);
+#ifdef BITMAPBUTTONS
}
+#endif
}
}