aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-08-29 08:33:13 (GMT)
committerrathnor <rathnor>2004-08-29 08:33:13 (GMT)
commit97ef84da598aed61a6cb57a62796f302043181e8 (patch)
treefd68f9ef6703322537eca3743c3217b281d6ce7c
parent8a59b9b4541490badaf3e1a0503b4ca5f0105c8f (diff)
downloadfluxbox_pavel-97ef84da598aed61a6cb57a62796f302043181e8.zip
fluxbox_pavel-97ef84da598aed61a6cb57a62796f302043181e8.tar.bz2
a few random fixes
-rw-r--r--ChangeLog5
-rw-r--r--src/ButtonTool.cc7
-rw-r--r--src/ButtonTool.hh3
-rw-r--r--src/ClockTool.cc7
-rw-r--r--src/ClockTool.hh3
-rw-r--r--src/FbTk/Menu.cc11
-rw-r--r--src/FbTk/MenuItem.cc5
-rw-r--r--src/FbTk/XftFontImp.cc7
-rw-r--r--src/IconbarTool.cc17
-rw-r--r--src/IconbarTool.hh4
-rw-r--r--src/SystemTray.hh3
-rw-r--r--src/TextTheme.cc5
-rw-r--r--src/Toolbar.cc17
-rw-r--r--src/ToolbarItem.hh5
-rw-r--r--src/WorkspaceNameTool.cc6
-rw-r--r--src/WorkspaceNameTool.hh3
16 files changed, 79 insertions, 29 deletions
diff --git a/ChangeLog b/ChangeLog
index c9c402a..55826c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.10: 2Changes for 0.9.10:
3*04/08/29:
4 * More random render fixes (Simon)
5 (font alignment in menu, menu optimisation, toolbar font/render)
6 FbTk/Menu.cc FbTk/MenuItem.cc FbTk/XftFontImp.cc
7 TextTheme.cc Toolbar.cc ToolbarItem.hh <ToolbarTools>.hh/cc
3*04/08/28: 8*04/08/28:
4 * Some more menu rendering fixes (Simon) 9 * Some more menu rendering fixes (Simon)
5 Thanks Florian Pigorsch for nice bug reports + debugging 10 Thanks Florian Pigorsch for nice bug reports + debugging
diff --git a/src/ButtonTool.cc b/src/ButtonTool.cc
index 78edbe7..0640048 100644
--- a/src/ButtonTool.cc
+++ b/src/ButtonTool.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: ButtonTool.cc,v 1.4 2004/08/26 15:09:33 rathnor Exp $ 22// $Id: ButtonTool.cc,v 1.5 2004/08/29 08:33:12 rathnor Exp $
23 23
24#include "ButtonTool.hh" 24#include "ButtonTool.hh"
25 25
@@ -48,6 +48,11 @@ ButtonTool::~ButtonTool() {
48 48
49} 49}
50 50
51void ButtonTool::updateSizing() {
52 FbTk::Button &btn = static_cast<FbTk::Button &>(window());
53 btn.setBorderWidth(theme().border().width());
54}
55
51void ButtonTool::renderTheme() { 56void ButtonTool::renderTheme() {
52 FbTk::Button &btn = static_cast<FbTk::Button &>(window()); 57 FbTk::Button &btn = static_cast<FbTk::Button &>(window());
53 58
diff --git a/src/ButtonTool.hh b/src/ButtonTool.hh
index b40c5a7..73d9b76 100644
--- a/src/ButtonTool.hh
+++ b/src/ButtonTool.hh
@@ -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: ButtonTool.hh,v 1.1 2003/10/13 23:38:17 fluxgen Exp $ 22// $Id: ButtonTool.hh,v 1.2 2004/08/29 08:33:12 rathnor Exp $
23 23
24#ifndef BUTTONTOOL_HH 24#ifndef BUTTONTOOL_HH
25#define BUTTONTOOL_HH 25#define BUTTONTOOL_HH
@@ -42,6 +42,7 @@ public:
42 42
43protected: 43protected:
44 void renderTheme(); 44 void renderTheme();
45 void updateSizing();
45 Pixmap m_cache_pm, m_cache_pressed_pm; 46 Pixmap m_cache_pm, m_cache_pressed_pm;
46 FbTk::ImageControl &m_image_ctrl; 47 FbTk::ImageControl &m_image_ctrl;
47}; 48};
diff --git a/src/ClockTool.cc b/src/ClockTool.cc
index dca1d86..2364a5b 100644
--- a/src/ClockTool.cc
+++ b/src/ClockTool.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: ClockTool.cc,v 1.12 2004/08/25 17:16:40 rathnor Exp $ 23// $Id: ClockTool.cc,v 1.13 2004/08/29 08:33:12 rathnor Exp $
24 24
25#include "ClockTool.hh" 25#include "ClockTool.hh"
26 26
@@ -246,6 +246,11 @@ void ClockTool::updateTime() {
246 m_button.clear(); 246 m_button.clear();
247} 247}
248 248
249// Just change things that affect the size
250void ClockTool::updateSizing() {
251 m_button.setBorderWidth(m_theme.border().width());
252}
253
249void ClockTool::renderTheme() { 254void ClockTool::renderTheme() {
250 Pixmap old_pm = m_pixmap; 255 Pixmap old_pm = m_pixmap;
251 if (!m_theme.texture().usePixmap()) { 256 if (!m_theme.texture().usePixmap()) {
diff --git a/src/ClockTool.hh b/src/ClockTool.hh
index 70f80cc..a8e9362 100644
--- a/src/ClockTool.hh
+++ b/src/ClockTool.hh
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: ClockTool.hh,v 1.4 2003/12/04 23:02:23 fluxgen Exp $ 23// $Id: ClockTool.hh,v 1.5 2004/08/29 08:33:12 rathnor Exp $
24 24
25#ifndef CLOCKTOOL_HH 25#ifndef CLOCKTOOL_HH
26#define CLOCKTOOL_HH 26#define CLOCKTOOL_HH
@@ -66,6 +66,7 @@ private:
66 void updateTime(); 66 void updateTime();
67 void update(FbTk::Subject *subj); 67 void update(FbTk::Subject *subj);
68 void renderTheme(); 68 void renderTheme();
69 void updateSizing();
69 70
70 FbTk::TextButton m_button; 71 FbTk::TextButton m_button;
71 72
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 18c3b75..5fe8e36 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Menu.cc,v 1.74 2004/08/28 19:03:09 rathnor Exp $ 25// $Id: Menu.cc,v 1.75 2004/08/29 08:33:13 rathnor Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -777,12 +777,14 @@ void Menu::redrawTitle() {
777 0, 0, 777 0, 0,
778 m_title_pm.width(), m_title_pm.height()); 778 m_title_pm.width(), m_title_pm.height());
779 779
780 // difference between height based on font, and style-set height
781 int height_offset = theme().titleHeight() - (font.height() + 2*theme().bevelWidth());
780 menu.title.updateTransparent(); 782 menu.title.updateTransparent();
781 font.drawText(m_real_title_pm.drawable(), // drawable 783 font.drawText(m_real_title_pm.drawable(), // drawable
782 screenNumber(), 784 screenNumber(),
783 theme().titleTextGC().gc(), // graphic context 785 theme().titleTextGC().gc(), // graphic context
784 text, len, // text string with lenght 786 text, len, // text string with length
785 dx, theme().titleHeight()/2 + (font.ascent() - theme().bevelWidth())/2); // position 787 dx, font.ascent() + theme().bevelWidth() + height_offset/2); // position
786} 788}
787 789
788 790
@@ -1196,6 +1198,9 @@ void Menu::motionNotifyEvent(XMotionEvent &me) {
1196 int sbl = (me.x / menu.item_w), 1198 int sbl = (me.x / menu.item_w),
1197 i = (me.y / theme().itemHeight()), 1199 i = (me.y / theme().itemHeight()),
1198 w = (sbl * menu.persub) + i; 1200 w = (sbl * menu.persub) + i;
1201
1202 if (w == m_active_index)
1203 return;
1199 1204
1200 if (validIndex(m_active_index) && w != m_active_index) { 1205 if (validIndex(m_active_index) && w != m_active_index) {
1201 1206
diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc
index 898bf99..ee1db93 100644
--- a/src/FbTk/MenuItem.cc
+++ b/src/FbTk/MenuItem.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: MenuItem.cc,v 1.5 2004/08/03 21:31:31 fluxgen Exp $ 22// $Id: MenuItem.cc,v 1.6 2004/08/29 08:33:13 rathnor Exp $
23 23
24#include "MenuItem.hh" 24#include "MenuItem.hh"
25#include "Command.hh" 25#include "Command.hh"
@@ -91,7 +91,8 @@ void MenuItem::draw(FbDrawable &draw,
91 91
92 int text_w = theme.frameFont().textWidth(label().c_str(), label().size()); 92 int text_w = theme.frameFont().textWidth(label().c_str(), label().size());
93 93
94 text_y = y - theme.bevelWidth()/2 + theme.frameFont().ascent()/2 + height/2; 94 int height_offset = theme.itemHeight() - (theme.frameFont().height() + 2*theme.bevelWidth());
95 text_y = y + theme.bevelWidth() + theme.frameFont().ascent() + height_offset/2; ///2 + height/2;
95 96
96 switch(theme.frameFontJustify()) { 97 switch(theme.frameFontJustify()) {
97 case FbTk::LEFT: 98 case FbTk::LEFT:
diff --git a/src/FbTk/XftFontImp.cc b/src/FbTk/XftFontImp.cc
index c698238..c2f1dc8 100644
--- a/src/FbTk/XftFontImp.cc
+++ b/src/FbTk/XftFontImp.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: XftFontImp.cc,v 1.3 2004/08/10 11:57:35 fluxgen Exp $ 22//$Id: XftFontImp.cc,v 1.4 2004/08/29 08:33:13 rathnor Exp $
23 23
24#include "XftFontImp.hh" 24#include "XftFontImp.hh"
25#include "App.hh" 25#include "App.hh"
@@ -157,7 +157,10 @@ unsigned int XftFontImp::textWidth(const char * const text, unsigned int len) co
157unsigned int XftFontImp::height() const { 157unsigned int XftFontImp::height() const {
158 if (m_xftfont == 0) 158 if (m_xftfont == 0)
159 return 0; 159 return 0;
160 return m_xftfont->height; 160 return m_xftfont->height;
161 //m_xftfont->ascent + m_xftfont->descent;
162 // curiously, fonts seem to have a smaller height, but the "height"
163 // is specified within the actual font, so it must be right, right?
161} 164}
162 165
163}; // end namespace FbTk 166}; // end namespace FbTk
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 5695639..100ad5b 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: IconbarTool.cc,v 1.42 2004/08/25 17:16:40 rathnor Exp $ 23// $Id: IconbarTool.cc,v 1.43 2004/08/29 08:33:12 rathnor Exp $
24 24
25#include "IconbarTool.hh" 25#include "IconbarTool.hh"
26 26
@@ -543,10 +543,9 @@ void IconbarTool::renderWindow(FluxboxWindow &win) {
543 renderButton(*button); 543 renderButton(*button);
544} 544}
545 545
546void IconbarTool::updateSizing() {
547 m_icon_container.setBorderWidth(m_theme.border().width());
546 548
547void IconbarTool::renderTheme() {
548
549 // update button sizes before we get max width per client!
550 IconList::iterator icon_it = m_icon_list.begin(); 549 IconList::iterator icon_it = m_icon_list.begin();
551 const IconList::iterator icon_it_end = m_icon_list.end(); 550 const IconList::iterator icon_it_end = m_icon_list.end();
552 for (; icon_it != icon_it_end; ++icon_it) { 551 for (; icon_it != icon_it_end; ++icon_it) {
@@ -555,6 +554,13 @@ void IconbarTool::renderTheme() {
555 else // unfocused 554 else // unfocused
556 (*icon_it)->setBorderWidth(m_theme.unfocusedBorder().width()); 555 (*icon_it)->setBorderWidth(m_theme.unfocusedBorder().width());
557 } 556 }
557
558}
559
560void IconbarTool::renderTheme() {
561
562 // update button sizes before we get max width per client!
563 updateSizing();
558 564
559 Pixmap tmp = m_focused_pm; 565 Pixmap tmp = m_focused_pm;
560 Pixmap err_tmp = m_focused_err_pm; 566 Pixmap err_tmp = m_focused_err_pm;
@@ -616,7 +622,8 @@ void IconbarTool::renderTheme() {
616 m_icon_container.setAlpha(m_theme.alpha()); 622 m_icon_container.setAlpha(m_theme.alpha());
617 623
618 // update buttons 624 // update buttons
619 icon_it = m_icon_list.begin(); 625 IconList::iterator icon_it = m_icon_list.begin();
626 const IconList::iterator icon_it_end = m_icon_list.end();
620 for (; icon_it != icon_it_end; ++icon_it) { 627 for (; icon_it != icon_it_end; ++icon_it) {
621 renderButton(*(*icon_it)); 628 renderButton(*(*icon_it));
622 } 629 }
diff --git a/src/IconbarTool.hh b/src/IconbarTool.hh
index 600a862..96b51b5 100644
--- a/src/IconbarTool.hh
+++ b/src/IconbarTool.hh
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: IconbarTool.hh,v 1.14 2004/06/16 15:38:19 rathnor Exp $ 23// $Id: IconbarTool.hh,v 1.15 2004/08/29 08:33:12 rathnor Exp $
24 24
25#ifndef ICONBARTOOL_HH 25#ifndef ICONBARTOOL_HH
26#define ICONBARTOOL_HH 26#define ICONBARTOOL_HH
@@ -79,6 +79,8 @@ private:
79 /// @return button associated with window 79 /// @return button associated with window
80 IconButton *findButton(FluxboxWindow &win); 80 IconButton *findButton(FluxboxWindow &win);
81 81
82 void updateSizing();
83
82 /// render single button that holds win 84 /// render single button that holds win
83 void renderWindow(FluxboxWindow &win); 85 void renderWindow(FluxboxWindow &win);
84 /// render single button, and probably apply changes (clear) 86 /// render single button, and probably apply changes (clear)
diff --git a/src/SystemTray.hh b/src/SystemTray.hh
index 324b544..2091241 100644
--- a/src/SystemTray.hh
+++ b/src/SystemTray.hh
@@ -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: SystemTray.hh,v 1.5 2004/08/25 17:16:40 rathnor Exp $ 22// $Id: SystemTray.hh,v 1.6 2004/08/29 08:33:12 rathnor Exp $
23 23
24#ifndef SYSTEMTRAY_HH 24#ifndef SYSTEMTRAY_HH
25#define SYSTEMTRAY_HH 25#define SYSTEMTRAY_HH
@@ -66,6 +66,7 @@ public:
66 const FbTk::FbWindow &window() const { return m_window; } 66 const FbTk::FbWindow &window() const { return m_window; }
67 67
68 inline void renderTheme() {} 68 inline void renderTheme() {}
69 inline void updateSizing() {}
69 70
70private: 71private:
71 typedef std::list<FbTk::FbWindow *> ClientList; 72 typedef std::list<FbTk::FbWindow *> ClientList;
diff --git a/src/TextTheme.cc b/src/TextTheme.cc
index bebf010..f23e030 100644
--- a/src/TextTheme.cc
+++ b/src/TextTheme.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: TextTheme.cc,v 1.6 2003/08/27 18:05:12 fluxgen Exp $ 23// $Id: TextTheme.cc,v 1.7 2004/08/29 08:33:12 rathnor Exp $
24 24
25#include "TextTheme.hh" 25#include "TextTheme.hh"
26 26
@@ -28,7 +28,7 @@
28 28
29#include <X11/Xlib.h> 29#include <X11/Xlib.h>
30 30
31TextTheme::TextTheme(FbTk::Theme &theme, 31TextTheme::TextTheme(FbTk::Theme &theme,
32 const std::string &name, const std::string &altname): 32 const std::string &name, const std::string &altname):
33 m_font(theme, name + ".font", altname + ".Font"), 33 m_font(theme, name + ".font", altname + ".Font"),
34 m_text_color(theme, name + ".textColor", altname + ".TextColor"), 34 m_text_color(theme, name + ".textColor", altname + ".TextColor"),
@@ -49,6 +49,7 @@ TextTheme::~TextTheme() {
49void TextTheme::update() { 49void TextTheme::update() {
50 m_text_gc.setForeground(*m_text_color); 50 m_text_gc.setForeground(*m_text_color);
51} 51}
52
52 53
53void TextTheme::setAntialias(bool value) { 54void TextTheme::setAntialias(bool value) {
54 font().setAntialias(value); 55 font().setAntialias(value);
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 082a7f2..1be10e2 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Toolbar.cc,v 1.148 2004/08/25 17:16:40 rathnor Exp $ 25// $Id: Toolbar.cc,v 1.149 2004/08/29 08:33:12 rathnor Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -227,6 +227,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
227 m_theme.reconfigSig().attach(this); 227 m_theme.reconfigSig().attach(this);
228 // listen to screen size changes 228 // listen to screen size changes
229 screen().resizeSig().attach(this); 229 screen().resizeSig().attach(this);
230 screen().reconfigureSig().attach(this); // get this on antialias change
230 231
231 moveToLayer((*m_rc_layernum).getNum()); 232 moveToLayer((*m_rc_layernum).getNum());
232 233
@@ -453,12 +454,16 @@ void Toolbar::reconfigure() {
453 454
454 ItemList::iterator item_it = m_item_list.begin(); 455 ItemList::iterator item_it = m_item_list.begin();
455 ItemList::iterator item_it_end = m_item_list.end(); 456 ItemList::iterator item_it_end = m_item_list.end();
456 for (item_it = m_item_list.begin(); item_it != item_it_end; ++item_it) { 457 for (; item_it != item_it_end; ++item_it) {
457 (*item_it)->renderTheme(); 458 (*item_it)->updateSizing();
458 } 459 }
459 460
460 rearrangeItems(); 461 rearrangeItems();
461 462
463 for (item_it = m_item_list.begin(); item_it != item_it_end; ++item_it) {
464 (*item_it)->renderTheme();
465 }
466
462 menu().reconfigure(); 467 menu().reconfigure();
463 // we're done with all resizing and stuff now we can request a new 468 // we're done with all resizing and stuff now we can request a new
464 // area to be reserved on screen 469 // area to be reserved on screen
@@ -568,11 +573,11 @@ void Toolbar::update(FbTk::Subject *subj) {
568 // either screen reconfigured, theme was reloaded 573 // either screen reconfigured, theme was reloaded
569 // or a tool resized itself 574 // or a tool resized itself
570 575
571 if (typeid(*subj) == typeid(ToolbarItem::ToolbarItemSubject)) { 576 if (typeid(*subj) == typeid(ToolbarItem::ToolbarItemSubject))
572 rearrangeItems(); 577 rearrangeItems();
573 } else { 578 else
574 reconfigure(); 579 reconfigure();
575 } 580
576} 581}
577 582
578void Toolbar::setPlacement(Toolbar::Placement where) { 583void Toolbar::setPlacement(Toolbar::Placement where) {
diff --git a/src/ToolbarItem.hh b/src/ToolbarItem.hh
index 20cfd0c..0e77766 100644
--- a/src/ToolbarItem.hh
+++ b/src/ToolbarItem.hh
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: ToolbarItem.hh,v 1.5 2004/08/25 17:16:40 rathnor Exp $ 23// $Id: ToolbarItem.hh,v 1.6 2004/08/29 08:33:13 rathnor Exp $
24 24
25#ifndef TOOLBARITEM_HH 25#ifndef TOOLBARITEM_HH
26#define TOOLBARITEM_HH 26#define TOOLBARITEM_HH
@@ -57,6 +57,9 @@ public:
57 // the toolbar instead. Otherwise there are ordering problems. 57 // the toolbar instead. Otherwise there are ordering problems.
58 virtual void renderTheme() = 0; 58 virtual void renderTheme() = 0;
59 59
60 // just update theme items that affect the size
61 virtual void updateSizing() = 0;
62
60 FbTk::Subject &resizeSig() { return m_resize_sig; } 63 FbTk::Subject &resizeSig() { return m_resize_sig; }
61 64
62 void setType(Type type) { m_type = type; } 65 void setType(Type type) { m_type = type; }
diff --git a/src/WorkspaceNameTool.cc b/src/WorkspaceNameTool.cc
index d1fe945..245fce5 100644
--- a/src/WorkspaceNameTool.cc
+++ b/src/WorkspaceNameTool.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: WorkspaceNameTool.cc,v 1.9 2004/08/25 17:16:40 rathnor Exp $ 23// $Id: WorkspaceNameTool.cc,v 1.10 2004/08/29 08:33:13 rathnor Exp $
24 24
25#include "WorkspaceNameTool.hh" 25#include "WorkspaceNameTool.hh"
26 26
@@ -109,6 +109,10 @@ void WorkspaceNameTool::hide() {
109 m_button.hide(); 109 m_button.hide();
110} 110}
111 111
112void WorkspaceNameTool::updateSizing() {
113 m_button.setBorderWidth(m_theme.border().width());
114}
115
112void WorkspaceNameTool::renderTheme() { 116void WorkspaceNameTool::renderTheme() {
113 Pixmap tmp = m_pixmap; 117 Pixmap tmp = m_pixmap;
114 if (!m_theme.texture().usePixmap()) { 118 if (!m_theme.texture().usePixmap()) {
diff --git a/src/WorkspaceNameTool.hh b/src/WorkspaceNameTool.hh
index b51008e..bc6dd63 100644
--- a/src/WorkspaceNameTool.hh
+++ b/src/WorkspaceNameTool.hh
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: WorkspaceNameTool.hh,v 1.4 2003/08/23 15:45:38 fluxgen Exp $ 23// $Id: WorkspaceNameTool.hh,v 1.5 2004/08/29 08:33:13 rathnor Exp $
24 24
25#ifndef WORKSPACENAMETOOL_HH 25#ifndef WORKSPACENAMETOOL_HH
26#define WORKSPACENAMETOOL_HH 26#define WORKSPACENAMETOOL_HH
@@ -54,6 +54,7 @@ public:
54 const FbTk::Button &button() const { return m_button; } 54 const FbTk::Button &button() const { return m_button; }
55private: 55private:
56 void renderTheme(); 56 void renderTheme();
57 void updateSizing();
57 FbTk::TextButton m_button; 58 FbTk::TextButton m_button;
58 const ToolTheme &m_theme; 59 const ToolTheme &m_theme;
59 BScreen &m_screen; 60 BScreen &m_screen;