aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-05 13:09:08 (GMT)
committerfluxgen <fluxgen>2003-06-05 13:09:08 (GMT)
commit01d069fbef74441df585a4c3094c3ac0fe6a0a2d (patch)
tree89c714fff4739bb0096137332be574f4ffc75e94 /src/FbWinFrame.cc
parent18de3a67dd27c82c5926ed1357593fcf707a5759 (diff)
downloadfluxbox-01d069fbef74441df585a4c3094c3ac0fe6a0a2d.zip
fluxbox-01d069fbef74441df585a4c3094c3ac0fe6a0a2d.tar.bz2
minor fixes
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc41
1 files changed, 22 insertions, 19 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 02aca76..e0e582d 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrame.cc,v 1.25 2003/05/21 23:59:53 rathnor Exp $ 22// $Id: FbWinFrame.cc,v 1.26 2003/06/05 13:09:08 fluxgen Exp $
23 23
24#include "FbWinFrame.hh" 24#include "FbWinFrame.hh"
25#include "ImageControl.hh" 25#include "ImageControl.hh"
@@ -561,20 +561,19 @@ void FbWinFrame::redrawTitle() {
561 561
562 int button_width = label().width()/m_labelbuttons.size(); 562 int button_width = label().width()/m_labelbuttons.size();
563 //!! TODO: bevel 563 //!! TODO: bevel
564 int border_width = m_labelbuttons.size() != 0 ? 564 int border_width = m_labelbuttons.front()->window().borderWidth();
565 m_labelbuttons.front()->window().borderWidth() : 0;
566 565
567 ButtonList::iterator btn_it = m_labelbuttons.begin(); 566 ButtonList::iterator btn_it = m_labelbuttons.begin();
568 ButtonList::iterator btn_it_end = m_labelbuttons.end(); 567 ButtonList::iterator btn_it_end = m_labelbuttons.end();
569 for (unsigned int last_x = 0; 568 for (unsigned int last_x = 0;
570 btn_it != btn_it_end; 569 btn_it != btn_it_end;
571 ++btn_it, last_x += button_width + border_width) { 570 ++btn_it, last_x += button_width + border_width) {
572 // since we add border width pixel we should remove 571 // since we add border width pixel we should remove
573 // the same size for inside width so we can fit all buttons into label 572 // the same size for inside width so we can fit all buttons into label
574 (*btn_it)->moveResize(last_x - border_width, - border_width, 573 (*btn_it)->moveResize(last_x - (last_x ? border_width : 0), - border_width,
575 button_width, 574 button_width,
576 label().height() + border_width); 575 label().height() + border_width);
577 (*btn_it)->clear(); 576 (*btn_it)->clear();
578 } 577 }
579 578
580} 579}
@@ -585,6 +584,9 @@ void FbWinFrame::redrawTitlebar() {
585 m_titlebar.clear(); 584 m_titlebar.clear();
586 m_label.clear(); 585 m_label.clear();
587 redrawTitle(); 586 redrawTitle();
587
588 if (m_current_label)
589 m_current_label->clear();
588 } 590 }
589 591
590/** 592/**
@@ -876,21 +878,22 @@ void FbWinFrame::renderLabelButtons() {
876 for (; btn_it != btn_it_end; ++btn_it) { 878 for (; btn_it != btn_it_end; ++btn_it) {
877 (*btn_it)->setGC(theme().labelTextFocusGC()); 879 (*btn_it)->setGC(theme().labelTextFocusGC());
878 (*btn_it)->window().setBorderWidth(1); 880 (*btn_it)->window().setBorderWidth(1);
879 if ((*btn_it) != m_current_label) { 881 if (m_label_unfocused_pm != 0)
880 if (m_label_unfocused_pm != 0) 882 (*btn_it)->setBackgroundPixmap(m_label_unfocused_pm);
881 (*btn_it)->setBackgroundPixmap(m_label_unfocused_pm); 883 else
882 else 884 (*btn_it)->setBackgroundColor(m_label_unfocused_color);
883 (*btn_it)->setBackgroundColor(m_label_unfocused_color);
884
885 } else {
886 885
887 if (label_pm)
888 (*btn_it)->setBackgroundPixmap(label_pm);
889 else
890 (*btn_it)->setBackgroundColor(label_color);
891 }
892
893 (*btn_it)->clear(); 886 (*btn_it)->clear();
894 } 887 }
888
889 if (m_current_label != 0) {
890
891 if (label_pm) {
892 m_current_label->setBackgroundPixmap(label_pm);
893 cerr<<"label_pm = "<<hex<<label_pm<<dec<<endl;
894 } else
895 m_current_label->setBackgroundColor(label_color);
896 m_current_label->clear();
897 }
895 898
896} 899}