mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 02:41:12 +02:00
framebuffer: better name for getWindowWidth/Height() functions
getScreenWidth/HeightRel() was confusing because it depends on users window settings.
Replace names in old unused framebuffer code too.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 86cdc12c8f
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-22 (Mon, 22 Jan 2018)
Origin message was:
------------------
- framebuffer: better name for getWindowWidth/Height() functions
getScreenWidth/HeightRel() was confusing because it depends on users window settings.
Replace names in old unused framebuffer code too.
------------------
This commit was generated by Migit
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -460,16 +460,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;
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -314,16 +314,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;
|
||||
}
|
||||
|
||||
|
@@ -67,7 +67,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
|
||||
@@ -173,8 +173,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();
|
||||
|
||||
|
Reference in New Issue
Block a user