From df570bc9452b24e963c38591cfcb185eb70a8a38 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 5 Jul 2004 09:40:08 +0000 Subject: fixed menutitle and menulables drawn to close to screen-bottom, patch from Mathias Gumz --- src/FbTk/Menu.cc | 4 ++-- src/FbTk/MenuItem.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index ac8d651..9109913 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Menu.cc,v 1.69 2004/06/27 13:50:24 fluxgen Exp $ +// $Id: Menu.cc,v 1.70 2004/07/05 09:40:08 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE @@ -768,7 +768,7 @@ void Menu::redrawTitle() { screenNumber(), theme().titleTextGC().gc(), // graphic context text, len, // text string with lenght - dx, theme().titleHeight()/2 + (font.ascent() + theme().bevelWidth())/2); // position + dx, theme().titleHeight()/2 + (font.ascent() - theme().bevelWidth())/2); // position } diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc index 0d5989f..be8555b 100644 --- a/src/FbTk/MenuItem.cc +++ b/src/FbTk/MenuItem.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuItem.cc,v 1.3 2004/06/10 11:40:43 fluxgen Exp $ +// $Id: MenuItem.cc,v 1.4 2004/07/05 09:40:08 fluxgen Exp $ #include "MenuItem.hh" #include "Command.hh" @@ -90,7 +90,7 @@ void MenuItem::draw(FbDrawable &draw, int text_w = theme.frameFont().textWidth(label().c_str(), label().size()); - text_y = y + theme.bevelWidth()/2 + theme.frameFont().ascent()/2 + height/2; + text_y = y - theme.bevelWidth()/2 + theme.frameFont().ascent()/2 + height/2; switch(theme.frameFontJustify()) { case FbTk::LEFT: -- cgit v0.11.2