aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index f1358e5..d8501ea 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Toolbar.cc,v 1.42 2002/11/27 12:20:23 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.43 2002/11/27 21:48:41 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -384,14 +384,14 @@ void Toolbar::reconfigure() {
384 frame.label_h); 384 frame.label_h);
385 385
386 Pixmap tmp = frame.base; 386 Pixmap tmp = frame.base;
387 FbTk::Texture *texture = &(screen()->getToolbarStyle()->toolbar); 387 const FbTk::Texture *texture = &(screen()->getToolbarStyle()->toolbar);
388 if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { 388 if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
389 frame.base = None; 389 frame.base = None;
390 XSetWindowBackground(display, frame.window, 390 XSetWindowBackground(display, frame.window,
391 texture->color().pixel()); 391 texture->color().pixel());
392 } else { 392 } else {
393 frame.base = 393 frame.base =
394 image_ctrl->renderImage(frame.width, frame.height, texture); 394 image_ctrl->renderImage(frame.width, frame.height, *texture);
395 XSetWindowBackgroundPixmap(display, frame.window, frame.base); 395 XSetWindowBackgroundPixmap(display, frame.window, frame.base);
396 } 396 }
397 if (tmp) image_ctrl->removeImage(tmp); 397 if (tmp) image_ctrl->removeImage(tmp);
@@ -404,7 +404,7 @@ void Toolbar::reconfigure() {
404 texture->color().pixel()); 404 texture->color().pixel());
405 } else { 405 } else {
406 frame.label = 406 frame.label =
407 image_ctrl->renderImage(frame.window_label_w, frame.label_h, texture); 407 image_ctrl->renderImage(frame.window_label_w, frame.label_h, *texture);
408 XSetWindowBackgroundPixmap(display, frame.window_label, frame.label); 408 XSetWindowBackgroundPixmap(display, frame.window_label, frame.label);
409 } 409 }
410 if (tmp) image_ctrl->removeImage(tmp); 410 if (tmp) image_ctrl->removeImage(tmp);
@@ -417,7 +417,7 @@ void Toolbar::reconfigure() {
417 texture->color().pixel()); 417 texture->color().pixel());
418 } else { 418 } else {
419 frame.wlabel = 419 frame.wlabel =
420 image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, texture); 420 image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, *texture);
421 XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel); 421 XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel);
422 } 422 }
423 if (tmp) image_ctrl->removeImage(tmp); 423 if (tmp) image_ctrl->removeImage(tmp);
@@ -426,11 +426,10 @@ void Toolbar::reconfigure() {
426 texture = &(screen()->getToolbarStyle()->clock); 426 texture = &(screen()->getToolbarStyle()->clock);
427 if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { 427 if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
428 frame.clk = None; 428 frame.clk = None;
429 XSetWindowBackground(display, frame.clock, 429 XSetWindowBackground(display, frame.clock, texture->color().pixel());
430 texture->color().pixel());
431 } else { 430 } else {
432 frame.clk = 431 frame.clk =
433 image_ctrl->renderImage(frame.clock_w, frame.label_h, texture); 432 image_ctrl->renderImage(frame.clock_w, frame.label_h, *texture);
434 XSetWindowBackgroundPixmap(display, frame.clock, frame.clk); 433 XSetWindowBackgroundPixmap(display, frame.clock, frame.clk);
435 } 434 }
436 if (tmp) image_ctrl->removeImage(tmp); 435 if (tmp) image_ctrl->removeImage(tmp);
@@ -447,14 +446,15 @@ void Toolbar::reconfigure() {
447 XSetWindowBackground(display, frame.nwbutton, frame.button_pixel); 446 XSetWindowBackground(display, frame.nwbutton, frame.button_pixel);
448 } else { 447 } else {
449 frame.button = 448 frame.button =
450 image_ctrl->renderImage(frame.button_w, frame.button_w, texture); 449 image_ctrl->renderImage(frame.button_w, frame.button_w, *texture);
451 450
452 XSetWindowBackgroundPixmap(display, frame.psbutton, frame.button); 451 XSetWindowBackgroundPixmap(display, frame.psbutton, frame.button);
453 XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button); 452 XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button);
454 XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button); 453 XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button);
455 XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button); 454 XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button);
456 } 455 }
457 if (tmp) image_ctrl->removeImage(tmp); 456 if (tmp)
457 image_ctrl->removeImage(tmp);
458 458
459 tmp = frame.pbutton; 459 tmp = frame.pbutton;
460 texture = &(screen()->getToolbarStyle()->pressed); 460 texture = &(screen()->getToolbarStyle()->pressed);
@@ -463,8 +463,9 @@ void Toolbar::reconfigure() {
463 frame.pbutton_pixel = texture->color().pixel(); 463 frame.pbutton_pixel = texture->color().pixel();
464 } else 464 } else
465 frame.pbutton = 465 frame.pbutton =
466 image_ctrl->renderImage(frame.button_w, frame.button_w, texture); 466 image_ctrl->renderImage(frame.button_w, frame.button_w, *texture);
467 if (tmp) image_ctrl->removeImage(tmp); 467 if (tmp)
468 image_ctrl->removeImage(tmp);
468 469
469 XSetWindowBorder(display, frame.window, 470 XSetWindowBorder(display, frame.window,
470 screen()->getBorderColor()->pixel()); 471 screen()->getBorderColor()->pixel());