mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
cc_frm_window.cpp: fix possible oversize render with maximum screen settings
Origin commit data
------------------
Branch: ni/coolstream
Commit: fac08ce188
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-11-21 (Wed, 21 Nov 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -180,13 +180,14 @@ void CComponentsWindow::initWindowSize()
|
|||||||
|
|
||||||
if (width < 0 && width >= -100) //percentage conversion TODO: behavior inside parent
|
if (width < 0 && width >= -100) //percentage conversion TODO: behavior inside parent
|
||||||
width = frameBuffer->getScreenWidth()*abs(width)/100;
|
width = frameBuffer->getScreenWidth()*abs(width)/100;
|
||||||
if (width == 0 || (unsigned)width > frameBuffer->getScreenWidth())
|
if (width == 0 || (unsigned)width > frameBuffer->getScreenWidth() + 2*OFFSET_INNER_MID)
|
||||||
width = frameBuffer->getScreenWidth();
|
width = frameBuffer->getScreenWidth() - 2*OFFSET_INNER_MID;
|
||||||
|
|
||||||
|
|
||||||
if (height < 0 && height >= -100) //percentage conversion TODO: behavior inside parent
|
if (height < 0 && height >= -100) //percentage conversion TODO: behavior inside parent
|
||||||
height = frameBuffer->getScreenHeight()*abs(height)/100;
|
height = frameBuffer->getScreenHeight()*abs(height)/100;
|
||||||
if (height == 0 || (unsigned)height > frameBuffer->getScreenHeight())
|
if (height == 0 || (unsigned)height > frameBuffer->getScreenHeight() + 2*OFFSET_INNER_MID)
|
||||||
height = frameBuffer->getScreenHeight();
|
height = frameBuffer->getScreenHeight() - 2*OFFSET_INNER_MID;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsWindow::initWindowPos()
|
void CComponentsWindow::initWindowPos()
|
||||||
@@ -195,9 +196,9 @@ void CComponentsWindow::initWindowPos()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (x == 0)
|
if (x == 0)
|
||||||
x = frameBuffer->getScreenX();
|
x = frameBuffer->getScreenX() + OFFSET_INNER_MID;
|
||||||
if (y == 0)
|
if (y == 0)
|
||||||
y = frameBuffer->getScreenY();
|
y = frameBuffer->getScreenY() + OFFSET_INNER_MID;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsWindow::setWindowCaption(neutrino_locale_t locale_text, const cc_title_alignment_t& align_mode)
|
void CComponentsWindow::setWindowCaption(neutrino_locale_t locale_text, const cc_title_alignment_t& align_mode)
|
||||||
|
Reference in New Issue
Block a user