[ui] minor cosmetic improvements

* Fix label control being reduced in size when a translation modifies it
* Minute adjustments to make the application look better on Windows 8
* Closes #356
This commit is contained in:
Pete Batard 2014-10-29 18:27:17 +00:00
parent 0c9c7a9569
commit 1934ee7598
3 changed files with 45 additions and 45 deletions

View file

@ -459,7 +459,7 @@ void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh)
{
RECT rect;
POINT point;
SIZE border = {0, 0};
SIZE border;
GetWindowRect(hCtrl, &rect);
point.x = right_to_left_mode?rect.right:rect.left;
@ -467,9 +467,8 @@ void ResizeMoveCtrl(HWND hDlg, HWND hCtrl, int dx, int dy, int dw, int dh)
ScreenToClient(hDlg, &point);
GetClientRect(hCtrl, &rect);
// If we're dealing with a dialog, we must take the border into account
if ((hCtrl == hDlg) || (hDlg == NULL))
border = GetBorderSize(hCtrl);
// If the control has any borders (dialog, edit box), take them into account
border = GetBorderSize(hCtrl);
MoveWindow(hCtrl, point.x + (int)(fScale*(float)dx), point.y + (int)(fScale*(float)dy),
(rect.right - rect.left) + (int)(fScale*(float)dw + border.cx),
(rect.bottom - rect.top) + (int)(fScale*(float)dh + border.cy), TRUE);