summaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Menu.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 8b4a91e..8b4ddd2 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.40 2003/11/01 00:12:53 rathnor Exp $ 25// $Id: Menu.cc,v 1.41 2003/11/19 12:57:27 rathnor Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -425,11 +425,12 @@ void Menu::update(int active_index) {
425 if (! menu.width) menu.width = menu.item_w; 425 if (! menu.width) menu.width = menu.item_w;
426 426
427 menu.frame_h = (menu.item_h * menu.persub); 427 menu.frame_h = (menu.item_h * menu.persub);
428 if (menu.frame_h < 1) 428 if (menu.frame_h < 0)
429 menu.frame_h = 1; 429 menu.frame_h = 0;
430 430
431 menu.height = (title_vis ? menu.title_h + menu.title.borderWidth() : 0) + 431 menu.height = menu.frame_h;
432 menu.frame_h; 432 if (title_vis)
433 menu.height += menu.title_h + ((menu.frame_h>0)?menu.title.borderWidth():0);
433 434
434 if (menu.height < 1) 435 if (menu.height < 1)
435 menu.height = 1; 436 menu.height = 1;
@@ -554,7 +555,7 @@ void Menu::show() {
554 raise(); 555 raise();
555 visible = true; 556 visible = true;
556 557
557 if (! m_parent) { 558 if (! m_parent && shown != this) {
558 if (shown && (! shown->torn)) 559 if (shown && (! shown->torn))
559 shown->hide(); 560 shown->hide();
560 561