Подсвечивать установленный загрузчик и при наведении мыши
This commit is contained in:
1 parent
c6cf1d7fbf
commit
9dd9beb943
1 file changed
+16
-2
+16
-2
@@ -28,6 +28,10 @@ const DWORD CLR_BUSY_TEXT = 0xA7AEBA;
|
||||
const DWORD CLR_ACTIVE_BG = 0xD8E4F8;
|
||||
const DWORD CLR_ACTIVE_BORDER = 0x9BB8E8;
|
||||
const DWORD CLR_ACTIVE_TEXT = 0x2E4A78;
|
||||
const DWORD CLR_ACTIVE_HOVER_BG = 0xC9DAF5;
|
||||
const DWORD CLR_ACTIVE_HOVER_BORDER = 0x7FA5DC;
|
||||
const DWORD CLR_ACTIVE_PRESS_BG = 0xB9CEF0;
|
||||
const DWORD CLR_ACTIVE_PRESS_BORDER = 0x6C93D0;
|
||||
|
||||
const wchar_t* kButtonNames[7] = {
|
||||
L"XorBoot", L"Bootmgr", L"Grub4Dos", L"Grub2",
|
||||
@@ -279,8 +283,18 @@ void App::Paint(HDC dc)
|
||||
text = ColorFromHex(CLR_BUSY_TEXT);
|
||||
} else if ((i < 4 && i == currentLegacy) ||
|
||||
(i >= 4 && i - 4 == currentUefi)) {
|
||||
background = ColorFromHex(CLR_ACTIVE_BG);
|
||||
border = ColorFromHex(CLR_ACTIVE_BORDER);
|
||||
bool hovered = buttonBg[i] == ColorFromHex(CLR_HOVER);
|
||||
bool pressed = buttonBg[i] == ColorFromHex(CLR_PRESS);
|
||||
if (pressed) {
|
||||
background = ColorFromHex(CLR_ACTIVE_PRESS_BG);
|
||||
border = ColorFromHex(CLR_ACTIVE_PRESS_BORDER);
|
||||
} else if (hovered) {
|
||||
background = ColorFromHex(CLR_ACTIVE_HOVER_BG);
|
||||
border = ColorFromHex(CLR_ACTIVE_HOVER_BORDER);
|
||||
} else {
|
||||
background = ColorFromHex(CLR_ACTIVE_BG);
|
||||
border = ColorFromHex(CLR_ACTIVE_BORDER);
|
||||
}
|
||||
text = ColorFromHex(CLR_ACTIVE_TEXT);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user