diff options
author | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2013-11-12 12:21:39 +0100 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2013-11-12 12:21:39 +0100 |
commit | eb5458234d8e343f781fa4ed69749814af18384c (patch) | |
tree | 7068735ede09c3d4d6a5e46c6d47e0e9e0c7ccde /displaymenu.c | |
parent | 4837373eaba18dcab8fd39d1c3a8f4c5c9a83e8b (diff) | |
download | skin-flatplus-eb5458234d8e343f781fa4ed69749814af18384c.tar.gz skin-flatplus-eb5458234d8e343f781fa4ed69749814af18384c.tar.bz2 |
fix fixed font SetText in displaymenu
Diffstat (limited to 'displaymenu.c')
-rw-r--r-- | displaymenu.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/displaymenu.c b/displaymenu.c index d7bfec18..e31c83dd 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -33,7 +33,7 @@ cFlatDisplayMenu::cFlatDisplayMenu(void) { cHeight = osdHeight - (topBarHeight + Config.decorBorderTopBarSize*2 + buttonsHeight + Config.decorBorderButtonSize*2 + marginItem*3 + chHeight + Config.decorBorderMenuContentHeadSize*2 + Config.decorBorderMenuContentSize*2); - ContentCreate(cLeft, cTop, cWidth, cHeight); + ContentCreate(cLeft, cTop, cWidth, cHeight, false); scrollbarPixmap = osd->CreatePixmap(2, cRect(osdWidth - scrollBarWidth, scrollBarTop, scrollBarWidth, scrollBarHeight)); @@ -401,11 +401,18 @@ void cFlatDisplayMenu::SetText(const char *Text, bool FixedFont) { return; contentHeadPixmap->Fill(clrTransparent); - ContentSet( Text, false, Theme.Color(clrMenuTextFont), Theme.Color(clrMenuTextBg) ); + int Left = Config.decorBorderMenuContentSize; + int Top = topBarHeight + marginItem + Config.decorBorderTopBarSize*2 + Config.decorBorderMenuContentHeadSize; + int Width = menuWidth - Config.decorBorderMenuContentSize*2; + int Height = osdHeight - (topBarHeight + Config.decorBorderTopBarSize*2 + + buttonsHeight + Config.decorBorderButtonSize*2 + marginItem*3); + ContentCreate(Left, Top, Width, Height, FixedFont); + + ContentSet( Text, FixedFont, Theme.Color(clrMenuTextFont), Theme.Color(clrMenuTextBg) ); if( ContentScrollable() ) - SetScrollbar( ContentScrollTotal(), 0 ); + DrawScrollbar(ContentScrollTotal(), ContentScrollOffset(), ContentVisibleLines(), contentTop - scrollBarTop, ContentGetHeight(), ContentScrollOffset() > 0, ContentScrollOffset() + ContentVisibleLines() < ContentScrollTotal()); - DecorBorderDraw(cLeft, cTop, cWidth, ContentGetHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, + DecorBorderDraw(Left, Top, Width, ContentGetHeight(), Config.decorBorderMenuContentSize, Config.decorBorderMenuContentType, Config.decorBorderMenuContentFg, Config.decorBorderMenuContentBg); } |