mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
Increase size of tray and fonts for win32; turn on windoze-style
menus.
This commit is contained in:
parent
23232d25ba
commit
c4643ee5b4
3 changed files with 26 additions and 6 deletions
|
@ -41,8 +41,13 @@
|
|||
#define CE_TRAY_TOP (CE_BOARD_TOP + (CE_MAX_ROWS*CE_BOARD_SCALEV))
|
||||
#define CE_TRAY_TOP_MAX CE_TRAY_TOP
|
||||
|
||||
#define CE_TRAY_SCALEH 34
|
||||
#define CE_TRAY_SCALEV 27
|
||||
#if defined TARGET_OS_WINCE
|
||||
# define CE_TRAY_SCALEH 34
|
||||
# define CE_TRAY_SCALEV 27
|
||||
#elif defined TARGET_OS_WIN32
|
||||
# define CE_TRAY_SCALEH 68
|
||||
# define CE_TRAY_SCALEV 54
|
||||
#endif
|
||||
|
||||
#define BUTTON_WIDTH 20
|
||||
#define BUTTON_HEIGHT BUTTON_WIDTH
|
||||
|
|
|
@ -234,8 +234,17 @@ ce_draw_drawCell( DrawCtx* p_dctx, XP_Rect* xprect,
|
|||
widebuf, sizeof(widebuf)/sizeof(widebuf[0]) );
|
||||
|
||||
SetTextColor( hdc, foreColorRef );
|
||||
#ifdef TARGET_OS_WIN32
|
||||
HFONT oldFont = SelectObject( hdc, dctx->trayFont );
|
||||
MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, letters, -1,
|
||||
widebuf, sizeof(widebuf)/sizeof(widebuf[0]) );
|
||||
#endif
|
||||
DrawText( hdc, widebuf, -1, &textRect,
|
||||
DT_SINGLELINE | DT_VCENTER | DT_CENTER);
|
||||
#ifdef TARGET_OS_WIN32
|
||||
SelectObject( hdc, oldFont );
|
||||
#endif
|
||||
|
||||
} else if ( !!bitmap ) {
|
||||
makeAndDrawBitmap( dctx, hdc, textRect.left + 2, textRect.top + 2,
|
||||
foreColorRef, (CEBitmapInfo*)bitmap );
|
||||
|
|
|
@ -200,15 +200,17 @@ MyRegisterClass(HINSTANCE hInstance, LPTSTR szWindowClass)
|
|||
{
|
||||
WNDCLASS wc;
|
||||
|
||||
XP_MEMSET( &wc, 0, sizeof(wc) );
|
||||
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wc.lpfnWndProc = (WNDPROC) WndProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = sizeof(CEAppGlobals*);
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_XWORDS4));
|
||||
wc.hCursor = 0;
|
||||
wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
|
||||
wc.lpszMenuName = 0;
|
||||
#if defined TARGET_OS_WIN32
|
||||
wc.lpszMenuName = (LPCTSTR)IDM_MENU;
|
||||
#endif
|
||||
wc.lpszClassName = szWindowClass;
|
||||
|
||||
return RegisterClass(&wc);
|
||||
|
@ -338,7 +340,11 @@ hideScroller( CEAppGlobals* globals )
|
|||
|
||||
#define MIN_CELL_WIDTH 12
|
||||
#define MIN_CELL_HEIGHT 12
|
||||
#define MIN_TRAY_HEIGHT 20
|
||||
#if defined TARGET_OS_WINCE
|
||||
# define MIN_TRAY_HEIGHT 20
|
||||
#elif defined TARGET_OS_WIN32
|
||||
# define MIN_TRAY_HEIGHT 40
|
||||
#endif
|
||||
#define TRAY_PADDING 1
|
||||
|
||||
typedef struct CEBoardParms {
|
||||
|
|
Loading…
Reference in a new issue