mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
CtrlCore: Fixed problem with custom titlebar icon refresh
This commit is contained in:
parent
e51b45ef45
commit
4292bf86ab
1 changed files with 15 additions and 0 deletions
|
|
@ -202,6 +202,21 @@ void TopWindow::SetIco()
|
|||
|
||||
ico = new_ico;
|
||||
lico = new_lico;
|
||||
|
||||
if(custom_titlebar) {
|
||||
Rect r = GetTitleBarRect(this);
|
||||
|
||||
bool maximized = IsMaximized();
|
||||
Image icon = GetIcon();
|
||||
if(IsNull(icon))
|
||||
r.right = r.left + GetWin32TitleBarButtonWidth();
|
||||
else {
|
||||
if(max(icon.GetHeight(), icon.GetWidth()) > 32)
|
||||
icon = CachedRescale(icon, Size(32, 32));
|
||||
r.right = r.left + DPI(IsMaximized() ? 2 : 4) + icon.GetWidth();
|
||||
}
|
||||
InvalidateRect(hwnd, r, FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue