mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-28 01:10:55 +01:00
GUI improvements
This commit is contained in:
parent
37fad00bbd
commit
8c8dab4bf3
@ -232,11 +232,18 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DWORD dwLineHeight = GUI_LINE_HEIGHT;
|
DWORD dwLineHeight = GUI_LINE_HEIGHT;
|
||||||
|
DWORD dwBottom = _this->padding.bottom;
|
||||||
|
DWORD dwTop = _this->padding.top;
|
||||||
|
if (!strncmp(line, ";a ", 3) || !strncmp(line, ";e ", 3))
|
||||||
|
{
|
||||||
|
dwBottom = 0;
|
||||||
|
dwLineHeight -= 0.2 * dwLineHeight;
|
||||||
|
}
|
||||||
|
|
||||||
rcText.left = dwLeftPad + _this->padding.left;
|
rcText.left = dwLeftPad + _this->padding.left;
|
||||||
rcText.top = _this->padding.top + dwMaxHeight;
|
rcText.top = dwTop + dwMaxHeight;
|
||||||
rcText.right = (rc.right - rc.left) - _this->padding.right;
|
rcText.right = (rc.right - rc.left) - _this->padding.right;
|
||||||
rcText.bottom = dwMaxHeight + dwLineHeight * dy - _this->padding.bottom;
|
rcText.bottom = dwMaxHeight + dwLineHeight * dy - dwBottom;
|
||||||
|
|
||||||
if (!strncmp(line, ";T ", 3))
|
if (!strncmp(line, ";T ", 3))
|
||||||
{
|
{
|
||||||
@ -324,9 +331,9 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
|
|||||||
hOldFont = SelectObject(hdcPaint, hFontRegular);
|
hOldFont = SelectObject(hdcPaint, hFontRegular);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strncmp(line, ";T ", 3) || !strncmp(line, ";t ", 3) || !strncmp(line, ";u ", 3) || !strncmp(line, ";M ", 3))
|
if (!strncmp(line, ";e ", 3) || !strncmp(line, ";a ", 3) || !strncmp(line, ";T ", 3) || !strncmp(line, ";t ", 3) || !strncmp(line, ";u ", 3) || !strncmp(line, ";M ", 3))
|
||||||
{
|
{
|
||||||
if (!strncmp(line, ";t ", 3))
|
if (!strncmp(line, ";t ", 3) || !strncmp(line, ";e ", 3) || !strncmp(line, ";a ", 3))
|
||||||
{
|
{
|
||||||
char* p = strstr(line, "%VERSIONINFO%");
|
char* p = strstr(line, "%VERSIONINFO%");
|
||||||
if (p)
|
if (p)
|
||||||
@ -350,6 +357,20 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
|
|||||||
text,
|
text,
|
||||||
MAX_LINE_LENGTH
|
MAX_LINE_LENGTH
|
||||||
);
|
);
|
||||||
|
if (!strncmp(line, ";a ", 3))
|
||||||
|
{
|
||||||
|
RECT rcTemp;
|
||||||
|
rcTemp = rcText;
|
||||||
|
DrawTextW(
|
||||||
|
hdcPaint,
|
||||||
|
L"\u2795 ",
|
||||||
|
3,
|
||||||
|
&rcTemp,
|
||||||
|
DT_CALCRECT
|
||||||
|
);
|
||||||
|
rcText.left += rcTemp.right - rcTemp.left;
|
||||||
|
rcText.right += rcTemp.right - rcTemp.left;
|
||||||
|
}
|
||||||
if (!strncmp(line, ";M ", 3))
|
if (!strncmp(line, ";M ", 3))
|
||||||
{
|
{
|
||||||
TCHAR exeName[MAX_PATH + 1];
|
TCHAR exeName[MAX_PATH + 1];
|
||||||
@ -417,7 +438,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
|
|||||||
);
|
);
|
||||||
if (rcNew.right - rcNew.left > dwMaxWidth)
|
if (rcNew.right - rcNew.left > dwMaxWidth)
|
||||||
{
|
{
|
||||||
dwMaxWidth = rcNew.right - rcNew.left + 20 * dx;
|
dwMaxWidth = rcNew.right - rcNew.left + 50 * dx;
|
||||||
}
|
}
|
||||||
if (IsThemeActive())
|
if (IsThemeActive())
|
||||||
{
|
{
|
||||||
@ -665,6 +686,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
|
|||||||
text + 3,
|
text + 3,
|
||||||
MAX_LINE_LENGTH
|
MAX_LINE_LENGTH
|
||||||
);
|
);
|
||||||
|
|
||||||
wchar_t* x = wcschr(text, L'\n');
|
wchar_t* x = wcschr(text, L'\n');
|
||||||
if (x) *x = 0;
|
if (x) *x = 0;
|
||||||
x = wcschr(text, L'\r');
|
x = wcschr(text, L'\r');
|
||||||
@ -1004,14 +1026,17 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
|
|||||||
if (p) *p = 0;
|
if (p) *p = 0;
|
||||||
p = strchr(line, '\n');
|
p = strchr(line, '\n');
|
||||||
if (p) *p = 0;
|
if (p) *p = 0;
|
||||||
ShellExecuteA(
|
if (line[1] != 0)
|
||||||
NULL,
|
{
|
||||||
"open",
|
ShellExecuteA(
|
||||||
line + 1,
|
NULL,
|
||||||
NULL,
|
"open",
|
||||||
NULL,
|
line + 1,
|
||||||
SW_SHOWNORMAL
|
NULL,
|
||||||
);
|
NULL,
|
||||||
|
SW_SHOWNORMAL
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hDC)
|
if (hDC)
|
||||||
@ -1040,7 +1065,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
|
|||||||
);
|
);
|
||||||
if (rcNew.right - rcNew.left > dwMaxWidth)
|
if (rcNew.right - rcNew.left > dwMaxWidth)
|
||||||
{
|
{
|
||||||
dwMaxWidth = rcNew.right - rcNew.left + 20 * dx;
|
dwMaxWidth = rcNew.right - rcNew.left + 50 * dx;
|
||||||
}
|
}
|
||||||
if (IsThemeActive())
|
if (IsThemeActive())
|
||||||
{
|
{
|
||||||
|
@ -224,12 +224,17 @@
|
|||||||
[HKEY_CURRENT_USER\Control Panel\Desktop]
|
[HKEY_CURRENT_USER\Control Panel\Desktop]
|
||||||
;b Show Windows build info on the desktop *
|
;b Show Windows build info on the desktop *
|
||||||
"PaintDesktopversion"=dword:00000000
|
"PaintDesktopversion"=dword:00000000
|
||||||
|
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ExplorerPatcher]
|
||||||
|
;b Enable advanced mitigations for correct rendering using classic theme *
|
||||||
|
"ClassicThemeMitigations"=dword:00000000
|
||||||
|
|
||||||
|
|
||||||
;T About
|
;T About
|
||||||
;t Version %VERSIONINFO%
|
;e ExplorerPatcher
|
||||||
|
;e Version %VERSIONINFO%
|
||||||
;t Copyright (C) 2006-2021 VALINET Solutions SRL. All rights reserved.
|
;t Copyright (C) 2006-2021 VALINET Solutions SRL. All rights reserved.
|
||||||
;t
|
;e
|
||||||
;t This project aims to bring back a productive working environment on Windows 11.
|
;e This project aims to bring back a productive working environment on Windows 11.
|
||||||
;t Proudly programmed by Valentin-Gabriel Radu.
|
;t Proudly programmed by Valentin-Gabriel Radu.
|
||||||
;l Visit project GitHub (https://github.com/valinet)
|
;l Visit project GitHub (https://github.com/valinet)
|
||||||
;https://github.com/valinet
|
;https://github.com/valinet
|
||||||
@ -241,7 +246,7 @@
|
|||||||
;https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher¤cy_code=EUR
|
;https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher¤cy_code=EUR
|
||||||
|
|
||||||
;f
|
;f
|
||||||
;t Settings marked with an (*) require restarting the File Explorer process.
|
;t Settings marked with an (*) require restarting File Explorer.
|
||||||
;u Restart File Explorer
|
;u Restart File Explorer
|
||||||
;restart
|
;restart
|
||||||
;u Restore default settings
|
;u Restore default settings
|
||||||
|
Loading…
Reference in New Issue
Block a user