mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[ui] resize the About and Update dialogs according to content
* Also update credits for Polish translation
This commit is contained in:
parent
b7a0126c3b
commit
585469b8d9
4 changed files with 48 additions and 12 deletions
|
@ -5,6 +5,7 @@ o Version 2.4 (2015.09.??)
|
|||
Fix cheat mode to save the current USB to *uncompressed* VHD (Alt-V)
|
||||
Fix an UI scaling issue with high DPI displays for non English languages
|
||||
Update most of the translations
|
||||
Minor cosmetic changes
|
||||
|
||||
o Version 2.3 (2015.08.28)
|
||||
Detect ISOHybrid images and ask users how they should be written
|
||||
|
|
|
@ -10072,7 +10072,8 @@ t MSG_173 "Kliknij aby wybrać..."
|
|||
# The following will appear in the about dialog
|
||||
t MSG_174 "Rufus - The Reliable USB Formatting Utility"
|
||||
t MSG_175 "Wersja %d.%d (Build %d)"
|
||||
t MSG_176 "Polskie tłumaczenie: Piotr Halama <mailto:halamix2@o2.pl>"
|
||||
t MSG_176 "Polskie tłumaczenie: Piotr Halama <http://halamix2.pl> \\line "
|
||||
"Poprawki: Krzysztof J. Szklarski <http://www.napisy.info>"
|
||||
t MSG_177 "Zgłaszaj błędy lub ulepszenia na:"
|
||||
t MSG_178 "Dodatkowe prawa autorskie:"
|
||||
t MSG_179 "Polityka aktualizacji:"
|
||||
|
|
12
src/rufus.rc
12
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.4.751"
|
||||
CAPTION "Rufus 2.4.752"
|
||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -154,7 +154,7 @@ FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
|||
BEGIN
|
||||
ICON IDI_ICON,IDC_ABOUT_ICON,11,8,20,20
|
||||
DEFPUSHBUTTON "Close",IDCANCEL,221,172,50,14,WS_GROUP
|
||||
CONTROL "",IDC_POLICY,"RichEdit20W",WS_VSCROLL | WS_TABSTOP | 0x804,46,8,235,130,WS_EX_STATICEDGE
|
||||
CONTROL "",IDC_POLICY,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_VSCROLL | WS_TABSTOP,46,8,235,132,WS_EX_STATICEDGE
|
||||
GROUPBOX "Settings",IDS_UPDATE_SETTINGS_GRP,45,145,165,46
|
||||
LTEXT "Check for updates",IDS_UPDATE_FREQUENCY_TXT,51,159,76,11
|
||||
COMBOBOX IDC_UPDATE_FREQUENCY,133,155,66,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
|
@ -317,8 +317,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,4,751,0
|
||||
PRODUCTVERSION 2,4,751,0
|
||||
FILEVERSION 2,4,752,0
|
||||
PRODUCTVERSION 2,4,752,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -335,13 +335,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "2.4.751"
|
||||
VALUE "FileVersion", "2.4.752"
|
||||
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.4.751"
|
||||
VALUE "ProductVersion", "2.4.752"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
44
src/stdlg.c
44
src/stdlg.c
|
@ -548,7 +548,8 @@ void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh, float
|
|||
GetWindowRect(hCtrl, &rect);
|
||||
point.x = right_to_left_mode?rect.right:rect.left;
|
||||
point.y = rect.top;
|
||||
ScreenToClient(hDlg, &point);
|
||||
if (hDlg != hCtrl)
|
||||
ScreenToClient(hDlg, &point);
|
||||
GetClientRect(hCtrl, &rect);
|
||||
|
||||
// If the control has any borders (dialog, edit box), take them into account
|
||||
|
@ -587,13 +588,15 @@ INT_PTR CALLBACK LicenseCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
|||
*/
|
||||
INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int i;
|
||||
int i, dy;
|
||||
const int edit_id[2] = {IDC_ABOUT_BLURB, IDC_ABOUT_COPYRIGHTS};
|
||||
char about_blurb[2048];
|
||||
const char* edit_text[2] = {about_blurb, additional_copyrights};
|
||||
HWND hEdit[2];
|
||||
TEXTRANGEW tr;
|
||||
ENLINK* enl;
|
||||
RECT rect;
|
||||
REQRESIZE* rsz;
|
||||
wchar_t wUrl[256];
|
||||
|
||||
switch (message) {
|
||||
|
@ -617,14 +620,23 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
* http://blog.kowalczyk.info/article/eny/Setting-unicode-rtf-text-in-rich-edit-control.html */
|
||||
SendMessageA(hEdit[i], EM_SETTEXTEX, (WPARAM)&friggin_microsoft_unicode_amateurs, (LPARAM)edit_text[i]);
|
||||
SendMessage(hEdit[i], EM_SETSEL, -1, -1);
|
||||
SendMessage(hEdit[i], EM_SETEVENTMASK, 0, ENM_LINK);
|
||||
SendMessage(hEdit[i], EM_SETEVENTMASK, 0, ENM_LINK|((i==0)?ENM_REQUESTRESIZE:0));
|
||||
SendMessage(hEdit[i], EM_SETBKGNDCOLOR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE));
|
||||
}
|
||||
// Need to send an explicit SetSel to avoid being positioned at the end of richedit control when tabstop is used
|
||||
SendMessage(hEdit[1], EM_SETSEL, 0, 0);
|
||||
SendMessage(hEdit[0], EM_REQUESTRESIZE, 0, 0);
|
||||
break;
|
||||
case WM_NOTIFY:
|
||||
switch (((LPNMHDR)lParam)->code) {
|
||||
case EN_REQUESTRESIZE:
|
||||
GetWindowRect(GetDlgItem(hDlg, edit_id[0]), &rect);
|
||||
dy = rect.bottom - rect.top;
|
||||
rsz = (REQRESIZE *)lParam;
|
||||
dy -= rsz->rc.bottom - rsz->rc.top;
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, edit_id[0]), 0, 0, 0, -dy, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, edit_id[1]), 0, -dy, 0, dy, 1.0f);
|
||||
break;
|
||||
case EN_LINK:
|
||||
enl = (ENLINK*) lParam;
|
||||
if (enl->msg == WM_LBUTTONUP) {
|
||||
|
@ -878,7 +890,6 @@ INT_PTR CALLBACK SelectionCallback(HWND hDlg, UINT message, WPARAM wParam, LPARA
|
|||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDC_SELECTION_CHOICE2), 0, dh, 0, 0, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDOK), 0, dh, 0, 0, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDCANCEL), 0, dh, 0, 0, 1.0f);
|
||||
CenterDialog(hDlg);
|
||||
|
||||
// Set the radio selection
|
||||
Button_SetCheck(GetDlgItem(hDlg, IDC_SELECTION_CHOICE1), BST_CHECKED);
|
||||
|
@ -1226,6 +1237,9 @@ BOOL SetTaskbarProgressValue(ULONGLONG ullCompleted, ULONGLONG ullTotal)
|
|||
*/
|
||||
INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int dy;
|
||||
RECT rect;
|
||||
REQRESIZE* rsz;
|
||||
HWND hPolicy;
|
||||
static HWND hFrequency, hBeta;
|
||||
int32_t freq;
|
||||
|
@ -1275,8 +1289,28 @@ INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
|
|||
lmprintf(MSG_185), lmprintf(MSG_186));
|
||||
SendMessageA(hPolicy, EM_SETTEXTEX, (WPARAM)&friggin_microsoft_unicode_amateurs, (LPARAM)update_policy_text);
|
||||
SendMessage(hPolicy, EM_SETSEL, -1, -1);
|
||||
SendMessage(hPolicy, EM_SETEVENTMASK, 0, ENM_LINK);
|
||||
SendMessage(hPolicy, EM_SETEVENTMASK, 0, ENM_LINK|ENM_REQUESTRESIZE);
|
||||
SendMessageA(hPolicy, EM_SETBKGNDCOLOR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE));
|
||||
SendMessage(hPolicy, EM_REQUESTRESIZE, 0, 0);
|
||||
break;
|
||||
case WM_NOTIFY:
|
||||
if (((LPNMHDR)lParam)->code == EN_REQUESTRESIZE) {
|
||||
hPolicy = GetDlgItem(hDlg, IDC_POLICY);
|
||||
GetWindowRect(hPolicy, &rect);
|
||||
dy = rect.bottom - rect.top;
|
||||
rsz = (REQRESIZE *)lParam;
|
||||
dy -= rsz->rc.bottom - rsz->rc.top + 6; // add the border
|
||||
ResizeMoveCtrl(hDlg, hDlg, 0, 0, 0, -dy, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, hPolicy, 0, 0, 0, -dy, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDS_UPDATE_SETTINGS_GRP), 0, -dy, 0, 0, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDS_UPDATE_FREQUENCY_TXT), 0, -dy, 0, 0, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDC_UPDATE_FREQUENCY), 0, -dy, 0, 0, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDS_INCLUDE_BETAS_TXT), 0, -dy, 0, 0, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDC_INCLUDE_BETAS), 0, -dy, 0, 0, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDS_CHECK_NOW_GRP), 0, -dy, 0, 0, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDC_CHECK_NOW), 0, -dy, 0, 0, 1.0f);
|
||||
ResizeMoveCtrl(hDlg, GetDlgItem(hDlg, IDCANCEL), 0, -dy, 0, 0, 1.0f);
|
||||
}
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
|
|
Loading…
Reference in a new issue