mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[ui] fix accessibility issues for high contrast scheme
* Also make sure we use system colours everywhere, rather than our own * Closes #535
This commit is contained in:
parent
517a14ccb1
commit
a9ee79bdad
4 changed files with 14 additions and 14 deletions
|
@ -1572,6 +1572,7 @@ static INT_PTR CALLBACK InfoCallback(HWND hCtrl, UINT message, WPARAM wParam, LP
|
|||
GetWindowTextW(hInfo, winfo, ARRAYSIZE(winfo));
|
||||
hdc = BeginPaint(hCtrl , &ps);
|
||||
SelectObject(hdc, hInfoFont);
|
||||
SetTextColor(hdc, GetSysColor(COLOR_BTNTEXT));
|
||||
SetBkColor(hdc, GetSysColor(COLOR_BTNFACE));
|
||||
SetTextAlign(hdc , TA_CENTER | TA_BASELINE);
|
||||
GetClientRect(hCtrl , &rect);
|
||||
|
@ -2050,6 +2051,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
SetBkMode(pDI->hDC, TRANSPARENT);
|
||||
switch(pDI->itemID) {
|
||||
case 0: // left part
|
||||
SetTextColor(pDI->hDC, GetSysColor(COLOR_BTNTEXT));
|
||||
DrawTextExU(pDI->hDC, szStatusMessage, -1, &pDI->rcItem,
|
||||
DT_LEFT|DT_END_ELLIPSIS|DT_PATH_ELLIPSIS, NULL);
|
||||
return (INT_PTR)TRUE;
|
||||
|
|
|
@ -68,8 +68,6 @@
|
|||
#define MAX_FAT32_SIZE 2.0f // Threshold above which we disable FAT32 formatting (in TB)
|
||||
#define FAT32_CLUSTER_THRESHOLD 1.011f // For FAT32, cluster size changes don't occur at power of 2 boundaries but sligthly above
|
||||
#define DD_BUFFER_SIZE 65536 // Minimum size of the buffer we use for DD operations
|
||||
#define WHITE RGB(255,255,255)
|
||||
#define SEPARATOR_GREY RGB(223,223,223)
|
||||
#define RUFUS_URL "http://rufus.akeo.ie"
|
||||
#define DOWNLOAD_URL RUFUS_URL "/downloads"
|
||||
#define FILES_URL RUFUS_URL "/files"
|
||||
|
|
16
src/rufus.rc
16
src/rufus.rc
|
@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
|
||||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Rufus 2.3.677"
|
||||
CAPTION "Rufus 2.3.678"
|
||||
FONT 8, "Segoe UI", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -157,7 +157,7 @@ END
|
|||
|
||||
IDD_DIALOG_XP DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Rufus 2.3.677"
|
||||
CAPTION "Rufus 2.3.678"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -283,7 +283,7 @@ END
|
|||
IDD_DIALOG_RTL DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
|
||||
CAPTION "Rufus 2.3.677"
|
||||
CAPTION "Rufus 2.3.678"
|
||||
FONT 8, "Segoe UI", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -415,7 +415,7 @@ END
|
|||
IDD_DIALOG_RTL_XP DIALOGEX 12, 12, 242, 376
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
|
||||
CAPTION "Rufus 2.3.677"
|
||||
CAPTION "Rufus 2.3.678"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -671,8 +671,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,3,677,0
|
||||
PRODUCTVERSION 2,3,677,0
|
||||
FILEVERSION 2,3,678,0
|
||||
PRODUCTVERSION 2,3,678,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -689,13 +689,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "2.3.677"
|
||||
VALUE "FileVersion", "2.3.678"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "2.3.677"
|
||||
VALUE "ProductVersion", "2.3.678"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -594,7 +594,7 @@ INT_PTR CALLBACK NotificationCallback(HWND hDlg, UINT message, WPARAM wParam, LP
|
|||
// Prevent resizing
|
||||
static LRESULT disabled[9] = { HTLEFT, HTRIGHT, HTTOP, HTBOTTOM, HTSIZE,
|
||||
HTTOPLEFT, HTTOPRIGHT, HTBOTTOMLEFT, HTBOTTOMRIGHT };
|
||||
static HBRUSH white_brush, separator_brush;
|
||||
static HBRUSH background_brush, separator_brush;
|
||||
// To use the system message font
|
||||
NONCLIENTMETRICS ncm;
|
||||
HFONT hDlgFont;
|
||||
|
@ -622,8 +622,8 @@ INT_PTR CALLBACK NotificationCallback(HWND hDlg, UINT message, WPARAM wParam, LP
|
|||
SendMessage(GetDlgItem(hDlg, IDNO), WM_SETFONT, (WPARAM)hDlgFont, MAKELPARAM(TRUE, 0));
|
||||
|
||||
apply_localization(IDD_NOTIFICATION, hDlg);
|
||||
white_brush = CreateSolidBrush(WHITE);
|
||||
separator_brush = CreateSolidBrush(SEPARATOR_GREY);
|
||||
background_brush = CreateSolidBrush(GetSysColor(COLOR_3DHILIGHT));
|
||||
separator_brush = CreateSolidBrush(GetSysColor(COLOR_3DLIGHT));
|
||||
SetTitleBarIcon(hDlg);
|
||||
CenterDialog(hDlg);
|
||||
// Change the default icon
|
||||
|
@ -654,7 +654,7 @@ INT_PTR CALLBACK NotificationCallback(HWND hDlg, UINT message, WPARAM wParam, LP
|
|||
if ((HWND)lParam == GetDlgItem(hDlg, IDC_NOTIFICATION_LINE)) {
|
||||
return (INT_PTR)separator_brush;
|
||||
}
|
||||
return (INT_PTR)white_brush;
|
||||
return (INT_PTR)background_brush;
|
||||
case WM_NCHITTEST:
|
||||
// Check coordinates to prevent resize actions
|
||||
loc = DefWindowProc(hDlg, message, wParam, lParam);
|
||||
|
|
Loading…
Reference in a new issue