summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-01-23 00:56:09 +0000
committerJens Arnold <amiconn@rockbox.org>2005-01-23 00:56:09 +0000
commitc188e83eddb72d90826590f956342589131d3211 (patch)
tree16bd797a006568556cb942cf6552d3ece1ef79b3 /uisimulator
parentedd5f0524350f71d694ec31fed770ce4a4923a56 (diff)
downloadrockbox-c188e83eddb72d90826590f956342589131d3211.tar.gz
rockbox-c188e83eddb72d90826590f956342589131d3211.tar.bz2
rockbox-c188e83eddb72d90826590f956342589131d3211.zip
Win32 simulator: Fixed scaling on resize. Keep window title (model) on resize, only adding the percentage.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5637 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/win32/uisw32.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/uisimulator/win32/uisw32.c b/uisimulator/win32/uisw32.c
index c0e1076b3d..8fb2ae1d9d 100644
--- a/uisimulator/win32/uisw32.c
+++ b/uisimulator/win32/uisw32.c
@@ -98,29 +98,29 @@ LRESULT CALLBACK GUIWndProc (
v = (r->bottom - r->top) / (UI_HEIGHT / 5);
r->bottom = r->top + v * UI_HEIGHT / 5;
r->right = r->left + v * UI_WIDTH / 5;
- r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2;
- r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYSMCAPTION);
+ r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2 +4;
+ r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYCAPTION) +4;
break;
case WMSZ_RIGHT:
v = (r->right - r->left) / (UI_WIDTH / 5);
r->bottom = r->top + v * UI_HEIGHT / 5;
r->right = r->left + v * UI_WIDTH / 5;
- r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2;
- r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYSMCAPTION);
+ r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2 +4;
+ r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYCAPTION) +4;
break;
case WMSZ_TOP:
v = (r->bottom - r->top) / (UI_HEIGHT / 5);
r->top = r->bottom - v * UI_HEIGHT / 5;
r->right = r->left + v * UI_WIDTH / 5;
- r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2;
- r->top -= GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYSMCAPTION);
+ r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2 +4;
+ r->top -= GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYCAPTION) +4;
break;
case WMSZ_LEFT:
v = (r->right - r->left) / (UI_WIDTH / 5);
r->bottom = r->top + v * UI_HEIGHT / 5;
r->left = r->right - v * UI_WIDTH / 5;
- r->left -= GetSystemMetrics (SM_CXSIZEFRAME) * 2;
- r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYSMCAPTION);
+ r->left -= GetSystemMetrics (SM_CXSIZEFRAME) * 2 +4;
+ r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYCAPTION) +4;
break;
case WMSZ_BOTTOMRIGHT:
GetWindowRect (hWnd, &r2);
@@ -130,8 +130,8 @@ LRESULT CALLBACK GUIWndProc (
v = (r->bottom - r->top) / (UI_HEIGHT / 5);
r->bottom = r->top + v * UI_HEIGHT / 5;
r->right = r->left + v * UI_WIDTH / 5;
- r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2;
- r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYSMCAPTION);
+ r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2 +4;
+ r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYCAPTION) +4;
break;
case WMSZ_BOTTOMLEFT:
GetWindowRect (hWnd, &r2);
@@ -141,8 +141,8 @@ LRESULT CALLBACK GUIWndProc (
v = (r->bottom - r->top) / (UI_HEIGHT / 5);
r->bottom = r->top + v * UI_HEIGHT / 5;
r->left = r->right - v * UI_WIDTH / 5;
- r->left -= GetSystemMetrics (SM_CXSIZEFRAME) * 2;
- r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYSMCAPTION);
+ r->left -= GetSystemMetrics (SM_CXSIZEFRAME) * 2 +4;
+ r->bottom += GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYCAPTION) +4;
break;
case WMSZ_TOPRIGHT:
GetWindowRect (hWnd, &r2);
@@ -152,8 +152,8 @@ LRESULT CALLBACK GUIWndProc (
v = (r->bottom - r->top) / (UI_HEIGHT / 5);
r->top = r->bottom - v * UI_HEIGHT / 5;
r->right = r->left + v * UI_WIDTH / 5;
- r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2;
- r->top -= GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYSMCAPTION);
+ r->right += GetSystemMetrics (SM_CXSIZEFRAME) * 2 +4;
+ r->top -= GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYCAPTION) +4;
break;
case WMSZ_TOPLEFT:
GetWindowRect (hWnd, &r2);
@@ -163,13 +163,13 @@ LRESULT CALLBACK GUIWndProc (
v = (r->bottom - r->top) / (UI_HEIGHT / 5);
r->top = r->bottom - v * UI_HEIGHT / 5;
r->left = r->right - v * UI_WIDTH / 5;
- r->left -= GetSystemMetrics (SM_CXSIZEFRAME) * 2;
- r->top -= GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYSMCAPTION);
+ r->left -= GetSystemMetrics (SM_CXSIZEFRAME) * 2+4;
+ r->top -= GetSystemMetrics (SM_CYSIZEFRAME) * 2 + GetSystemMetrics (SM_CYCAPTION)+4;
break;
}
- wsprintf (s, "RockBox Simulator @%d%%",
- (r->right - r->left - GetSystemMetrics (SM_CXSIZEFRAME) * 2)
+ wsprintf (s, UI_TITLE " @%d%%",
+ (r->right - r->left - GetSystemMetrics (SM_CXSIZEFRAME) * 2 -4)
* 100 / UI_WIDTH);
SetWindowText (hWnd, s);