diff options
author | simonb <simonb> | 2006-04-17 13:35:20 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-17 13:35:20 (GMT) |
commit | 9ff23f01ca0a0a6c83a3a5e5d933fffbb59dfab8 (patch) | |
tree | 5fdb90654a54c93b653e6ce8d2f7f9452e146367 /src/IconbarTool.cc | |
parent | c5b67f9a42731e5841bfd40e41268ed308225b30 (diff) | |
download | fluxbox-9ff23f01ca0a0a6c83a3a5e5d933fffbb59dfab8.zip fluxbox-9ff23f01ca0a0a6c83a3a5e5d933fffbb59dfab8.tar.bz2 |
fix some rotation issues
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r-- | src/IconbarTool.cc | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index f49a1fe..e2eede4 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc | |||
@@ -701,12 +701,16 @@ void IconbarTool::renderTheme() { | |||
701 | Pixmap tmp = m_focused_pm; | 701 | Pixmap tmp = m_focused_pm; |
702 | Pixmap err_tmp = m_focused_err_pm; | 702 | Pixmap err_tmp = m_focused_err_pm; |
703 | unsigned int icon_width, icon_height; | 703 | unsigned int icon_width, icon_height; |
704 | unsigned int icon_width_off=0, icon_height_off=0; | ||
705 | |||
704 | if (orientation() == FbTk::ROT0 || orientation() == FbTk::ROT180) { | 706 | if (orientation() == FbTk::ROT0 || orientation() == FbTk::ROT180) { |
705 | icon_width = m_icon_container.maxWidthPerClient(); | 707 | icon_width = m_icon_container.maxWidthPerClient(); |
706 | icon_height = m_icon_container.height(); | 708 | icon_height = m_icon_container.height(); |
709 | icon_width_off = 1; | ||
707 | } else { | 710 | } else { |
708 | icon_width = m_icon_container.width(); | 711 | icon_width = m_icon_container.width(); |
709 | icon_height = m_icon_container.maxWidthPerClient(); | 712 | icon_height = m_icon_container.maxWidthPerClient(); |
713 | icon_height_off = 1; | ||
710 | } | 714 | } |
711 | 715 | ||
712 | if (!m_theme.focusedTexture().usePixmap()) { | 716 | if (!m_theme.focusedTexture().usePixmap()) { |
@@ -716,8 +720,8 @@ void IconbarTool::renderTheme() { | |||
716 | m_focused_pm = m_screen.imageControl().renderImage(icon_width, | 720 | m_focused_pm = m_screen.imageControl().renderImage(icon_width, |
717 | icon_height, | 721 | icon_height, |
718 | m_theme.focusedTexture(), orientation()); | 722 | m_theme.focusedTexture(), orientation()); |
719 | m_focused_err_pm = m_screen.imageControl().renderImage(icon_width+1, | 723 | m_focused_err_pm = m_screen.imageControl().renderImage(icon_width+icon_width_off, |
720 | icon_height, | 724 | icon_height+icon_height_off, |
721 | m_theme.focusedTexture(), orientation()); | 725 | m_theme.focusedTexture(), orientation()); |
722 | } | 726 | } |
723 | 727 | ||
@@ -736,8 +740,8 @@ void IconbarTool::renderTheme() { | |||
736 | m_unfocused_pm = m_screen.imageControl().renderImage(icon_width, | 740 | m_unfocused_pm = m_screen.imageControl().renderImage(icon_width, |
737 | icon_height, | 741 | icon_height, |
738 | m_theme.unfocusedTexture(), orientation()); | 742 | m_theme.unfocusedTexture(), orientation()); |
739 | m_unfocused_err_pm = m_screen.imageControl().renderImage(icon_width+1, | 743 | m_unfocused_err_pm = m_screen.imageControl().renderImage(icon_width+icon_width_off, |
740 | icon_height, | 744 | icon_height+icon_height_off, |
741 | m_theme.unfocusedTexture(), orientation()); | 745 | m_theme.unfocusedTexture(), orientation()); |
742 | } | 746 | } |
743 | if (tmp) | 747 | if (tmp) |
@@ -780,9 +784,15 @@ void IconbarTool::renderButton(IconButton &button, bool clear) { | |||
780 | 784 | ||
781 | // The last button is always the regular width | 785 | // The last button is always the regular width |
782 | bool wider_button = false; | 786 | bool wider_button = false; |
783 | if (!m_icon_container.empty()) | 787 | if (!m_icon_container.empty()) { |
784 | wider_button = (button.width() != m_icon_container.back()->width() || // height to cover both orients | 788 | if (button.orientation() == FbTk::ROT0 || button.orientation() == FbTk::ROT180) |
785 | button.height() != m_icon_container.back()->height()); | 789 | wider_button = button.width() != m_icon_container.back()->width(); |
790 | else | ||
791 | wider_button = button.height() != m_icon_container.back()->height(); | ||
792 | // wider_button = (button.width() != m_icon_container.maxWidthPerClient() || // height to cover both orients | ||
793 | |||
794 | // button.height() != m_icon_container.back()->height()); | ||
795 | } | ||
786 | 796 | ||
787 | if (button.win().isFocused()) { // focused texture | 797 | if (button.win().isFocused()) { // focused texture |
788 | m_icon_container.setSelected(m_icon_container.find(&button)); | 798 | m_icon_container.setSelected(m_icon_container.find(&button)); |