aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-02-23 14:29:08 (GMT)
committerfluxgen <fluxgen>2003-02-23 14:29:08 (GMT)
commit6eb4a4426d652b88659c035c8cc11d4ae69f50f2 (patch)
tree09e11ca66c9955feabe02e4a7ae9d670aec2d8b5
parent7535d1a54340894509de204eefb016ed14016550 (diff)
downloadfluxbox-6eb4a4426d652b88659c035c8cc11d4ae69f50f2.zip
fluxbox-6eb4a4426d652b88659c035c8cc11d4ae69f50f2.tar.bz2
fixed vertical alignment of items
-rw-r--r--src/IconBar.cc17
1 files 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 @@
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: IconBar.cc,v 1.24 2003/02/23 00:51:40 fluxgen Exp $ 22// $Id: IconBar.cc,v 1.25 2003/02/23 14:29:08 fluxgen Exp $
23 23
24#include "IconBar.hh" 24#include "IconBar.hh"
25#include "i18n.hh" 25#include "i18n.hh"
@@ -231,7 +231,8 @@ void IconBar::repositionIcons() {
231 231
232 //max width on every icon 232 //max width on every icon
233 unsigned int icon_width = width / m_iconlist.size(); 233 unsigned int icon_width = width / m_iconlist.size();
234 234 if (m_vertical)
235 icon_width = height / m_iconlist.size();
235 //load right size of theme 236 //load right size of theme
236 loadTheme(icon_width, height); 237 loadTheme(icon_width, height);
237 238
@@ -239,9 +240,15 @@ void IconBar::repositionIcons() {
239 IconList::iterator it_end = m_iconlist.end(); 240 IconList::iterator it_end = m_iconlist.end();
240 for (x = 0; it != it_end; ++it, x += icon_width) { 241 for (x = 0; it != it_end; ++it, x += icon_width) {
241 Window iconwin = (*it)->getIconWin(); 242 Window iconwin = (*it)->getIconWin();
242 XMoveResizeWindow(m_display, iconwin, 243 if (!m_vertical) {
243 x, 0, 244 XMoveResizeWindow(m_display, iconwin,
244 icon_width, height); 245 x, 0,
246 icon_width, height);
247 } else {
248 XMoveResizeWindow(m_display, iconwin,
249 0, x,
250 height, icon_width);
251 }
245 draw((*it), icon_width); 252 draw((*it), icon_width);
246 decorate(iconwin); 253 decorate(iconwin);
247 } 254 }