mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore/Draw: UHD refactored
git-svn-id: svn://ultimatepp.org/upp/trunk@8835 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c3287d8df0
commit
ca0c299378
5 changed files with 9 additions and 6 deletions
|
|
@ -955,9 +955,6 @@ void Ctrl::ReSkin()
|
|||
if(lock)
|
||||
return;
|
||||
lock++;
|
||||
bool uhd = GetStdFontCy() > 22;
|
||||
GUI_HiDPI_Write(GetStdFontCy() > 22);
|
||||
SetUHDMode(uhd);
|
||||
if(s_chdefault)
|
||||
(*s_chdefault)();
|
||||
if(skin)
|
||||
|
|
@ -983,7 +980,6 @@ CH_INT(GUI_AKD_Conservative, 0);
|
|||
CH_INT(GUI_DragDistance, 4);
|
||||
CH_INT(GUI_DblClickTime, 500);
|
||||
CH_INT(GUI_WheelScrollLines, 3);
|
||||
CH_INT(GUI_HiDPI, 0);
|
||||
|
||||
String Ctrl::Name0() const {
|
||||
GuiLock __;
|
||||
|
|
|
|||
|
|
@ -1309,8 +1309,6 @@ int GUI_DragDistance();
|
|||
int GUI_DblClickTime();
|
||||
int GUI_WheelScrollLines();
|
||||
|
||||
int GUI_HiDPI();
|
||||
|
||||
void GUI_GlobalStyle_Write(int);
|
||||
void GUI_DragFullWindow_Write(int);
|
||||
void GUI_PopUpEffect_Write(int);
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ void Font::SyncStdFont()
|
|||
{
|
||||
Mutex::Lock __(sFontLock);
|
||||
StdFontSize = Size(AStdFont.GetAveWidth(), AStdFont().Bold().GetCy());
|
||||
SyncUHDMode();
|
||||
}
|
||||
|
||||
void (*whenSetStdFont)();
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ Image RescaleBicubic(const Image& img, int cx, int cy, Gate2<int, int> progress
|
|||
|
||||
void SetUHDMode(bool b = true);
|
||||
bool IsUHDMode();
|
||||
void SyncUHDMode();
|
||||
|
||||
Image DPI(const Image& m);
|
||||
Image DPI(const Image& img, int expected);
|
||||
|
|
|
|||
|
|
@ -101,6 +101,13 @@ bool IsUHDMode()
|
|||
return sUHDMode;
|
||||
}
|
||||
|
||||
void SyncUHDMode()
|
||||
{
|
||||
bool uhd = GetStdFontCy() > 22;
|
||||
if(uhd != IsUHDMode())
|
||||
SetUHDMode(uhd);
|
||||
}
|
||||
|
||||
Image DPI(const Image& img)
|
||||
{
|
||||
if(IsUHDMode()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue