mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlLib: Various UHD fixes
git-svn-id: svn://ultimatepp.org/upp/trunk@12239 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
dfa32c926f
commit
f841ac2d22
4 changed files with 20 additions and 15 deletions
|
|
@ -596,17 +596,21 @@ void ChSysInit()
|
|||
ChReset();
|
||||
XpClear();
|
||||
|
||||
|
||||
HRESULT (STDAPICALLTYPE *SetProcessDpiAwareness)(int);
|
||||
DllFn(SetProcessDpiAwareness, "Shcore.dll", "SetProcessDpiAwareness");
|
||||
if(SetProcessDpiAwareness)
|
||||
SetProcessDpiAwareness(1);
|
||||
else {
|
||||
BOOL (STDAPICALLTYPE * SetProcessDPIAware)(void);
|
||||
DllFn(SetProcessDPIAware, "User32.dll", "SetProcessDPIAware");
|
||||
if(SetProcessDPIAware && Ctrl::IsUHDEnabled())
|
||||
(*SetProcessDPIAware)();
|
||||
DLOG("ChSysInit");
|
||||
DDUMP(Ctrl::IsUHDEnabled());
|
||||
if(Ctrl::IsUHDEnabled()) {
|
||||
HRESULT (STDAPICALLTYPE *SetProcessDpiAwareness)(int);
|
||||
DllFn(SetProcessDpiAwareness, "Shcore.dll", "SetProcessDpiAwareness");
|
||||
if(SetProcessDpiAwareness)
|
||||
SetProcessDpiAwareness(1);
|
||||
else {
|
||||
BOOL (STDAPICALLTYPE * SetProcessDPIAware)(void);
|
||||
DllFn(SetProcessDPIAware, "User32.dll", "SetProcessDPIAware");
|
||||
if(SetProcessDPIAware)
|
||||
(*SetProcessDPIAware)();
|
||||
}
|
||||
}
|
||||
|
||||
NONCLIENTMETRICS ncm;
|
||||
#if (WINVER >= 0x0600 && !defined(__MINGW32_VERSION))
|
||||
ncm.cbSize = sizeof(ncm) - sizeof(ncm.iPaddedBorderWidth); // WinXP does not like it...
|
||||
|
|
|
|||
|
|
@ -616,9 +616,9 @@ void SizeGrip::Paint(Draw& w)
|
|||
SizeGrip::SizeGrip()
|
||||
{
|
||||
Transparent();
|
||||
RightPos(0, 12).BottomPos(0, 12);
|
||||
RightPos(0, DPI(12)).BottomPos(0, DPI(12));
|
||||
NoWantFocus();
|
||||
Width(14);
|
||||
Width(DPI(14));
|
||||
}
|
||||
|
||||
SizeGrip::~SizeGrip() {}
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ void StatusBar::TopFrame::FrameAddSize(Size& sz)
|
|||
|
||||
StatusBar::StatusBar()
|
||||
{
|
||||
Height(5 + max(16, Draw::GetStdFontCy()));
|
||||
Height(Zy(5) + max(16, Draw::GetStdFontCy()));
|
||||
frame.style = &StyleDefault();
|
||||
SetFrame(frame);
|
||||
AddFrame(grip);
|
||||
|
|
|
|||
|
|
@ -140,8 +140,9 @@ void TabCtrl::Layout()
|
|||
ScrollInto(sel);
|
||||
pane.VSizePos(style->tabheight + style->edge.top, style->edge.bottom)
|
||||
.HSizePos(style->edge.left, style->edge.right);
|
||||
left.LeftPos(0, 16).TopPos(th - 16, 16);
|
||||
right.RightPos(0, 16).TopPos(th - 16, 16);
|
||||
int sx = DPI(16);
|
||||
left.LeftPos(0, sx).TopPos(th - sx, sx);
|
||||
right.RightPos(0, sx).TopPos(th - sx, sx);
|
||||
SyncTabs();
|
||||
Refresh();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue