mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[ui] fix an issue with automatic resizing of the update policy
* Closes #620
This commit is contained in:
parent
4bd7d5f44f
commit
916eaa4113
3 changed files with 21 additions and 12 deletions
|
@ -2,6 +2,7 @@ o Version 2.5 (2015.10.??)
|
|||
Add SHA-256 checksum verification
|
||||
Add a cheat mode to disable exclusive USB drive locking (Alt-,)
|
||||
Add digital signature check on update downloads
|
||||
Fix an issue with improper display of the update settings under some conditions
|
||||
Report Windows build number in the log (Windows 8 or later)
|
||||
Localization improvements
|
||||
Additional translation updates
|
||||
|
|
10
src/rufus.rc
10
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.5.781"
|
||||
CAPTION "Rufus 2.5.782"
|
||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||
|
@ -319,8 +319,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,5,781,0
|
||||
PRODUCTVERSION 2,5,781,0
|
||||
FILEVERSION 2,5,782,0
|
||||
PRODUCTVERSION 2,5,782,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -337,13 +337,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "2.5.781"
|
||||
VALUE "FileVersion", "2.5.782"
|
||||
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.5.781"
|
||||
VALUE "ProductVersion", "2.5.782"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
22
src/stdlg.c
22
src/stdlg.c
|
@ -598,9 +598,11 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
RECT rect;
|
||||
REQRESIZE* rsz;
|
||||
wchar_t wUrl[256];
|
||||
static BOOL resized_already = TRUE;
|
||||
|
||||
switch (message) {
|
||||
case WM_INITDIALOG:
|
||||
resized_already = FALSE;
|
||||
// Execute dialog localization
|
||||
apply_localization(IDD_ABOUTBOX, hDlg);
|
||||
SetTitleBarIcon(hDlg);
|
||||
|
@ -630,12 +632,15 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
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);
|
||||
if (!resized_already) {
|
||||
resized_already = TRUE;
|
||||
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;
|
||||
|
@ -1244,9 +1249,11 @@ INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
|
|||
static HWND hFrequency, hBeta;
|
||||
int32_t freq;
|
||||
char update_policy_text[4096];
|
||||
static BOOL resized_already = TRUE;
|
||||
|
||||
switch (message) {
|
||||
case WM_INITDIALOG:
|
||||
resized_already = FALSE;
|
||||
hUpdatesDlg = hDlg;
|
||||
apply_localization(IDD_UPDATE_POLICY, hDlg);
|
||||
SetTitleBarIcon(hDlg);
|
||||
|
@ -1294,7 +1301,8 @@ INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
|
|||
SendMessage(hPolicy, EM_REQUESTRESIZE, 0, 0);
|
||||
break;
|
||||
case WM_NOTIFY:
|
||||
if (((LPNMHDR)lParam)->code == EN_REQUESTRESIZE) {
|
||||
if ((((LPNMHDR)lParam)->code == EN_REQUESTRESIZE) && (!resized_already)) {
|
||||
resized_already = TRUE;
|
||||
hPolicy = GetDlgItem(hDlg, IDC_POLICY);
|
||||
GetWindowRect(hPolicy, &rect);
|
||||
dy = rect.bottom - rect.top;
|
||||
|
|
Loading…
Reference in a new issue