aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2005-04-26 01:41:55 (GMT)
committersimonb <simonb>2005-04-26 01:41:55 (GMT)
commit1c2f92a3d2288b1cae9500110a72173506a18072 (patch)
treecdb695da16dcee74872790c772bb535def9f2895 /src/FbWinFrame.cc
parentb49432be05c6cf748e662e196778463e2190b4c3 (diff)
downloadfluxbox-1c2f92a3d2288b1cae9500110a72173506a18072.zip
fluxbox-1c2f92a3d2288b1cae9500110a72173506a18072.tar.bz2
extension of previous big patch. Move a bunch of menu things onto
background pixmap. Same for textbuttons.
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index ba98740..a1745ef 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -377,7 +377,7 @@ void FbWinFrame::moveLabelButtonLeft(const FbTk::TextButton &btn) {
377 // insert on the new place 377 // insert on the new place
378 m_labelbuttons.insert(new_pos, item); 378 m_labelbuttons.insert(new_pos, item);
379 // update titlebar 379 // update titlebar
380 redrawTitle(); 380 redrawTitlebar();
381} 381}
382 382
383void FbWinFrame::moveLabelButtonRight(const FbTk::TextButton &btn) { 383void FbWinFrame::moveLabelButtonRight(const FbTk::TextButton &btn) {
@@ -395,7 +395,7 @@ void FbWinFrame::moveLabelButtonRight(const FbTk::TextButton &btn) {
395 // insert on the new place 395 // insert on the new place
396 m_labelbuttons.insert(new_pos, item); 396 m_labelbuttons.insert(new_pos, item);
397 // update titlebar 397 // update titlebar
398 redrawTitle(); 398 redrawTitlebar();
399} 399}
400 400
401void FbWinFrame::moveLabelButtonTo(FbTk::TextButton &btn, int x, int y) { 401void FbWinFrame::moveLabelButtonTo(FbTk::TextButton &btn, int x, int y) {
@@ -464,7 +464,7 @@ void FbWinFrame::moveLabelButtonLeftOf(const FbTk::TextButton &btn, const FbTk::
464 //insert on the new place 464 //insert on the new place
465 m_labelbuttons.insert(new_pos, item); 465 m_labelbuttons.insert(new_pos, item);
466 //update titlebar 466 //update titlebar
467 redrawTitle(); 467 redrawTitlebar();
468} 468}
469 469
470void FbWinFrame::moveLabelButtonRightOf(const FbTk::TextButton &btn, const FbTk::TextButton &dest) { 470void FbWinFrame::moveLabelButtonRightOf(const FbTk::TextButton &btn, const FbTk::TextButton &dest) {
@@ -494,7 +494,7 @@ void FbWinFrame::moveLabelButtonRightOf(const FbTk::TextButton &btn, const FbTk:
494 else 494 else
495 m_labelbuttons.insert(new_pos, item); 495 m_labelbuttons.insert(new_pos, item);
496 //update titlebar 496 //update titlebar
497 redrawTitle(); 497 redrawTitlebar();
498} 498}
499 499
500void FbWinFrame::setLabelButtonFocus(FbTk::TextButton &btn) { 500void FbWinFrame::setLabelButtonFocus(FbTk::TextButton &btn) {
@@ -893,8 +893,8 @@ unsigned int FbWinFrame::buttonHeight() const {
893/** 893/**
894 aligns and redraws title 894 aligns and redraws title
895*/ 895*/
896void FbWinFrame::redrawTitle() { 896void FbWinFrame::redrawTitlebar() {
897 if (m_labelbuttons.empty()) 897 if (!m_use_titlebar || m_labelbuttons.empty())
898 return; 898 return;
899 899
900 int focus_button_min_percent = Fluxbox::instance()->getFocusedTabMinWidth(); 900 int focus_button_min_percent = Fluxbox::instance()->getFocusedTabMinWidth();
@@ -965,14 +965,6 @@ void FbWinFrame::redrawTitle() {
965 } 965 }
966} 966}
967 967
968void FbWinFrame::redrawTitlebar() {
969 if (!m_use_titlebar)
970 return;
971
972 redrawTitle();
973
974 }
975
976/** 968/**
977 Align buttons with title text window 969 Align buttons with title text window
978*/ 970*/
@@ -998,7 +990,6 @@ void FbWinFrame::reconfigureTitlebar() {
998 unsigned int button_size = buttonHeight(); 990 unsigned int button_size = buttonHeight();
999 m_button_size = button_size; 991 m_button_size = button_size;
1000 for (size_t i=0; i < m_buttons_left.size(); i++, next_x += button_size + m_bevel) { 992 for (size_t i=0; i < m_buttons_left.size(); i++, next_x += button_size + m_bevel) {
1001 //cerr<<"m_buttons_left["<<i<<"]->moveResize(next_x="<<next_x<<", m_bev="<<m_bevel<<", bs="<<button_size<<", bs="<<button_size<<")"<<endl;
1002 m_buttons_left[i]->moveResize(next_x, m_bevel, 993 m_buttons_left[i]->moveResize(next_x, m_bevel,
1003 button_size, button_size); 994 button_size, button_size);
1004 } 995 }
@@ -1024,7 +1015,6 @@ void FbWinFrame::reconfigureTitlebar() {
1024 button_size, button_size); 1015 button_size, button_size);
1025 } 1016 }
1026 1017
1027// renderTitlebar(); // gets done outside
1028 m_titlebar.raise(); // always on top 1018 m_titlebar.raise(); // always on top
1029} 1019}
1030 1020