From c1d9ae5068ed209a8ed051a68c269bd0158bf6a8 Mon Sep 17 00:00:00 2001
From: Mark Tiefenbruck <mark@fluxbox.org>
Date: Sun, 28 Jun 2009 09:39:28 -0700
Subject: fix changing iconbar alignment and button width from init file

---
 src/FbTk/Container.cc | 5 ++++-
 src/IconButton.cc     | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/FbTk/Container.cc b/src/FbTk/Container.cc
index bcb6b01..ce143ef 100644
--- a/src/FbTk/Container.cc
+++ b/src/FbTk/Container.cc
@@ -229,7 +229,10 @@ void Container::setMaxTotalSize(unsigned int size) {
 }
 
 void Container::setAlignment(Container::Alignment a) {
-    m_align = a;
+    if (m_align != a) {
+        m_align = a;
+        repositionItems();
+    }
 }
 
 void Container::exposeEvent(XExposeEvent &event) {
diff --git a/src/IconButton.cc b/src/IconButton.cc
index d63f6da..5e42e9f 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -100,6 +100,7 @@ void IconButton::moveResize(int x, int y,
 
     if (m_icon_window.width() != FbTk::Button::width() ||
         m_icon_window.height() != FbTk::Button::height()) {
+        reconfigTheme();
         update(0); // update icon window
     }
 }
@@ -108,6 +109,7 @@ void IconButton::resize(unsigned int width, unsigned int height) {
     FbTk::TextButton::resize(width, height);
     if (m_icon_window.width() != FbTk::Button::width() ||
         m_icon_window.height() != FbTk::Button::height()) {
+        reconfigTheme();
         update(0); // update icon window
     }
 }
-- 
cgit v0.11.2