aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Menu.cc4
-rw-r--r--src/FbTk/MenuTheme.cc3
-rw-r--r--src/FbTk/MenuTheme.hh9
3 files changed, 6 insertions, 10 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index a61bbc7..7cf2ac9 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -998,7 +998,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) {
998 // start submenu open delay 998 // start submenu open delay
999 timeval timeout; 999 timeval timeout;
1000 timeout.tv_sec = 0; 1000 timeout.tv_sec = 0;
1001 timeout.tv_usec = theme()->delayOpen() * 1000; // transformed to usec 1001 timeout.tv_usec = theme()->getDelay() * 1000; // transformed to usec
1002 m_submenu_timer.setTimeout(timeout); 1002 m_submenu_timer.setTimeout(timeout);
1003 m_submenu_timer.start(); 1003 m_submenu_timer.start();
1004 } else if (isItemSelectable(w)){ 1004 } else if (isItemSelectable(w)){
@@ -1191,7 +1191,7 @@ void Menu::closeMenu() {
1191void Menu::startHide() { 1191void Menu::startHide() {
1192 timeval timeout; 1192 timeval timeout;
1193 timeout.tv_sec = 0; 1193 timeout.tv_sec = 0;
1194 timeout.tv_usec = theme()->delayClose() * 1000; // transformed to usec 1194 timeout.tv_usec = theme()->getDelay() * 1000; // transformed to usec
1195 m_hide_timer.setTimeout(timeout); 1195 m_hide_timer.setTimeout(timeout);
1196 m_hide_timer.start(); 1196 m_hide_timer.start();
1197} 1197}
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc
index b6e8f93..28bcc35 100644
--- a/src/FbTk/MenuTheme.cc
+++ b/src/FbTk/MenuTheme.cc
@@ -72,8 +72,7 @@ MenuTheme::MenuTheme(int screen_num):
72 d_text_gc(RootWindow(m_display, screen_num)), 72 d_text_gc(RootWindow(m_display, screen_num)),
73 hilite_gc(RootWindow(m_display, screen_num)), 73 hilite_gc(RootWindow(m_display, screen_num)),
74 m_alpha(255), 74 m_alpha(255),
75 m_delayopen(0), // no delay as default 75 m_delay(0), // no delay as default
76 m_delayclose(0), // no delay as default
77 m_real_title_height(*m_title_height), 76 m_real_title_height(*m_title_height),
78 m_real_item_height(*m_item_height) 77 m_real_item_height(*m_item_height)
79{ 78{
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh
index 59fcbaf..c10615b 100644
--- a/src/FbTk/MenuTheme.hh
+++ b/src/FbTk/MenuTheme.hh
@@ -111,10 +111,8 @@ public:
111 // this isn't actually a theme item 111 // this isn't actually a theme item
112 // but we'll let it be here for now, until there's a better way to 112 // but we'll let it be here for now, until there's a better way to
113 // get resources into menu 113 // get resources into menu
114 void setDelayOpen(int msec) { m_delayopen = msec; } 114 void setDelay(int msec) { m_delay = msec; }
115 void setDelayClose(int msec) { m_delayclose = msec; } 115 int getDelay() const { return m_delay; }
116 int delayOpen() const { return m_delayopen; }
117 int delayClose() const { return m_delayclose; }
118 116
119 const Color &borderColor() const { return *m_border_color; } 117 const Color &borderColor() const { return *m_border_color; }
120 Shape::ShapePlace shapePlaces() const { return *m_shapeplace; } 118 Shape::ShapePlace shapePlaces() const { return *m_shapeplace; }
@@ -157,8 +155,7 @@ private:
157 GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; 155 GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc;
158 156
159 unsigned char m_alpha; 157 unsigned char m_alpha;
160 unsigned int m_delayopen; ///< in msec 158 unsigned int m_delay; ///< in msec
161 unsigned int m_delayclose; ///< in msec
162 unsigned int m_real_title_height; ///< the calculated item height (from font and menu.titleHeight) 159 unsigned int m_real_title_height; ///< the calculated item height (from font and menu.titleHeight)
163 unsigned int m_real_item_height; ///< the calculated item height (from font and menu.itemHeight) 160 unsigned int m_real_item_height; ///< the calculated item height (from font and menu.itemHeight)
164}; 161};