diff --git a/src/driver/fb_generic.cpp b/src/driver/fb_generic.cpp index 9c706c0eb..787aaf23e 100644 --- a/src/driver/fb_generic.cpp +++ b/src/driver/fb_generic.cpp @@ -269,16 +269,16 @@ unsigned int CFrameBuffer::getScreenHeight(bool real) return g_settings.screen_EndY - g_settings.screen_StartY; } -unsigned int CFrameBuffer::getScreenWidthRel(bool force_small) +unsigned int CFrameBuffer::getWindowWidth(bool force_small) { - int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_width; + int percent = force_small ? WINDOW_SIZE_SMALL : g_settings.window_width; // always reduce a possible detailsline return (g_settings.screen_EndX - g_settings.screen_StartX - 2*DETAILSLINE_WIDTH) * percent / 100; } -unsigned int CFrameBuffer::getScreenHeightRel(bool force_small) +unsigned int CFrameBuffer::getWindowHeight(bool force_small) { - int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_height; + int percent = force_small ? WINDOW_SIZE_SMALL : g_settings.window_height; return (g_settings.screen_EndY - g_settings.screen_StartY) * percent / 100; } diff --git a/src/driver/fb_generic.h b/src/driver/fb_generic.h index 4b68e1e18..69732fa19 100644 --- a/src/driver/fb_generic.h +++ b/src/driver/fb_generic.h @@ -74,7 +74,7 @@ typedef struct gradientData_t #define WINDOW_SIZE_MAX 100 // % #define WINDOW_SIZE_MIN 50 // % -#define WINDOW_SIZE_MIN_FORCED 80 // % +#define WINDOW_SIZE_SMALL 80 // % /** Ausfuehrung als Singleton */ class CFrameBuffer : public sigc::trackable @@ -184,8 +184,8 @@ class CFrameBuffer : public sigc::trackable virtual unsigned int getStride() const; // size of a single line in the framebuffer (in bytes) unsigned int getScreenWidth(bool real = false); unsigned int getScreenHeight(bool real = false); - unsigned int getScreenWidthRel(bool force_small = false); - unsigned int getScreenHeightRel(bool force_small = false); + unsigned int getWindowWidth(bool force_small = false); + unsigned int getWindowHeight(bool force_small = false); unsigned int getScreenX(); unsigned int getScreenY(); diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index f3139410b..eafe6d325 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -454,16 +454,16 @@ unsigned int CFrameBuffer::getScreenHeight(bool real) return g_settings.screen_EndY - g_settings.screen_StartY; } -unsigned int CFrameBuffer::getScreenWidthRel(bool force_small) +unsigned int CFrameBuffer::getWindowWidth(bool force_small) { - int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_width; + int percent = force_small ? WINDOW_SIZE_SMALL : g_settings.window_width; // always reduce a possible detailsline return (g_settings.screen_EndX - g_settings.screen_StartX - 2*DETAILSLINE_WIDTH) * percent / 100; } -unsigned int CFrameBuffer::getScreenHeightRel(bool force_small) +unsigned int CFrameBuffer::getWindowHeight(bool force_small) { - int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_height; + int percent = force_small ? WINDOW_SIZE_SMALL : g_settings.window_height; return (g_settings.screen_EndY - g_settings.screen_StartY) * percent / 100; } diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index 74977914d..3f5b2ac2a 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -69,7 +69,7 @@ typedef struct gradientData_t #define WINDOW_SIZE_MAX 100 // % #define WINDOW_SIZE_MIN 50 // % -#define WINDOW_SIZE_MIN_FORCED 80 // % +#define WINDOW_SIZE_SMALL 80 // % /** Ausfuehrung als Singleton */ class CFrameBuffer : public sigc::trackable @@ -184,8 +184,8 @@ class CFrameBuffer : public sigc::trackable unsigned int getStride() const; // size of a single line in the framebuffer (in bytes) unsigned int getScreenWidth(bool real = false); unsigned int getScreenHeight(bool real = false); - unsigned int getScreenWidthRel(bool force_small = false); - unsigned int getScreenHeightRel(bool force_small = false); + unsigned int getWindowWidth(bool force_small = false); + unsigned int getWindowHeight(bool force_small = false); unsigned int getScreenX(); unsigned int getScreenY(); diff --git a/src/driver/framebuffer_ng.cpp b/src/driver/framebuffer_ng.cpp index 5bd27337f..b7fa12fb9 100644 --- a/src/driver/framebuffer_ng.cpp +++ b/src/driver/framebuffer_ng.cpp @@ -307,16 +307,16 @@ unsigned int CFrameBuffer::getScreenHeight(bool real) return g_settings.screen_EndY - g_settings.screen_StartY; } -unsigned int CFrameBuffer::getScreenWidthRel(bool force_small) +unsigned int CFrameBuffer::getWindowWidth(bool force_small) { - int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_width; + int percent = force_small ? WINDOW_SIZE_SMALL : g_settings.window_width; // always reduce a possible detailline return (g_settings.screen_EndX - g_settings.screen_StartX - 2*ConnectLineBox_Width) * percent / 100; } -unsigned int CFrameBuffer::getScreenHeightRel(bool force_small) +unsigned int CFrameBuffer::getWindowHeight(bool force_small) { - int percent = force_small ? WINDOW_SIZE_MIN_FORCED : g_settings.window_height; + int percent = force_small ? WINDOW_SIZE_SMALL : g_settings.window_height; return (g_settings.screen_EndY - g_settings.screen_StartY) * percent / 100; } diff --git a/src/driver/framebuffer_ng.h b/src/driver/framebuffer_ng.h index 7599c1f76..bc091a4ad 100644 --- a/src/driver/framebuffer_ng.h +++ b/src/driver/framebuffer_ng.h @@ -68,7 +68,7 @@ typedef struct gradientData_t #define WINDOW_SIZE_MAX 100 // % #define WINDOW_SIZE_MIN 50 // % -#define WINDOW_SIZE_MIN_FORCED 80 // % +#define WINDOW_SIZE_SMALL 80 // % #define ConnectLineBox_Width 16 // px #if HAVE_GENERIC_HARDWARE @@ -174,8 +174,8 @@ class CFrameBuffer : public sigc::trackable unsigned int getStride() const; // size of a single line in the framebuffer (in bytes) unsigned int getScreenWidth(bool real = false); unsigned int getScreenHeight(bool real = false); - unsigned int getScreenWidthRel(bool force_small = false); - unsigned int getScreenHeightRel(bool force_small = false); + unsigned int getWindowWidth(bool force_small = false); + unsigned int getWindowHeight(bool force_small = false); unsigned int getScreenX(); unsigned int getScreenY(); diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index cf27eaab5..338a776cb 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -290,8 +290,8 @@ int CAudioPlayerGui::exec(CMenuTarget* parent, const std::string &actionKey) m_selected = 0; - m_width = m_frameBuffer->getScreenWidthRel(); - m_height = m_frameBuffer->getScreenHeightRel(); + m_width = m_frameBuffer->getWindowWidth(); + m_height = m_frameBuffer->getWindowHeight(); m_header_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); m_item_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); diff --git a/src/gui/bedit/bouqueteditor_globals.cpp b/src/gui/bedit/bouqueteditor_globals.cpp index 8e0235edc..939224ff8 100644 --- a/src/gui/bedit/bouqueteditor_globals.cpp +++ b/src/gui/bedit/bouqueteditor_globals.cpp @@ -49,8 +49,8 @@ void CBEGlobals::init() item_font = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]; info_font = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]; - width = frameBuffer->getScreenWidthRel(); - height = frameBuffer->getScreenHeightRel(); + width = frameBuffer->getWindowWidth(); + height = frameBuffer->getWindowHeight(); if (!header) header = new CComponentsHeader(); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 974e31fcb..bdb6bf0c0 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -494,7 +494,7 @@ void CChannelList::calcSize() minitv_is_active = ( (g_settings.channellist_additional == SNeutrinoSettings::CHANNELLIST_ADDITIONAL_MODE_MINITV) && (CNeutrinoApp::getInstance()->getMode() != NeutrinoModes::mode_ts) ); // calculate width - full_width = minitv_is_active ? (frameBuffer->getScreenWidth()-2*DETAILSLINE_WIDTH) : frameBuffer->getScreenWidthRel(); + full_width = frameBuffer->getWindowWidth(); if (g_settings.channellist_additional) width = full_width / 3 * 2; @@ -506,7 +506,7 @@ void CChannelList::calcSize() info_height = 2*fheight + fdescrheight + 2*OFFSET_INNER_SMALL; else info_height = 0; - height = minitv_is_active ? frameBuffer->getScreenHeight() : frameBuffer->getScreenHeightRel(); + height = frameBuffer->getWindowHeight(); height = height - OFFSET_INTER - info_height; // calculate x position diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 368444d85..f63161395 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -798,8 +798,8 @@ void EpgPlus::init() currentViewMode = ViewMode_Scroll; currentSwapMode = SwapMode_ByPage; #endif - usableScreenWidth = frameBuffer->getScreenWidthRel(); - usableScreenHeight = frameBuffer->getScreenHeightRel(); + usableScreenWidth = frameBuffer->getWindowWidth(); + usableScreenHeight = frameBuffer->getWindowHeight(); for (size_t i = 0; i < NumberOfSizeSettings; ++i) { diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index c22ecff12..752bda5e9 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -138,8 +138,8 @@ CEpgData::~CEpgData() void CEpgData::start() { - ox = frameBuffer->getScreenWidthRel(bigFonts ? false /* big */ : true /* small */); - oy = frameBuffer->getScreenHeightRel(bigFonts ? false /* big */ : true /* small */); + ox = frameBuffer->getWindowWidth(bigFonts ? false /* big */ : true /* small */); + oy = frameBuffer->getWindowHeight(bigFonts ? false /* big */ : true /* small */); font_title = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_TITLE]; topheight = font_title->getHeight(); diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index b72bbfd64..26e550fbd 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -307,14 +307,14 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna if (ch) epg_id = ch->getEpgID(); - full_width = frameBuffer->getScreenWidthRel(); + full_width = frameBuffer->getWindowWidth(); x = getScreenStartX(full_width); if (g_settings.eventlist_additional) width = full_width / 3 * 2; else width = full_width; - height = frameBuffer->getScreenHeightRel(); + height = frameBuffer->getWindowHeight(); // Calculate header_height header_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index c49654d55..dbbf738dd 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -266,8 +266,8 @@ void CFileBrowser::fontInit() fnt_title = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]; fnt_item = g_Font[SNeutrinoSettings::FONT_TYPE_FILEBROWSER_ITEM]; fnt_foot = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]; - width = frameBuffer->getScreenWidthRel(); - height = frameBuffer->getScreenHeightRel(); + width = frameBuffer->getWindowWidth(); + height = frameBuffer->getWindowHeight(); x = getScreenStartX(width); header_height = fnt_title->getHeight(); diff --git a/src/gui/moviebrowser/mb.cpp b/src/gui/moviebrowser/mb.cpp index 6e32e4e76..ccf16dc2b 100644 --- a/src/gui/moviebrowser/mb.cpp +++ b/src/gui/moviebrowser/mb.cpp @@ -501,8 +501,8 @@ void CMovieBrowser::initFrames(void) m_pcFontTitle = TITLE_FONT; //TRACE("[mb]->%s\n", __func__); - m_cBoxFrame.iWidth = framebuffer->getScreenWidthRel(); - m_cBoxFrame.iHeight = framebuffer->getScreenHeightRel(); + m_cBoxFrame.iWidth = framebuffer->getWindowWidth(); + m_cBoxFrame.iHeight = framebuffer->getWindowHeight(); m_cBoxFrame.iX = getScreenStartX(m_cBoxFrame.iWidth); m_cBoxFrame.iY = getScreenStartY(m_cBoxFrame.iHeight); diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index d763ac1b6..9eb382101 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -1672,8 +1672,8 @@ void COsdSetup::paintWindowSize(int w, int h) if (g_settings.window_height < WINDOW_SIZE_MIN) g_settings.window_height = WINDOW_SIZE_MIN; - win_demo->setWidth(frameBuffer->getScreenWidthRel()); - win_demo->setHeight(frameBuffer->getScreenHeightRel()); + win_demo->setWidth(frameBuffer->getWindowWidth()); + win_demo->setHeight(frameBuffer->getWindowHeight()); win_demo->setXPos(getScreenStartX(win_demo->getWidth())); win_demo->setYPos(getScreenStartY(win_demo->getHeight())); diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 150a2e7fb..3f75ad4d1 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -160,8 +160,8 @@ int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey) selected = 0; - width = frameBuffer->getScreenWidthRel(); - height = frameBuffer->getScreenHeightRel(); + width = frameBuffer->getWindowWidth(); + height = frameBuffer->getWindowHeight(); header_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); item_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index d8b1d9ef5..7e7f16662 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -111,8 +111,8 @@ void CUpnpBrowserGui::Init() timebox.enableColBodyGradient(g_settings.theme.menu_Hint_gradient, COL_SHADOW_PLUS_0, g_settings.theme.menu_Hint_gradient_direction); timebox.enableShadow(CC_SHADOW_ON); - m_width = m_frameBuffer->getScreenWidthRel(); - m_height = m_frameBuffer->getScreenHeightRel(); + m_width = m_frameBuffer->getWindowWidth(); + m_height = m_frameBuffer->getWindowHeight(); int _top_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]->getHeight(); int _title_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();