diff options
author | rathnor <rathnor> | 2003-05-01 14:33:36 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-05-01 14:33:36 (GMT) |
commit | ed3f64bc5fc84fe1d33b3c95e9ea7efeb6012f81 (patch) | |
tree | afaae6daceeef5fbc31497e48ce9368ecb9cb941 /src | |
parent | c5e5009c2faf48db34ae2d15fda05ba1c46e10d9 (diff) | |
download | fluxbox_lack-ed3f64bc5fc84fe1d33b3c95e9ea7efeb6012f81.zip fluxbox_lack-ed3f64bc5fc84fe1d33b3c95e9ea7efeb6012f81.tar.bz2 |
Fix some alignment and redraw problems
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/Menu.cc | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 003e593..cc56266 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.18 2003/04/28 01:32:47 fluxgen Exp $ | 25 | // $Id: Menu.cc,v 1.19 2003/05/01 14:33:36 rathnor Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -521,8 +521,10 @@ void Menu::move(int x, int y) { | |||
521 | if (which_sub != -1) | 521 | if (which_sub != -1) |
522 | drawSubmenu(which_sub); | 522 | drawSubmenu(which_sub); |
523 | 523 | ||
524 | if (m_parent && !m_parent->moving && !torn) | 524 | if (!(m_parent && m_parent->moving) && !torn) { |
525 | redrawTitle(); | ||
525 | renderTransFrame(); | 526 | renderTransFrame(); |
527 | } | ||
526 | } | 528 | } |
527 | 529 | ||
528 | 530 | ||
@@ -544,7 +546,7 @@ void Menu::redrawTitle() { | |||
544 | default: | 546 | default: |
545 | break; | 547 | break; |
546 | } | 548 | } |
547 | 549 | menu.title.clear(); | |
548 | font.drawText( | 550 | font.drawText( |
549 | menu.title.window(), // drawable | 551 | menu.title.window(), // drawable |
550 | screenNumber(), | 552 | screenNumber(), |
@@ -561,9 +563,9 @@ void Menu::redrawTitle() { | |||
561 | m_root_pm = root_pm; | 563 | m_root_pm = root_pm; |
562 | } | 564 | } |
563 | m_trans->setDest(menu.title.window(), menu.title.screenNumber()); | 565 | m_trans->setDest(menu.title.window(), menu.title.screenNumber()); |
564 | m_trans->render(menu.window.x() + menu.title.x() - menu.window.borderWidth(), | 566 | m_trans->render(menu.window.x() + menu.title.x() + menu.window.borderWidth()*2, |
565 | menu.window.y() + menu.title.y() - menu.window.borderWidth(), | 567 | menu.window.y() + menu.title.y() + menu.window.borderWidth()*2, |
566 | menu.title.x(), menu.title.y(), | 568 | 0, 0, |
567 | menu.title.width(), menu.title.height()); | 569 | menu.title.width(), menu.title.height()); |
568 | } | 570 | } |
569 | } | 571 | } |
@@ -855,9 +857,9 @@ void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_ | |||
855 | } | 857 | } |
856 | 858 | ||
857 | m_trans->setDest(menu.frame.window(), menu.frame.screenNumber()); | 859 | m_trans->setDest(menu.frame.window(), menu.frame.screenNumber()); |
858 | m_trans->render(menu.window.x() + menu.frame.x() + item_x - | 860 | m_trans->render(menu.window.x() + menu.frame.x() + item_x + |
859 | menu.window.borderWidth(), | 861 | menu.window.borderWidth(), |
860 | menu.window.y() + menu.frame.y() + item_y - | 862 | menu.window.y() + menu.frame.y() + item_y + |
861 | menu.window.borderWidth(), | 863 | menu.window.borderWidth(), |
862 | item_x, item_y, | 864 | item_x, item_y, |
863 | menu.item_w, menu.item_h); | 865 | menu.item_w, menu.item_h); |
@@ -1184,8 +1186,7 @@ void Menu::reconfigure() { | |||
1184 | 1186 | ||
1185 | update(); | 1187 | update(); |
1186 | } | 1188 | } |
1187 | 1189 | ||
1188 | |||
1189 | void Menu::renderTransFrame() { | 1190 | void Menu::renderTransFrame() { |
1190 | if (m_trans.get() == 0 || moving) | 1191 | if (m_trans.get() == 0 || moving) |
1191 | return; | 1192 | return; |
@@ -1203,8 +1204,8 @@ void Menu::renderTransFrame() { | |||
1203 | } | 1204 | } |
1204 | menu.frame.clear(); | 1205 | menu.frame.clear(); |
1205 | m_trans->setDest(menu.frame.window(), menu.window.screenNumber()); | 1206 | m_trans->setDest(menu.frame.window(), menu.window.screenNumber()); |
1206 | m_trans->render(menu.window.x() + menu.frame.x(), | 1207 | m_trans->render(menu.window.x() + menu.frame.x() + menu.window.borderWidth(), |
1207 | menu.window.y() + menu.frame.y(), | 1208 | menu.window.y() + menu.frame.y() + menu.window.borderWidth(), |
1208 | 0, 0, | 1209 | 0, 0, |
1209 | menu.frame.width(), menu.frame.height()); | 1210 | menu.frame.width(), menu.frame.height()); |
1210 | 1211 | ||