diff options
author | fluxgen <fluxgen> | 2003-06-23 14:18:54 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-06-23 14:18:54 (GMT) |
commit | 312b7b052326be2dfd76217e61a0b9f61ad36783 (patch) | |
tree | 7268526c7dc68e9033b28a4e97f18028e078672c /src | |
parent | 09a5c23c5b099af531842ae7868e98bc8d717dac (diff) | |
download | fluxbox_lack-312b7b052326be2dfd76217e61a0b9f61ad36783.zip fluxbox_lack-312b7b052326be2dfd76217e61a0b9f61ad36783.tar.bz2 |
minor stuff
Diffstat (limited to 'src')
-rw-r--r-- | src/FbWinFrame.cc | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 2a6fc3c..71122cc 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.27 2003/06/13 21:00:18 fluxgen Exp $ | 22 | // $Id: FbWinFrame.cc,v 1.28 2003/06/23 14:18:54 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbWinFrame.hh" | 24 | #include "FbWinFrame.hh" |
25 | #include "ImageControl.hh" | 25 | #include "ImageControl.hh" |
@@ -687,6 +687,7 @@ void FbWinFrame::renderTitlebar() { | |||
687 | void FbWinFrame::renderHandles() { | 687 | void FbWinFrame::renderHandles() { |
688 | if (!m_use_handle || !m_visible) | 688 | if (!m_use_handle || !m_visible) |
689 | return; | 689 | return; |
690 | |||
690 | render(m_theme.handleFocusTexture(), m_handle_focused_color, | 691 | render(m_theme.handleFocusTexture(), m_handle_focused_color, |
691 | m_handle_focused_pm, | 692 | m_handle_focused_pm, |
692 | m_handle.width(), m_handle.height()); | 693 | m_handle.width(), m_handle.height()); |
@@ -765,17 +766,19 @@ void FbWinFrame::renderButtons() { | |||
765 | } | 766 | } |
766 | 767 | ||
767 | void FbWinFrame::init() { | 768 | void FbWinFrame::init() { |
768 | // clear pixmaps | 769 | |
769 | m_current_label = 0; // no focused button at first | 770 | m_current_label = 0; // no focused button at first |
771 | |||
772 | // clear pixmaps | ||
770 | m_title_focused_pm = m_title_unfocused_pm = 0; | 773 | m_title_focused_pm = m_title_unfocused_pm = 0; |
771 | m_label_focused_pm = m_label_unfocused_pm = 0; | 774 | m_label_focused_pm = m_label_unfocused_pm = 0; |
772 | m_button_unfocused_pm = m_button_pressed_pm = 0; | 775 | m_handle_focused_pm = m_handle_unfocused_pm = 0; |
776 | m_button_pm = m_button_unfocused_pm = m_button_pressed_pm = 0; | ||
777 | m_grip_unfocused_pm = m_grip_focused_pm = 0; | ||
778 | |||
773 | m_double_click_time = 200; | 779 | m_double_click_time = 200; |
774 | m_button_pm = 0; | ||
775 | m_button_size = 26; | 780 | m_button_size = 26; |
776 | m_handle_focused_pm = | 781 | |
777 | m_handle_unfocused_pm = 0; | ||
778 | m_grip_unfocused_pm = m_grip_focused_pm = 0; | ||
779 | m_clientarea.setBorderWidth(0); | 782 | m_clientarea.setBorderWidth(0); |
780 | m_shaded = false; | 783 | m_shaded = false; |
781 | m_label.show(); | 784 | m_label.show(); |
@@ -783,7 +786,7 @@ void FbWinFrame::init() { | |||
783 | showHandle(); | 786 | showHandle(); |
784 | showTitlebar(); | 787 | showTitlebar(); |
785 | 788 | ||
786 | // note: we don't show clientarea yet | 789 | // Note: we don't show clientarea yet |
787 | 790 | ||
788 | setEventHandler(*this); | 791 | setEventHandler(*this); |
789 | 792 | ||
@@ -825,7 +828,7 @@ void FbWinFrame::render(const FbTk::Texture &tex, FbTk::Color &col, Pixmap &pm, | |||
825 | col = tex.color(); | 828 | col = tex.color(); |
826 | } else | 829 | } else |
827 | pm = m_imagectrl.renderImage(w, h, tex); | 830 | pm = m_imagectrl.renderImage(w, h, tex); |
828 | 831 | ||
829 | if (tmp) | 832 | if (tmp) |
830 | m_imagectrl.removeImage(tmp); | 833 | m_imagectrl.removeImage(tmp); |
831 | 834 | ||
@@ -852,10 +855,11 @@ void FbWinFrame::getCurrentFocusPixmap(Pixmap &label_pm, Pixmap &title_pm, | |||
852 | } | 855 | } |
853 | 856 | ||
854 | void FbWinFrame::getUnFocusPixmap(Pixmap &label_pm, Pixmap &title_pm, | 857 | void FbWinFrame::getUnFocusPixmap(Pixmap &label_pm, Pixmap &title_pm, |
855 | FbTk::Color &label_color, FbTk::Color &title_color) { | 858 | FbTk::Color &label_color, |
856 | if (m_label_unfocused_pm != 0) | 859 | FbTk::Color &title_color) { |
860 | if (m_label_unfocused_pm != 0) { | ||
857 | label_pm = m_label_unfocused_pm; | 861 | label_pm = m_label_unfocused_pm; |
858 | else | 862 | } else |
859 | label_color = m_label_unfocused_color; | 863 | label_color = m_label_unfocused_color; |
860 | 864 | ||
861 | if (m_title_unfocused_pm != 0) | 865 | if (m_title_unfocused_pm != 0) |
@@ -866,8 +870,8 @@ void FbWinFrame::getUnFocusPixmap(Pixmap &label_pm, Pixmap &title_pm, | |||
866 | 870 | ||
867 | void FbWinFrame::renderLabelButtons() { | 871 | void FbWinFrame::renderLabelButtons() { |
868 | if (!m_visible) return; | 872 | if (!m_visible) return; |
869 | Pixmap label_pm = None; | 873 | Pixmap label_pm = 0; |
870 | Pixmap not_used_pm = None; | 874 | Pixmap not_used_pm = 0; |
871 | FbTk::Color label_color; | 875 | FbTk::Color label_color; |
872 | FbTk::Color not_used_color; | 876 | FbTk::Color not_used_color; |
873 | getCurrentFocusPixmap(label_pm, not_used_pm, | 877 | getCurrentFocusPixmap(label_pm, not_used_pm, |
@@ -876,8 +880,10 @@ void FbWinFrame::renderLabelButtons() { | |||
876 | ButtonList::iterator btn_it = m_labelbuttons.begin(); | 880 | ButtonList::iterator btn_it = m_labelbuttons.begin(); |
877 | ButtonList::iterator btn_it_end = m_labelbuttons.end(); | 881 | ButtonList::iterator btn_it_end = m_labelbuttons.end(); |
878 | for (; btn_it != btn_it_end; ++btn_it) { | 882 | for (; btn_it != btn_it_end; ++btn_it) { |
883 | |||
879 | (*btn_it)->setGC(theme().labelTextFocusGC()); | 884 | (*btn_it)->setGC(theme().labelTextFocusGC()); |
880 | (*btn_it)->window().setBorderWidth(1); | 885 | (*btn_it)->window().setBorderWidth(1); |
886 | |||
881 | if (m_label_unfocused_pm != 0) | 887 | if (m_label_unfocused_pm != 0) |
882 | (*btn_it)->setBackgroundPixmap(m_label_unfocused_pm); | 888 | (*btn_it)->setBackgroundPixmap(m_label_unfocused_pm); |
883 | else | 889 | else |
@@ -892,6 +898,7 @@ void FbWinFrame::renderLabelButtons() { | |||
892 | m_current_label->setBackgroundPixmap(label_pm); | 898 | m_current_label->setBackgroundPixmap(label_pm); |
893 | } else | 899 | } else |
894 | m_current_label->setBackgroundColor(label_color); | 900 | m_current_label->setBackgroundColor(label_color); |
901 | |||
895 | m_current_label->clear(); | 902 | m_current_label->clear(); |
896 | } | 903 | } |
897 | 904 | ||