From 6eb4a4426d652b88659c035c8cc11d4ae69f50f2 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 23 Feb 2003 14:29:08 +0000 Subject: fixed vertical alignment of items --- src/IconBar.cc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/IconBar.cc b/src/IconBar.cc index 60449e0..ac0834f 100644 --- a/src/IconBar.cc +++ b/src/IconBar.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: IconBar.cc,v 1.24 2003/02/23 00:51:40 fluxgen Exp $ +// $Id: IconBar.cc,v 1.25 2003/02/23 14:29:08 fluxgen Exp $ #include "IconBar.hh" #include "i18n.hh" @@ -231,7 +231,8 @@ void IconBar::repositionIcons() { //max width on every icon unsigned int icon_width = width / m_iconlist.size(); - + if (m_vertical) + icon_width = height / m_iconlist.size(); //load right size of theme loadTheme(icon_width, height); @@ -239,9 +240,15 @@ void IconBar::repositionIcons() { IconList::iterator it_end = m_iconlist.end(); for (x = 0; it != it_end; ++it, x += icon_width) { Window iconwin = (*it)->getIconWin(); - XMoveResizeWindow(m_display, iconwin, - x, 0, - icon_width, height); + if (!m_vertical) { + XMoveResizeWindow(m_display, iconwin, + x, 0, + icon_width, height); + } else { + XMoveResizeWindow(m_display, iconwin, + 0, x, + height, icon_width); + } draw((*it), icon_width); decorate(iconwin); } -- cgit v0.11.2