summaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r--src/FbTk/Menu.cc33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 34f876f..f803709 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -473,12 +473,19 @@ void Menu::updateMenu(int active_index) {
473 // buffer pixmap -> resize buffer pixmap 473 // buffer pixmap -> resize buffer pixmap
474 if (m_title_pm.width() != width() || 474 if (m_title_pm.width() != width() ||
475 m_title_pm.height() != theme().titleHeight()) { 475 m_title_pm.height() != theme().titleHeight()) {
476 m_title_pm = FbPixmap(menu.title.window(), 476
477 width(), theme().titleHeight(), 477 if (m_title_pm.drawable() != None) {
478 menu.title.depth()); 478 m_title_pm.resize(width(), theme().titleHeight());
479 m_real_title_pm = FbPixmap(menu.title.window(), 479 m_real_title_pm.resize(width(), theme().titleHeight());
480 } else {
481 m_title_pm.create(menu.title.window(),
482 width(), theme().titleHeight(),
483 menu.title.depth());
484 m_real_title_pm.create(menu.title.window(),
480 width(), theme().titleHeight(), 485 width(), theme().titleHeight(),
481 menu.title.depth()); 486 menu.title.depth());
487 }
488
482 // set pixmap that we have as real face to the user 489 // set pixmap that we have as real face to the user
483 menu.title.setBackgroundPixmap(m_real_title_pm.drawable()); 490 menu.title.setBackgroundPixmap(m_real_title_pm.drawable());
484 menu.title.setBufferPixmap(m_real_title_pm.drawable()); 491 menu.title.setBufferPixmap(m_real_title_pm.drawable());
@@ -560,13 +567,18 @@ void Menu::updateMenu(int active_index) {
560 if (m_need_update || m_frame_pm.width() != menu.frame.width() || 567 if (m_need_update || m_frame_pm.width() != menu.frame.width() ||
561 m_frame_pm.height() != menu.frame.height()){ 568 m_frame_pm.height() != menu.frame.height()){
562 569
563 m_frame_pm = FbTk::FbPixmap(menu.frame.window(), 570 if (m_frame_pm.drawable() != None) {
564 menu.frame.width(), menu.frame.height(), 571 m_frame_pm.resize(menu.frame.width(), menu.frame.height());
565 menu.frame.depth()); 572 m_real_frame_pm.resize(menu.frame.width(), menu.frame.height());
573 } else {
574 m_frame_pm.create(menu.frame.window(),
575 menu.frame.width(), menu.frame.height(),
576 menu.frame.depth());
566 577
567 m_real_frame_pm = FbTk::FbPixmap(menu.frame.window(), 578 m_real_frame_pm.create(menu.frame.window(),
568 menu.frame.width(), menu.frame.height(), 579 menu.frame.width(), menu.frame.height(),
569 menu.frame.depth()); 580 menu.frame.depth());
581 }
570 if (m_transp.get() != 0) 582 if (m_transp.get() != 0)
571 m_transp->setDest(m_real_frame_pm.drawable(), screenNumber()); 583 m_transp->setDest(m_real_frame_pm.drawable(), screenNumber());
572 584
@@ -591,7 +603,6 @@ void Menu::updateMenu(int active_index) {
591 0, 0, 603 0, 0,
592 width(), menu.frame_h); 604 width(), menu.frame_h);
593 } 605 }
594
595 606
596 } 607 }
597 608