aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-06-13 12:01:52 (GMT)
committerfluxgen <fluxgen>2004-06-13 12:01:52 (GMT)
commit463c7dab18d78973671c7d3aba3c47d62a30cc00 (patch)
tree39c39dce946da8d75c289f597b67db5752c5d5ac
parent2475b2debcd9bd6f318ff1dcde8020ebeb81f11c (diff)
downloadfluxbox_paul-463c7dab18d78973671c7d3aba3c47d62a30cc00.zip
fluxbox_paul-463c7dab18d78973671c7d3aba3c47d62a30cc00.tar.bz2
minor fix
-rw-r--r--src/FbTk/Menu.cc8
-rw-r--r--src/FbTk/MenuTheme.cc8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 204bede..2a91ee4 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.65 2004/06/13 10:58:34 fluxgen Exp $ 25// $Id: Menu.cc,v 1.66 2004/06/13 12:01:52 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -160,7 +160,7 @@ Menu::Menu(MenuTheme &tm, ImageControl &imgctrl):
160 event_mask, // mask 160 event_mask, // mask
161 false, // override redirect 161 false, // override redirect
162 true); // save under 162 true); // save under
163 163
164 evm.add(*this, menu.title); 164 evm.add(*this, menu.title);
165 165
166 event_mask |= PointerMotionMask; 166 event_mask |= PointerMotionMask;
@@ -172,6 +172,8 @@ Menu::Menu(MenuTheme &tm, ImageControl &imgctrl):
172 true); // save under 172 true); // save under
173 evm.add(*this, menu.frame); 173 evm.add(*this, menu.frame);
174 174
175 menu.title.raise();
176
175} 177}
176 178
177Menu::~Menu() { 179Menu::~Menu() {
@@ -531,7 +533,7 @@ void Menu::update(int active_index) {
531 533
532 menu.frame.moveResize(0, ((title_vis) ? menu.title.y() + menu.title.height() + 534 menu.frame.moveResize(0, ((title_vis) ? menu.title.y() + menu.title.height() +
533 menu.title.borderWidth()*2 : 0), 535 menu.title.borderWidth()*2 : 0),
534 menu.window.width(), menu.frame_h); 536 width(), menu.frame_h);
535 537
536 538
537 if (m_need_update && (m_frame_pm.width() != menu.frame.width() || 539 if (m_need_update && (m_frame_pm.width() != menu.frame.width() ||
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc
index ebee2e5..18861ab 100644
--- a/src/FbTk/MenuTheme.cc
+++ b/src/FbTk/MenuTheme.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: MenuTheme.cc,v 1.17 2004/06/13 10:59:54 fluxgen Exp $ 22// $Id: MenuTheme.cc,v 1.18 2004/06/13 12:01:15 fluxgen Exp $
23 23
24#include "MenuTheme.hh" 24#include "MenuTheme.hh"
25 25
@@ -70,6 +70,9 @@ MenuTheme::MenuTheme(int screen_num):
70 m_real_title_height(*m_title_height), 70 m_real_title_height(*m_title_height),
71 m_real_item_height(*m_item_height) 71 m_real_item_height(*m_item_height)
72{ 72{
73 m_real_item_height = m_real_item_height == 0 ? 1 : m_real_item_height;
74 m_real_title_height = m_real_title_height == 0 ? 1 : m_real_title_height;
75
73 // set default values 76 // set default values
74 *m_border_width = 0; 77 *m_border_width = 0;
75 *m_bevel_width = 0; 78 *m_bevel_width = 0;
@@ -98,6 +101,9 @@ void MenuTheme::reconfigTheme() {
98 m_real_title_height = std::max(*m_title_height, 101 m_real_title_height = std::max(*m_title_height,
99 titleFont().height() + 2*bevelWidth()); 102 titleFont().height() + 2*bevelWidth());
100 103
104 m_real_item_height = m_real_item_height == 0 ? 1 : m_real_item_height;
105 m_real_title_height = m_real_title_height == 0 ? 1 : m_real_title_height;
106
101 m_bullet_pixmap->scale(itemHeight(), itemHeight()); 107 m_bullet_pixmap->scale(itemHeight(), itemHeight());
102 m_selected_pixmap->scale(itemHeight(), itemHeight()); 108 m_selected_pixmap->scale(itemHeight(), itemHeight());
103 m_unselected_pixmap->scale(itemHeight(), itemHeight()); 109 m_unselected_pixmap->scale(itemHeight(), itemHeight());