diff options
author | rathnor <rathnor> | 2004-08-29 08:33:13 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2004-08-29 08:33:13 (GMT) |
commit | 97ef84da598aed61a6cb57a62796f302043181e8 (patch) | |
tree | fd68f9ef6703322537eca3743c3217b281d6ce7c /src/FbTk/Menu.cc | |
parent | 8a59b9b4541490badaf3e1a0503b4ca5f0105c8f (diff) | |
download | fluxbox_pavel-97ef84da598aed61a6cb57a62796f302043181e8.zip fluxbox_pavel-97ef84da598aed61a6cb57a62796f302043181e8.tar.bz2 |
a few random fixes
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r-- | src/FbTk/Menu.cc | 11 |
1 files changed, 8 insertions, 3 deletions
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 | ||