mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 11:04:10 +00:00
Remove the support for the Win 3.1 Look.
This commit is contained in:
parent
b9f45e7a70
commit
126227a55a
|
@ -715,7 +715,7 @@ static void BUTTON_DrawLabel(HWND hwnd, HDC hdc, UINT dtFlags, RECT *rc)
|
||||||
static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
|
static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
|
||||||
{
|
{
|
||||||
RECT rc, focus_rect, r;
|
RECT rc, focus_rect, r;
|
||||||
UINT dtFlags;
|
UINT dtFlags, uState;
|
||||||
HRGN hRgn;
|
HRGN hRgn;
|
||||||
HPEN hOldPen;
|
HPEN hOldPen;
|
||||||
HBRUSH hOldBrush;
|
HBRUSH hOldBrush;
|
||||||
|
@ -735,59 +735,30 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
|
||||||
hOldBrush =(HBRUSH)SelectObject(hDC,GetSysColorBrush(COLOR_BTNFACE));
|
hOldBrush =(HBRUSH)SelectObject(hDC,GetSysColorBrush(COLOR_BTNFACE));
|
||||||
oldBkMode = SetBkMode(hDC, TRANSPARENT);
|
oldBkMode = SetBkMode(hDC, TRANSPARENT);
|
||||||
|
|
||||||
if ( TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
{
|
|
||||||
COLORREF clr_wnd = GetSysColor(COLOR_WINDOW);
|
|
||||||
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
|
||||||
|
|
||||||
SetPixel( hDC, rc.left, rc.top, clr_wnd);
|
|
||||||
SetPixel( hDC, rc.left, rc.bottom-1, clr_wnd);
|
|
||||||
SetPixel( hDC, rc.right-1, rc.top, clr_wnd);
|
|
||||||
SetPixel( hDC, rc.right-1, rc.bottom-1, clr_wnd);
|
|
||||||
InflateRect( &rc, -1, -1 );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (get_button_type(style) == BS_DEFPUSHBUTTON)
|
if (get_button_type(style) == BS_DEFPUSHBUTTON)
|
||||||
{
|
{
|
||||||
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
|
||||||
InflateRect( &rc, -1, -1 );
|
InflateRect( &rc, -1, -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
uState = DFCS_BUTTONPUSH | DFCS_ADJUSTRECT;
|
||||||
|
|
||||||
|
if (style & BS_FLAT)
|
||||||
|
uState |= DFCS_MONO;
|
||||||
|
else if (pushedState)
|
||||||
{
|
{
|
||||||
if (pushedState)
|
if (get_button_type(style) == BS_DEFPUSHBUTTON )
|
||||||
{
|
uState |= DFCS_FLAT;
|
||||||
/* draw button shadow: */
|
else
|
||||||
SelectObject(hDC, GetSysColorBrush(COLOR_BTNSHADOW));
|
uState |= DFCS_PUSHED;
|
||||||
PatBlt(hDC, rc.left, rc.top, 1, rc.bottom-rc.top, PATCOPY );
|
|
||||||
PatBlt(hDC, rc.left, rc.top, rc.right-rc.left, 1, PATCOPY );
|
|
||||||
} else {
|
|
||||||
rc.right++, rc.bottom++;
|
|
||||||
DrawEdge( hDC, &rc, EDGE_RAISED, BF_RECT );
|
|
||||||
rc.right--, rc.bottom--;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
UINT uState = DFCS_BUTTONPUSH | DFCS_ADJUSTRECT;
|
|
||||||
|
|
||||||
if (style & BS_FLAT)
|
if (state & (BUTTON_CHECKED | BUTTON_3STATE))
|
||||||
uState |= DFCS_MONO;
|
uState |= DFCS_CHECKED;
|
||||||
else if (pushedState)
|
|
||||||
{
|
|
||||||
if (get_button_type(style) == BS_DEFPUSHBUTTON )
|
|
||||||
uState |= DFCS_FLAT;
|
|
||||||
else
|
|
||||||
uState |= DFCS_PUSHED;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (state & (BUTTON_CHECKED | BUTTON_3STATE))
|
DrawFrameControl( hDC, &rc, DFC_BUTTON, uState );
|
||||||
uState |= DFCS_CHECKED;
|
|
||||||
|
|
||||||
DrawFrameControl( hDC, &rc, DFC_BUTTON, uState );
|
focus_rect = rc;
|
||||||
|
|
||||||
focus_rect = rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* draw button label */
|
/* draw button label */
|
||||||
r = rc;
|
r = rc;
|
||||||
|
@ -799,12 +770,6 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
|
||||||
if (pushedState)
|
if (pushedState)
|
||||||
OffsetRect(&r, 1, 1);
|
OffsetRect(&r, 1, 1);
|
||||||
|
|
||||||
if(TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
{
|
|
||||||
focus_rect = r;
|
|
||||||
InflateRect(&focus_rect, 2, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
hRgn = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom);
|
hRgn = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom);
|
||||||
SelectClipRgn(hDC, hRgn);
|
SelectClipRgn(hDC, hRgn);
|
||||||
|
|
||||||
|
@ -887,80 +852,48 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
|
||||||
/* Draw the check-box bitmap */
|
/* Draw the check-box bitmap */
|
||||||
if (action == ODA_DRAWENTIRE || action == ODA_SELECT)
|
if (action == ODA_DRAWENTIRE || action == ODA_SELECT)
|
||||||
{
|
{
|
||||||
if( TWEAK_WineLook == WIN31_LOOK )
|
UINT flags;
|
||||||
{
|
|
||||||
HDC hMemDC = CreateCompatibleDC( hDC );
|
|
||||||
int x = 0, y = 0;
|
|
||||||
delta = (rbox.bottom - rbox.top - checkBoxHeight) / 2;
|
|
||||||
|
|
||||||
/* Check in case the client area is smaller than the checkbox bitmap */
|
|
||||||
if (delta < 0) delta = 0;
|
|
||||||
|
|
||||||
if (state & BUTTON_HIGHLIGHTED) x += 2 * checkBoxWidth;
|
|
||||||
if (state & (BUTTON_CHECKED | BUTTON_3STATE)) x += checkBoxWidth;
|
|
||||||
if ((get_button_type(style) == BS_RADIOBUTTON) ||
|
|
||||||
(get_button_type(style) == BS_AUTORADIOBUTTON)) y += checkBoxHeight;
|
|
||||||
else if (state & BUTTON_3STATE) y += 2 * checkBoxHeight;
|
|
||||||
|
|
||||||
/* The bitmap for the radio button is not aligned with the
|
|
||||||
* left of the window, it is 1 pixel off. */
|
|
||||||
if ((get_button_type(style) == BS_RADIOBUTTON) ||
|
|
||||||
(get_button_type(style) == BS_AUTORADIOBUTTON))
|
|
||||||
rbox.left += 1;
|
|
||||||
|
|
||||||
SelectObject( hMemDC, hbitmapCheckBoxes );
|
|
||||||
BitBlt( hDC, rbox.left, rbox.top + delta, checkBoxWidth,
|
|
||||||
checkBoxHeight, hMemDC, x, y, SRCCOPY );
|
|
||||||
DeleteDC( hMemDC );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UINT flags;
|
|
||||||
|
|
||||||
if ((get_button_type(style) == BS_RADIOBUTTON) ||
|
if ((get_button_type(style) == BS_RADIOBUTTON) ||
|
||||||
(get_button_type(style) == BS_AUTORADIOBUTTON)) flags = DFCS_BUTTONRADIO;
|
(get_button_type(style) == BS_AUTORADIOBUTTON)) flags = DFCS_BUTTONRADIO;
|
||||||
else if (state & BUTTON_3STATE) flags = DFCS_BUTTON3STATE;
|
else if (state & BUTTON_3STATE) flags = DFCS_BUTTON3STATE;
|
||||||
else flags = DFCS_BUTTONCHECK;
|
else flags = DFCS_BUTTONCHECK;
|
||||||
|
|
||||||
if (state & (BUTTON_CHECKED | BUTTON_3STATE)) flags |= DFCS_CHECKED;
|
if (state & (BUTTON_CHECKED | BUTTON_3STATE)) flags |= DFCS_CHECKED;
|
||||||
if (state & BUTTON_HIGHLIGHTED) flags |= DFCS_PUSHED;
|
if (state & BUTTON_HIGHLIGHTED) flags |= DFCS_PUSHED;
|
||||||
|
|
||||||
if (style & WS_DISABLED) flags |= DFCS_INACTIVE;
|
if (style & WS_DISABLED) flags |= DFCS_INACTIVE;
|
||||||
|
|
||||||
/* rbox must have the correct height */
|
/* rbox must have the correct height */
|
||||||
delta = rbox.bottom - rbox.top - checkBoxHeight;
|
delta = rbox.bottom - rbox.top - checkBoxHeight;
|
||||||
|
|
||||||
if (style & BS_TOP) {
|
if (style & BS_TOP) {
|
||||||
if (delta > 0) {
|
if (delta > 0) {
|
||||||
rbox.bottom = rbox.top + checkBoxHeight;
|
rbox.bottom = rbox.top + checkBoxHeight;
|
||||||
} else {
|
} else {
|
||||||
rbox.top -= -delta/2 + 1;
|
rbox.top -= -delta/2 + 1;
|
||||||
rbox.bottom += rbox.top + checkBoxHeight;
|
rbox.bottom += rbox.top + checkBoxHeight;
|
||||||
}
|
}
|
||||||
} else if (style & BS_BOTTOM) {
|
} else if (style & BS_BOTTOM) {
|
||||||
if (delta > 0) {
|
if (delta > 0) {
|
||||||
rbox.top = rbox.bottom - checkBoxHeight;
|
rbox.top = rbox.bottom - checkBoxHeight;
|
||||||
} else {
|
} else {
|
||||||
rbox.bottom += -delta/2 + 1;
|
rbox.bottom += -delta/2 + 1;
|
||||||
rbox.top = rbox.bottom -= checkBoxHeight;
|
rbox.top = rbox.bottom -= checkBoxHeight;
|
||||||
}
|
|
||||||
} else { /* Default */
|
|
||||||
if (delta > 0)
|
|
||||||
{
|
|
||||||
int ofs = (delta / 2);
|
|
||||||
rbox.bottom -= ofs + 1;
|
|
||||||
rbox.top = rbox.bottom - checkBoxHeight;
|
|
||||||
}
|
|
||||||
else if (delta < 0)
|
|
||||||
{
|
|
||||||
int ofs = (-delta / 2);
|
|
||||||
rbox.top -= ofs + 1;
|
|
||||||
rbox.bottom = rbox.top + checkBoxHeight;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else { /* Default */
|
||||||
|
if (delta > 0) {
|
||||||
|
int ofs = (delta / 2);
|
||||||
|
rbox.bottom -= ofs + 1;
|
||||||
|
rbox.top = rbox.bottom - checkBoxHeight;
|
||||||
|
} else if (delta < 0) {
|
||||||
|
int ofs = (-delta / 2);
|
||||||
|
rbox.top -= ofs + 1;
|
||||||
|
rbox.bottom = rbox.top + checkBoxHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DrawFrameControl( hDC, &rbox, DFC_BUTTON, flags );
|
DrawFrameControl( hDC, &rbox, DFC_BUTTON, flags );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dtFlags == (UINT)-1L) /* Noting to draw */
|
if (dtFlags == (UINT)-1L) /* Noting to draw */
|
||||||
|
@ -1018,6 +951,7 @@ static void GB_Paint( HWND hwnd, HDC hDC, UINT action )
|
||||||
HBRUSH hbr;
|
HBRUSH hbr;
|
||||||
HFONT hFont;
|
HFONT hFont;
|
||||||
UINT dtFlags;
|
UINT dtFlags;
|
||||||
|
TEXTMETRICW tm;
|
||||||
LONG style = GetWindowLongA( hwnd, GWL_STYLE );
|
LONG style = GetWindowLongA( hwnd, GWL_STYLE );
|
||||||
|
|
||||||
if (action != ODA_DRAWENTIRE) return;
|
if (action != ODA_DRAWENTIRE) return;
|
||||||
|
@ -1030,23 +964,11 @@ static void GB_Paint( HWND hwnd, HDC hDC, UINT action )
|
||||||
(WPARAM)hDC, (LPARAM)hwnd);
|
(WPARAM)hDC, (LPARAM)hwnd);
|
||||||
|
|
||||||
GetClientRect( hwnd, &rc);
|
GetClientRect( hwnd, &rc);
|
||||||
if (TWEAK_WineLook == WIN31_LOOK) {
|
rcFrame = rc;
|
||||||
HPEN hPrevPen = SelectObject( hDC,
|
|
||||||
SYSCOLOR_GetPen(COLOR_WINDOWFRAME));
|
|
||||||
HBRUSH hPrevBrush = SelectObject( hDC,
|
|
||||||
GetStockObject(NULL_BRUSH) );
|
|
||||||
|
|
||||||
Rectangle( hDC, rc.left, rc.top + 2, rc.right - 1, rc.bottom - 1 );
|
GetTextMetricsW (hDC, &tm);
|
||||||
SelectObject( hDC, hPrevBrush );
|
rcFrame.top += (tm.tmHeight / 2) - 1;
|
||||||
SelectObject( hDC, hPrevPen );
|
DrawEdge (hDC, &rcFrame, EDGE_ETCHED, BF_RECT | ((style & BS_FLAT) ? BF_FLAT : 0));
|
||||||
} else {
|
|
||||||
TEXTMETRICW tm;
|
|
||||||
rcFrame = rc;
|
|
||||||
|
|
||||||
GetTextMetricsW (hDC, &tm);
|
|
||||||
rcFrame.top += (tm.tmHeight / 2) - 1;
|
|
||||||
DrawEdge (hDC, &rcFrame, EDGE_ETCHED, BF_RECT | ((style & BS_FLAT) ? BF_FLAT : 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
InflateRect(&rc, -7, 1);
|
InflateRect(&rc, -7, 1);
|
||||||
dtFlags = BUTTON_CalcLabelRect(hwnd, hDC, &rc);
|
dtFlags = BUTTON_CalcLabelRect(hwnd, hDC, &rc);
|
||||||
|
|
122
controls/combo.c
122
controls/combo.c
|
@ -69,10 +69,10 @@ static UINT CBitHeight, CBitWidth;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define COMBO_YBORDERGAP 5
|
#define COMBO_YBORDERGAP 5
|
||||||
#define COMBO_XBORDERSIZE() ( (TWEAK_WineLook == WIN31_LOOK) ? 0 : 2 )
|
#define COMBO_XBORDERSIZE() 2
|
||||||
#define COMBO_YBORDERSIZE() ( (TWEAK_WineLook == WIN31_LOOK) ? 0 : 2 )
|
#define COMBO_YBORDERSIZE() 2
|
||||||
#define COMBO_EDITBUTTONSPACE() ( (TWEAK_WineLook == WIN31_LOOK) ? 8 : 0 )
|
#define COMBO_EDITBUTTONSPACE() 0
|
||||||
#define EDIT_CONTROL_PADDING() ( (TWEAK_WineLook == WIN31_LOOK) ? 0 : 1 )
|
#define EDIT_CONTROL_PADDING() 1
|
||||||
|
|
||||||
static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||||
static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||||
|
@ -571,11 +571,8 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
|
||||||
* In win 95 look n feel, the listbox in the simple combobox has
|
* In win 95 look n feel, the listbox in the simple combobox has
|
||||||
* the WS_EXCLIENTEDGE style instead of the WS_BORDER style.
|
* the WS_EXCLIENTEDGE style instead of the WS_BORDER style.
|
||||||
*/
|
*/
|
||||||
if (TWEAK_WineLook > WIN31_LOOK)
|
lbeStyle &= ~WS_BORDER;
|
||||||
{
|
lbeExStyle |= WS_EX_CLIENTEDGE;
|
||||||
lbeStyle &= ~WS_BORDER;
|
|
||||||
lbeExStyle |= WS_EX_CLIENTEDGE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unicode)
|
if (unicode)
|
||||||
|
@ -600,13 +597,6 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
|
||||||
BOOL bEdit = TRUE;
|
BOOL bEdit = TRUE;
|
||||||
lbeStyle = WS_CHILD | WS_VISIBLE | ES_NOHIDESEL | ES_LEFT | ES_COMBO;
|
lbeStyle = WS_CHILD | WS_VISIBLE | ES_NOHIDESEL | ES_LEFT | ES_COMBO;
|
||||||
|
|
||||||
/*
|
|
||||||
* In Win95 look, the border fo the edit control is
|
|
||||||
* provided by the combobox
|
|
||||||
*/
|
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
lbeStyle |= WS_BORDER;
|
|
||||||
|
|
||||||
if( lphc->wState & CBF_EDIT )
|
if( lphc->wState & CBF_EDIT )
|
||||||
{
|
{
|
||||||
if( lphc->dwStyle & CBS_OEMCONVERT )
|
if( lphc->dwStyle & CBS_OEMCONVERT )
|
||||||
|
@ -671,84 +661,21 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
|
||||||
*
|
*
|
||||||
* Paint combo button (normal, pressed, and disabled states).
|
* Paint combo button (normal, pressed, and disabled states).
|
||||||
*/
|
*/
|
||||||
static void CBPaintButton(
|
static void CBPaintButton( LPHEADCOMBO lphc, HDC hdc, RECT rectButton)
|
||||||
LPHEADCOMBO lphc,
|
|
||||||
HDC hdc,
|
|
||||||
RECT rectButton)
|
|
||||||
{
|
{
|
||||||
|
UINT buttonState = DFCS_SCROLLCOMBOBOX;
|
||||||
|
|
||||||
if( lphc->wState & CBF_NOREDRAW )
|
if( lphc->wState & CBF_NOREDRAW )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
{
|
|
||||||
UINT x, y;
|
|
||||||
BOOL bBool;
|
|
||||||
HDC hMemDC;
|
|
||||||
HBRUSH hPrevBrush;
|
|
||||||
COLORREF oldTextColor, oldBkColor;
|
|
||||||
|
|
||||||
|
if (lphc->wState & CBF_BUTTONDOWN)
|
||||||
|
buttonState |= DFCS_PUSHED;
|
||||||
|
|
||||||
hPrevBrush = SelectObject(hdc, GetSysColorBrush(COLOR_BTNFACE));
|
if (CB_DISABLED(lphc))
|
||||||
|
buttonState |= DFCS_INACTIVE;
|
||||||
|
|
||||||
/*
|
DrawFrameControl(hdc, &rectButton, DFC_SCROLL, buttonState);
|
||||||
* Draw the button background
|
|
||||||
*/
|
|
||||||
PatBlt( hdc,
|
|
||||||
rectButton.left,
|
|
||||||
rectButton.top,
|
|
||||||
rectButton.right-rectButton.left,
|
|
||||||
rectButton.bottom-rectButton.top,
|
|
||||||
PATCOPY );
|
|
||||||
|
|
||||||
if( (bBool = lphc->wState & CBF_BUTTONDOWN) )
|
|
||||||
{
|
|
||||||
DrawEdge( hdc, &rectButton, EDGE_SUNKEN, BF_RECT );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DrawEdge( hdc, &rectButton, EDGE_RAISED, BF_RECT );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Remove the edge of the button from the rectangle
|
|
||||||
* and calculate the position of the bitmap.
|
|
||||||
*/
|
|
||||||
InflateRect( &rectButton, -2, -2);
|
|
||||||
|
|
||||||
x = (rectButton.left + rectButton.right - CBitWidth) >> 1;
|
|
||||||
y = (rectButton.top + rectButton.bottom - CBitHeight) >> 1;
|
|
||||||
|
|
||||||
|
|
||||||
hMemDC = CreateCompatibleDC( hdc );
|
|
||||||
SelectObject( hMemDC, hComboBmp );
|
|
||||||
oldTextColor = SetTextColor( hdc, GetSysColor(COLOR_BTNFACE) );
|
|
||||||
oldBkColor = SetBkColor( hdc, CB_DISABLED(lphc) ? RGB(128,128,128) :
|
|
||||||
RGB(0,0,0) );
|
|
||||||
BitBlt( hdc, x, y, CBitWidth, CBitHeight, hMemDC, 0, 0, SRCCOPY );
|
|
||||||
SetBkColor( hdc, oldBkColor );
|
|
||||||
SetTextColor( hdc, oldTextColor );
|
|
||||||
DeleteDC( hMemDC );
|
|
||||||
SelectObject( hdc, hPrevBrush );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UINT buttonState = DFCS_SCROLLCOMBOBOX;
|
|
||||||
|
|
||||||
if (lphc->wState & CBF_BUTTONDOWN)
|
|
||||||
{
|
|
||||||
buttonState |= DFCS_PUSHED;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CB_DISABLED(lphc))
|
|
||||||
{
|
|
||||||
buttonState |= DFCS_INACTIVE;
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawFrameControl(hdc,
|
|
||||||
&rectButton,
|
|
||||||
DFC_SCROLL,
|
|
||||||
buttonState);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1020,10 +947,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC)
|
||||||
/*
|
/*
|
||||||
* In non 3.1 look, there is a sunken border on the combobox
|
* In non 3.1 look, there is a sunken border on the combobox
|
||||||
*/
|
*/
|
||||||
if (TWEAK_WineLook != WIN31_LOOK)
|
CBPaintBorder(lphc->self, lphc, hDC);
|
||||||
{
|
|
||||||
CBPaintBorder(lphc->self, lphc, hDC);
|
|
||||||
}
|
|
||||||
|
|
||||||
if( !IsRectEmpty(&lphc->buttonRect) )
|
if( !IsRectEmpty(&lphc->buttonRect) )
|
||||||
{
|
{
|
||||||
|
@ -1041,23 +965,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC)
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !(lphc->wState & CBF_EDIT) )
|
if( !(lphc->wState & CBF_EDIT) )
|
||||||
{
|
|
||||||
/*
|
|
||||||
* The text area has a border only in Win 3.1 look.
|
|
||||||
*/
|
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
{
|
|
||||||
HPEN hPrevPen = SelectObject( hDC, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
|
|
||||||
|
|
||||||
Rectangle( hDC,
|
|
||||||
lphc->textRect.left, lphc->textRect.top,
|
|
||||||
lphc->textRect.right - 1, lphc->textRect.bottom - 1);
|
|
||||||
|
|
||||||
SelectObject( hDC, hPrevPen );
|
|
||||||
}
|
|
||||||
|
|
||||||
CBPaintText( lphc, hDC, lphc->textRect);
|
CBPaintText( lphc, hDC, lphc->textRect);
|
||||||
}
|
|
||||||
|
|
||||||
if( hPrevBrush )
|
if( hPrevBrush )
|
||||||
SelectObject( hDC, hPrevBrush );
|
SelectObject( hDC, hPrevBrush );
|
||||||
|
|
|
@ -2148,8 +2148,6 @@ static void EDIT_SetRectNP(EDITSTATE *es, LPRECT rc)
|
||||||
CopyRect(&es->format_rect, rc);
|
CopyRect(&es->format_rect, rc);
|
||||||
if (es->style & WS_BORDER) {
|
if (es->style & WS_BORDER) {
|
||||||
INT bw = GetSystemMetrics(SM_CXBORDER) + 1;
|
INT bw = GetSystemMetrics(SM_CXBORDER) + 1;
|
||||||
if(TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
bw += 2;
|
|
||||||
es->format_rect.left += bw;
|
es->format_rect.left += bw;
|
||||||
es->format_rect.top += bw;
|
es->format_rect.top += bw;
|
||||||
es->format_rect.right -= bw;
|
es->format_rect.right -= bw;
|
||||||
|
@ -4376,8 +4374,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode)
|
||||||
es->style |= ES_AUTOVSCROLL;
|
es->style |= ES_AUTOVSCROLL;
|
||||||
} else {
|
} else {
|
||||||
es->buffer_limit = BUFLIMIT_SINGLE;
|
es->buffer_limit = BUFLIMIT_SINGLE;
|
||||||
if (WIN31_LOOK == TWEAK_WineLook ||
|
if ( WIN95_LOOK == TWEAK_WineLook) {
|
||||||
WIN95_LOOK == TWEAK_WineLook) {
|
|
||||||
es->style &= ~ES_CENTER;
|
es->style &= ~ES_CENTER;
|
||||||
es->style &= ~ES_RIGHT;
|
es->style &= ~ES_RIGHT;
|
||||||
} else {
|
} else {
|
||||||
|
@ -4418,16 +4415,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode)
|
||||||
* controls created directly with style 0x50800000, exStyle 0 (
|
* controls created directly with style 0x50800000, exStyle 0 (
|
||||||
* which should have a single pixel border)
|
* which should have a single pixel border)
|
||||||
*/
|
*/
|
||||||
if (TWEAK_WineLook != WIN31_LOOK)
|
es->style &= ~WS_BORDER;
|
||||||
{
|
|
||||||
es->style &= ~WS_BORDER;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ((es->style & WS_BORDER) && !(es->style & WS_DLGFRAME))
|
|
||||||
SetWindowLongW( hwnd, GWL_STYLE,
|
|
||||||
GetWindowLongW( hwnd, GWL_STYLE ) & ~WS_BORDER );
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -4564,9 +4552,8 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
|
||||||
if (font)
|
if (font)
|
||||||
SelectObject(dc, old_font);
|
SelectObject(dc, old_font);
|
||||||
ReleaseDC(es->hwndSelf, dc);
|
ReleaseDC(es->hwndSelf, dc);
|
||||||
if (font && (TWEAK_WineLook > WIN31_LOOK))
|
EDIT_EM_SetMargins(es, EC_LEFTMARGIN | EC_RIGHTMARGIN,
|
||||||
EDIT_EM_SetMargins(es, EC_LEFTMARGIN | EC_RIGHTMARGIN,
|
EC_USEFONTINFO, EC_USEFONTINFO);
|
||||||
EC_USEFONTINFO, EC_USEFONTINFO);
|
|
||||||
|
|
||||||
/* Force the recalculation of the format rect for each font change */
|
/* Force the recalculation of the format rect for each font change */
|
||||||
GetClientRect(es->hwndSelf, &r);
|
GetClientRect(es->hwndSelf, &r);
|
||||||
|
|
|
@ -3102,8 +3102,7 @@ static LRESULT WINAPI ComboLBWndProc_common( HWND hwnd, UINT msg,
|
||||||
switch( msg )
|
switch( msg )
|
||||||
{
|
{
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
if ( (TWEAK_WineLook > WIN31_LOOK) &&
|
if ( (CB_GETTYPE(lphc) != CBS_SIMPLE) )
|
||||||
(CB_GETTYPE(lphc) != CBS_SIMPLE) )
|
|
||||||
{
|
{
|
||||||
POINT mousePos;
|
POINT mousePos;
|
||||||
BOOL captured;
|
BOOL captured;
|
||||||
|
@ -3138,11 +3137,9 @@ static LRESULT WINAPI ComboLBWndProc_common( HWND hwnd, UINT msg,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
/* else we are in Win3.1 look, go with the default behavior. */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
if (TWEAK_WineLook > WIN31_LOOK)
|
|
||||||
{
|
{
|
||||||
POINT mousePos;
|
POINT mousePos;
|
||||||
RECT clientRect;
|
RECT clientRect;
|
||||||
|
|
133
controls/menu.c
133
controls/menu.c
|
@ -888,11 +888,7 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
|
||||||
|
|
||||||
/* under at least win95 you seem to be given a standard
|
/* under at least win95 you seem to be given a standard
|
||||||
height for the menu and the height value is ignored */
|
height for the menu and the height value is ignored */
|
||||||
|
lpitem->rect.bottom += GetSystemMetrics(SM_CYMENU)-1;
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
lpitem->rect.bottom += GetSystemMetrics(SM_CYMENU);
|
|
||||||
else
|
|
||||||
lpitem->rect.bottom += GetSystemMetrics(SM_CYMENU)-1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lpitem->rect.bottom += mis.itemHeight;
|
lpitem->rect.bottom += mis.itemHeight;
|
||||||
|
@ -941,10 +937,7 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
|
||||||
GetTextExtentPoint32W(hdc, lpitem->text, strlenW(lpitem->text), &size);
|
GetTextExtentPoint32W(hdc, lpitem->text, strlenW(lpitem->text), &size);
|
||||||
|
|
||||||
lpitem->rect.right += size.cx;
|
lpitem->rect.right += size.cx;
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
lpitem->rect.bottom += max(size.cy, GetSystemMetrics(SM_CYMENU)-1);
|
||||||
lpitem->rect.bottom += max( size.cy, GetSystemMetrics(SM_CYMENU) );
|
|
||||||
else
|
|
||||||
lpitem->rect.bottom += max(size.cy, GetSystemMetrics(SM_CYMENU)-1);
|
|
||||||
lpitem->xTab = 0;
|
lpitem->xTab = 0;
|
||||||
|
|
||||||
if (menuBar)
|
if (menuBar)
|
||||||
|
@ -989,13 +982,13 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner )
|
||||||
SelectObject( hdc, hMenuFont);
|
SelectObject( hdc, hMenuFont);
|
||||||
|
|
||||||
start = 0;
|
start = 0;
|
||||||
maxX = (TWEAK_WineLook == WIN31_LOOK) ? GetSystemMetrics(SM_CXBORDER) : 2+1 ;
|
maxX = 2 + 1;
|
||||||
|
|
||||||
while (start < lppop->nItems)
|
while (start < lppop->nItems)
|
||||||
{
|
{
|
||||||
lpitem = &lppop->items[start];
|
lpitem = &lppop->items[start];
|
||||||
orgX = maxX;
|
orgX = maxX;
|
||||||
orgY = (TWEAK_WineLook == WIN31_LOOK) ? GetSystemMetrics(SM_CYBORDER) : 2;
|
orgY = 2;
|
||||||
|
|
||||||
maxTab = maxTabWidth = 0;
|
maxTab = maxTabWidth = 0;
|
||||||
|
|
||||||
|
@ -1032,11 +1025,8 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop, HWND hwndOwner )
|
||||||
lppop->Width = maxX;
|
lppop->Width = maxX;
|
||||||
|
|
||||||
/* space for 3d border */
|
/* space for 3d border */
|
||||||
if(TWEAK_WineLook > WIN31_LOOK)
|
lppop->Height += 2;
|
||||||
{
|
lppop->Width += 2;
|
||||||
lppop->Height += 2;
|
|
||||||
lppop->Width += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReleaseDC( 0, hdc );
|
ReleaseDC( 0, hdc );
|
||||||
}
|
}
|
||||||
|
@ -1130,17 +1120,8 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
|
|
||||||
if (lpitem->fType & MF_SYSMENU)
|
if (lpitem->fType & MF_SYSMENU)
|
||||||
{
|
{
|
||||||
if( !IsIconic(hwnd) ) {
|
if( !IsIconic(hwnd) )
|
||||||
if (TWEAK_WineLook > WIN31_LOOK)
|
NC_DrawSysButton( hwnd, hdc, lpitem->fState & (MF_HILITE | MF_MOUSESELECT) );
|
||||||
NC_DrawSysButton95( hwnd, hdc,
|
|
||||||
lpitem->fState &
|
|
||||||
(MF_HILITE | MF_MOUSESELECT) );
|
|
||||||
else
|
|
||||||
NC_DrawSysButton( hwnd, hdc,
|
|
||||||
lpitem->fState &
|
|
||||||
(MF_HILITE | MF_MOUSESELECT) );
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1213,38 +1194,20 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
/* vertical separator */
|
/* vertical separator */
|
||||||
if (!menuBar && (lpitem->fType & MF_MENUBARBREAK))
|
if (!menuBar && (lpitem->fType & MF_MENUBARBREAK))
|
||||||
{
|
{
|
||||||
if (TWEAK_WineLook > WIN31_LOOK)
|
RECT rc = rect;
|
||||||
{
|
rc.top = 3;
|
||||||
RECT rc = rect;
|
rc.bottom = height - 3;
|
||||||
rc.top = 3;
|
DrawEdge (hdc, &rc, EDGE_ETCHED, BF_LEFT);
|
||||||
rc.bottom = height - 3;
|
|
||||||
DrawEdge (hdc, &rc, EDGE_ETCHED, BF_LEFT);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SelectObject( hdc, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
|
|
||||||
MoveToEx( hdc, rect.left, 0, NULL );
|
|
||||||
LineTo( hdc, rect.left, height );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* horizontal separator */
|
/* horizontal separator */
|
||||||
if (lpitem->fType & MF_SEPARATOR)
|
if (lpitem->fType & MF_SEPARATOR)
|
||||||
{
|
{
|
||||||
if (TWEAK_WineLook > WIN31_LOOK)
|
RECT rc = rect;
|
||||||
{
|
rc.left++;
|
||||||
RECT rc = rect;
|
rc.right--;
|
||||||
rc.left++;
|
rc.top += SEPARATOR_HEIGHT / 2;
|
||||||
rc.right--;
|
DrawEdge (hdc, &rc, EDGE_ETCHED, BF_TOP);
|
||||||
rc.top += SEPARATOR_HEIGHT / 2;
|
|
||||||
DrawEdge (hdc, &rc, EDGE_ETCHED, BF_TOP);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SelectObject( hdc, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
|
|
||||||
MoveToEx( hdc, rect.left, rect.top + SEPARATOR_HEIGHT/2, NULL );
|
|
||||||
LineTo( hdc, rect.right, rect.top + SEPARATOR_HEIGHT/2 );
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1384,7 +1347,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b'))
|
if ((lpitem->text[i] == '\t') || (lpitem->text[i] == '\b'))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if( (TWEAK_WineLook != WIN31_LOOK) && (lpitem->fState & MF_GRAYED))
|
if(lpitem->fState & MF_GRAYED)
|
||||||
{
|
{
|
||||||
if (!(lpitem->fState & MF_HILITE) )
|
if (!(lpitem->fState & MF_HILITE) )
|
||||||
{
|
{
|
||||||
|
@ -1411,7 +1374,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
uFormat = DT_RIGHT | DT_VCENTER | DT_SINGLELINE;
|
uFormat = DT_RIGHT | DT_VCENTER | DT_SINGLELINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (TWEAK_WineLook != WIN31_LOOK) && (lpitem->fState & MF_GRAYED))
|
if(lpitem->fState & MF_GRAYED)
|
||||||
{
|
{
|
||||||
if (!(lpitem->fState & MF_HILITE) )
|
if (!(lpitem->fState & MF_HILITE) )
|
||||||
{
|
{
|
||||||
|
@ -1445,12 +1408,6 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
|
||||||
|
|
||||||
GetClientRect( hwnd, &rect );
|
GetClientRect( hwnd, &rect );
|
||||||
|
|
||||||
if(TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
{
|
|
||||||
rect.bottom -= POPUP_YSHADE * GetSystemMetrics(SM_CYBORDER);
|
|
||||||
rect.right -= POPUP_XSHADE * GetSystemMetrics(SM_CXBORDER);
|
|
||||||
}
|
|
||||||
|
|
||||||
if((hPrevBrush = SelectObject( hdc, GetSysColorBrush(COLOR_MENU) ))
|
if((hPrevBrush = SelectObject( hdc, GetSysColorBrush(COLOR_MENU) ))
|
||||||
&& (SelectObject( hdc, hMenuFont)))
|
&& (SelectObject( hdc, hMenuFont)))
|
||||||
{
|
{
|
||||||
|
@ -1461,30 +1418,9 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
|
||||||
hPrevPen = SelectObject( hdc, GetStockObject( NULL_PEN ) );
|
hPrevPen = SelectObject( hdc, GetStockObject( NULL_PEN ) );
|
||||||
if( hPrevPen )
|
if( hPrevPen )
|
||||||
{
|
{
|
||||||
INT ropPrev, i;
|
|
||||||
POPUPMENU *menu;
|
POPUPMENU *menu;
|
||||||
|
|
||||||
/* draw 3-d shade */
|
DrawEdge (hdc, &rect, EDGE_RAISED, BF_RECT);
|
||||||
if(TWEAK_WineLook == WIN31_LOOK) {
|
|
||||||
SelectObject( hdc, hShadeBrush );
|
|
||||||
SetBkMode( hdc, TRANSPARENT );
|
|
||||||
ropPrev = SetROP2( hdc, R2_MASKPEN );
|
|
||||||
|
|
||||||
i = rect.right; /* why SetBrushOrg() doesn't? */
|
|
||||||
PatBlt( hdc, i & 0xfffffffe,
|
|
||||||
rect.top + POPUP_YSHADE*GetSystemMetrics(SM_CYBORDER),
|
|
||||||
i%2 + POPUP_XSHADE*GetSystemMetrics(SM_CXBORDER),
|
|
||||||
rect.bottom - rect.top, 0x00a000c9 );
|
|
||||||
i = rect.bottom;
|
|
||||||
PatBlt( hdc, rect.left + POPUP_XSHADE*GetSystemMetrics(SM_CXBORDER),
|
|
||||||
i & 0xfffffffe,rect.right - rect.left,
|
|
||||||
i%2 + POPUP_YSHADE*GetSystemMetrics(SM_CYBORDER), 0x00a000c9 );
|
|
||||||
SelectObject( hdc, hPrevPen );
|
|
||||||
SelectObject( hdc, hPrevBrush );
|
|
||||||
SetROP2( hdc, ropPrev );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
DrawEdge (hdc, &rect, EDGE_RAISED, BF_RECT);
|
|
||||||
|
|
||||||
/* draw menu items */
|
/* draw menu items */
|
||||||
|
|
||||||
|
@ -1592,12 +1528,6 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id,
|
||||||
}
|
}
|
||||||
if( y < 0 ) y = 0;
|
if( y < 0 ) y = 0;
|
||||||
|
|
||||||
if( TWEAK_WineLook == WIN31_LOOK )
|
|
||||||
{
|
|
||||||
width += POPUP_XSHADE * GetSystemMetrics(SM_CXBORDER); /* add space for shading */
|
|
||||||
height += POPUP_YSHADE * GetSystemMetrics(SM_CYBORDER);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* NOTE: In Windows, top menu popup is not owned. */
|
/* NOTE: In Windows, top menu popup is not owned. */
|
||||||
menu->hWnd = CreateWindowExW( 0, POPUPMENU_CLASS_ATOMW, NULL,
|
menu->hWnd = CreateWindowExW( 0, POPUPMENU_CLASS_ATOMW, NULL,
|
||||||
WS_POPUP, x, y, width, height,
|
WS_POPUP, x, y, width, height,
|
||||||
|
@ -2244,10 +2174,6 @@ static BOOL MENU_ButtonDown( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags )
|
||||||
if(!(item->fState & MF_MOUSESELECT ))
|
if(!(item->fState & MF_MOUSESELECT ))
|
||||||
{
|
{
|
||||||
pmt->hCurrentMenu = MENU_ShowSubPopup( pmt->hOwnerWnd, hPtMenu, FALSE, wFlags );
|
pmt->hCurrentMenu = MENU_ShowSubPopup( pmt->hOwnerWnd, hPtMenu, FALSE, wFlags );
|
||||||
|
|
||||||
/* In win31, a newly popped menu always remains opened for the next buttonup */
|
|
||||||
if(TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
ptmenu->bTimeToHide = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -2778,9 +2704,9 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
|
||||||
/* In win95 winelook, the selected menu item must be changed every time the
|
/* In win95 winelook, the selected menu item must be changed every time the
|
||||||
mouse moves. In Win31 winelook, the mouse button has to be held down */
|
mouse moves. In Win31 winelook, the mouse button has to be held down */
|
||||||
|
|
||||||
if ( hmenu && ((TWEAK_WineLook > WIN31_LOOK) ||
|
if ( hmenu &&
|
||||||
( (msg.wParam & MK_LBUTTON) ||
|
( (msg.wParam & MK_LBUTTON) ||
|
||||||
((wFlags & TPM_RIGHTBUTTON) && (msg.wParam & MK_RBUTTON)))) )
|
((wFlags & TPM_RIGHTBUTTON) && (msg.wParam & MK_RBUTTON))) )
|
||||||
|
|
||||||
fEndMenu |= !MENU_MouseMove( &mt, hmenu, wFlags );
|
fEndMenu |= !MENU_MouseMove( &mt, hmenu, wFlags );
|
||||||
|
|
||||||
|
@ -3875,18 +3801,9 @@ DWORD WINAPI DrawMenuBarTemp(HWND hwnd, HDC hDC, LPRECT lprect, HMENU hMenu, HFO
|
||||||
|
|
||||||
FillRect(hDC, lprect, GetSysColorBrush(COLOR_MENU) );
|
FillRect(hDC, lprect, GetSysColorBrush(COLOR_MENU) );
|
||||||
|
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
SelectObject( hDC, SYSCOLOR_GetPen(COLOR_3DFACE));
|
||||||
{
|
MoveToEx( hDC, lprect->left, lprect->bottom, NULL );
|
||||||
SelectObject( hDC, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
|
LineTo( hDC, lprect->right, lprect->bottom );
|
||||||
MoveToEx( hDC, lprect->left, lprect->bottom, NULL );
|
|
||||||
LineTo( hDC, lprect->right, lprect->bottom );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SelectObject( hDC, SYSCOLOR_GetPen(COLOR_3DFACE));
|
|
||||||
MoveToEx( hDC, lprect->left, lprect->bottom, NULL );
|
|
||||||
LineTo( hDC, lprect->right, lprect->bottom );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lppop->nItems == 0)
|
if (lppop->nItems == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,7 +73,7 @@ static HBITMAP hRgArrowI;
|
||||||
#define SCROLL_MIN_THUMB 6
|
#define SCROLL_MIN_THUMB 6
|
||||||
|
|
||||||
/* Overlap between arrows and thumb */
|
/* Overlap between arrows and thumb */
|
||||||
#define SCROLL_ARROW_THUMB_OVERLAP ((TWEAK_WineLook == WIN31_LOOK) ? 1 : 0)
|
#define SCROLL_ARROW_THUMB_OVERLAP 0
|
||||||
|
|
||||||
/* Delay (in ms) before first repetition when holding the button down */
|
/* Delay (in ms) before first repetition when holding the button down */
|
||||||
#define SCROLL_FIRST_DELAY 200
|
#define SCROLL_FIRST_DELAY 200
|
||||||
|
@ -433,9 +433,9 @@ static enum SCROLL_HITTEST SCROLL_HitTest( HWND hwnd, INT nBar,
|
||||||
*
|
*
|
||||||
* Draw the scroll bar arrows.
|
* Draw the scroll bar arrows.
|
||||||
*/
|
*/
|
||||||
static void SCROLL_DrawArrows_9x( HDC hdc, SCROLLBAR_INFO *infoPtr,
|
static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr,
|
||||||
RECT *rect, INT arrowSize, BOOL vertical,
|
RECT *rect, INT arrowSize, BOOL vertical,
|
||||||
BOOL top_pressed, BOOL bottom_pressed )
|
BOOL top_pressed, BOOL bottom_pressed )
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT r;
|
||||||
|
|
||||||
|
@ -462,93 +462,8 @@ static void SCROLL_DrawArrows_9x( HDC hdc, SCROLLBAR_INFO *infoPtr,
|
||||||
| (infoPtr->flags&ESB_DISABLE_RTDN ? DFCS_INACTIVE : 0) );
|
| (infoPtr->flags&ESB_DISABLE_RTDN ? DFCS_INACTIVE : 0) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SCROLL_DrawArrows_31( HDC hdc, SCROLLBAR_INFO *infoPtr,
|
static void SCROLL_DrawMovingThumb( HDC hdc, RECT *rect, BOOL vertical,
|
||||||
RECT *rect, INT arrowSize, BOOL vertical,
|
INT arrowSize, INT thumbSize )
|
||||||
BOOL top_pressed, BOOL bottom_pressed )
|
|
||||||
{
|
|
||||||
HDC hdcMem = CreateCompatibleDC( hdc );
|
|
||||||
HBITMAP hbmpPrev = SelectObject( hdcMem, vertical ?
|
|
||||||
TOP_ARROW(infoPtr->flags, top_pressed)
|
|
||||||
: LEFT_ARROW(infoPtr->flags, top_pressed));
|
|
||||||
|
|
||||||
SetStretchBltMode( hdc, STRETCH_DELETESCANS );
|
|
||||||
StretchBlt( hdc, rect->left, rect->top,
|
|
||||||
vertical ? rect->right-rect->left : arrowSize,
|
|
||||||
vertical ? arrowSize : rect->bottom-rect->top,
|
|
||||||
hdcMem, 0, 0,
|
|
||||||
GetSystemMetrics(SM_CXVSCROLL),GetSystemMetrics(SM_CYHSCROLL),
|
|
||||||
SRCCOPY );
|
|
||||||
|
|
||||||
SelectObject( hdcMem, vertical ?
|
|
||||||
BOTTOM_ARROW( infoPtr->flags, bottom_pressed )
|
|
||||||
: RIGHT_ARROW( infoPtr->flags, bottom_pressed ) );
|
|
||||||
if (vertical)
|
|
||||||
StretchBlt( hdc, rect->left, rect->bottom - arrowSize,
|
|
||||||
rect->right - rect->left, arrowSize,
|
|
||||||
hdcMem, 0, 0,
|
|
||||||
GetSystemMetrics(SM_CXVSCROLL),GetSystemMetrics(SM_CYHSCROLL),
|
|
||||||
SRCCOPY );
|
|
||||||
else
|
|
||||||
StretchBlt( hdc, rect->right - arrowSize, rect->top,
|
|
||||||
arrowSize, rect->bottom - rect->top,
|
|
||||||
hdcMem, 0, 0,
|
|
||||||
GetSystemMetrics(SM_CXVSCROLL), GetSystemMetrics(SM_CYHSCROLL),
|
|
||||||
SRCCOPY );
|
|
||||||
SelectObject( hdcMem, hbmpPrev );
|
|
||||||
DeleteDC( hdcMem );
|
|
||||||
}
|
|
||||||
|
|
||||||
static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr,
|
|
||||||
RECT *rect, INT arrowSize, BOOL vertical,
|
|
||||||
BOOL top_pressed, BOOL bottom_pressed )
|
|
||||||
{
|
|
||||||
if( TWEAK_WineLook == WIN31_LOOK )
|
|
||||||
SCROLL_DrawArrows_31( hdc, infoPtr, rect, arrowSize,
|
|
||||||
vertical, top_pressed,bottom_pressed );
|
|
||||||
else
|
|
||||||
SCROLL_DrawArrows_9x( hdc, infoPtr, rect, arrowSize,
|
|
||||||
vertical, top_pressed,bottom_pressed );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* SCROLL_DrawMovingThumb
|
|
||||||
*
|
|
||||||
* Draw the moving thumb rectangle.
|
|
||||||
*/
|
|
||||||
static void SCROLL_DrawMovingThumb_31( HDC hdc, RECT *rect, BOOL vertical,
|
|
||||||
INT arrowSize, INT thumbSize )
|
|
||||||
{
|
|
||||||
RECT r = *rect;
|
|
||||||
if (vertical)
|
|
||||||
{
|
|
||||||
r.top += SCROLL_TrackingPos;
|
|
||||||
if (r.top < rect->top + arrowSize - SCROLL_ARROW_THUMB_OVERLAP)
|
|
||||||
r.top = rect->top + arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
|
|
||||||
if (r.top + thumbSize >
|
|
||||||
rect->bottom - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP))
|
|
||||||
r.top = rect->bottom - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP)
|
|
||||||
- thumbSize;
|
|
||||||
r.bottom = r.top + thumbSize;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
r.left += SCROLL_TrackingPos;
|
|
||||||
if (r.left < rect->left + arrowSize - SCROLL_ARROW_THUMB_OVERLAP)
|
|
||||||
r.left = rect->left + arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
|
|
||||||
if (r.left + thumbSize >
|
|
||||||
rect->right - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP))
|
|
||||||
r.left = rect->right - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP)
|
|
||||||
- thumbSize;
|
|
||||||
r.right = r.left + thumbSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawFocusRect( hdc, &r );
|
|
||||||
SCROLL_MovingThumb = !SCROLL_MovingThumb;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void SCROLL_DrawMovingThumb_9x( HDC hdc, RECT *rect, BOOL vertical,
|
|
||||||
INT arrowSize, INT thumbSize )
|
|
||||||
{
|
{
|
||||||
INT pos = SCROLL_TrackingPos;
|
INT pos = SCROLL_TrackingPos;
|
||||||
INT max_size;
|
INT max_size;
|
||||||
|
@ -572,15 +487,6 @@ static void SCROLL_DrawMovingThumb_9x( HDC hdc, RECT *rect, BOOL vertical,
|
||||||
SCROLL_MovingThumb = !SCROLL_MovingThumb;
|
SCROLL_MovingThumb = !SCROLL_MovingThumb;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SCROLL_DrawMovingThumb( HDC hdc, RECT *rect, BOOL vertical,
|
|
||||||
INT arrowSize, INT thumbSize )
|
|
||||||
{
|
|
||||||
if( TWEAK_WineLook == WIN31_LOOK )
|
|
||||||
SCROLL_DrawMovingThumb_31( hdc, rect, vertical, arrowSize, thumbSize );
|
|
||||||
else
|
|
||||||
SCROLL_DrawMovingThumb_9x( hdc, rect, vertical, arrowSize, thumbSize );
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SCROLL_DrawInterior
|
* SCROLL_DrawInterior
|
||||||
*
|
*
|
||||||
|
@ -693,23 +599,15 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
|
||||||
|
|
||||||
/* Select the correct brush and pen */
|
/* Select the correct brush and pen */
|
||||||
|
|
||||||
if (TWEAK_WineLook == WIN31_LOOK && (flags & ESB_DISABLE_BOTH) == ESB_DISABLE_BOTH)
|
/* Only scrollbar controls send WM_CTLCOLORSCROLLBAR.
|
||||||
{
|
* The window-owned scrollbars need to call DEFWND_ControlColor
|
||||||
/* This ought to be the color of the parent window */
|
* to correctly setup default scrollbar colors
|
||||||
hBrush = GetSysColorBrush(COLOR_WINDOW);
|
*/
|
||||||
}
|
if (nBar == SB_CTL) {
|
||||||
else
|
hBrush = (HBRUSH)SendMessageA( GetParent(hwnd), WM_CTLCOLORSCROLLBAR,
|
||||||
{
|
(WPARAM)hdc,(LPARAM)hwnd);
|
||||||
/* Only scrollbar controls send WM_CTLCOLORSCROLLBAR.
|
} else {
|
||||||
* The window-owned scrollbars need to call DEFWND_ControlColor
|
hBrush = DEFWND_ControlColor( hdc, CTLCOLOR_SCROLLBAR );
|
||||||
* to correctly setup default scrollbar colors
|
|
||||||
*/
|
|
||||||
if (nBar == SB_CTL) {
|
|
||||||
hBrush = (HBRUSH)SendMessageA( GetParent(hwnd), WM_CTLCOLORSCROLLBAR,
|
|
||||||
(WPARAM)hdc,(LPARAM)hwnd);
|
|
||||||
} else {
|
|
||||||
hBrush = DEFWND_ControlColor( hdc, CTLCOLOR_SCROLLBAR );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
hSavePen = SelectObject( hdc, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
|
hSavePen = SelectObject( hdc, SYSCOLOR_GetPen(COLOR_WINDOWFRAME) );
|
||||||
hSaveBrush = SelectObject( hdc, hBrush );
|
hSaveBrush = SelectObject( hdc, hBrush );
|
||||||
|
@ -730,19 +628,11 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
|
||||||
|
|
||||||
/* Draw the scroll bar frame */
|
/* Draw the scroll bar frame */
|
||||||
|
|
||||||
/* Only draw outline if Win 3.1. Mar 24, 1999 - Ronald B. Cemer */
|
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
Rectangle( hdc, r.left, r.top, r.right, r.bottom );
|
|
||||||
|
|
||||||
/* Draw the scroll rectangles and thumb */
|
/* Draw the scroll rectangles and thumb */
|
||||||
|
|
||||||
if (!thumbPos) /* No thumb to draw */
|
if (!thumbPos) /* No thumb to draw */
|
||||||
{
|
{
|
||||||
INT offset = (TWEAK_WineLook > WIN31_LOOK) ? 0 : 1;
|
PatBlt( hdc, r.left, r.top, r.right - r.left, r.bottom - r.top, PATCOPY );
|
||||||
|
|
||||||
PatBlt( hdc, r.left+offset, r.top+offset,
|
|
||||||
r.right - r.left - 2*offset, r.bottom - r.top - 2*offset,
|
|
||||||
PATCOPY );
|
|
||||||
|
|
||||||
/* cleanup and return */
|
/* cleanup and return */
|
||||||
SelectObject( hdc, hSavePen );
|
SelectObject( hdc, hSavePen );
|
||||||
|
@ -752,47 +642,30 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
|
||||||
|
|
||||||
if (vertical)
|
if (vertical)
|
||||||
{
|
{
|
||||||
INT offset = (TWEAK_WineLook == WIN31_LOOK) ? 1 : 0;
|
PatBlt( hdc, r.left, r.top, r.right - r.left,
|
||||||
|
thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP),
|
||||||
PatBlt( hdc, r.left + offset, r.top + offset,
|
top_selected ? 0x0f0000 : PATCOPY );
|
||||||
r.right - r.left - offset*2,
|
|
||||||
thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP) - offset,
|
|
||||||
top_selected ? 0x0f0000 : PATCOPY );
|
|
||||||
r.top += thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
|
r.top += thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
|
||||||
PatBlt( hdc, r.left + offset, r.top + thumbSize,
|
PatBlt( hdc, r.left, r.top + thumbSize, r.right - r.left,
|
||||||
r.right - r.left - offset*2,
|
r.bottom - r.top - thumbSize,
|
||||||
r.bottom - r.top - thumbSize - offset,
|
bottom_selected ? 0x0f0000 : PATCOPY );
|
||||||
bottom_selected ? 0x0f0000 : PATCOPY );
|
|
||||||
r.bottom = r.top + thumbSize;
|
r.bottom = r.top + thumbSize;
|
||||||
}
|
}
|
||||||
else /* horizontal */
|
else /* horizontal */
|
||||||
{
|
{
|
||||||
INT offset = (TWEAK_WineLook == WIN31_LOOK) ? 1 : 0;
|
PatBlt( hdc, r.left, r.top,
|
||||||
|
thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP),
|
||||||
PatBlt( hdc, r.left + offset, r.top + offset,
|
r.bottom - r.top, top_selected ? 0x0f0000 : PATCOPY );
|
||||||
thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP),
|
|
||||||
r.bottom - r.top - offset*2,
|
|
||||||
top_selected ? 0x0f0000 : PATCOPY );
|
|
||||||
r.left += thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
|
r.left += thumbPos - (arrowSize - SCROLL_ARROW_THUMB_OVERLAP);
|
||||||
PatBlt( hdc, r.left + thumbSize, r.top + offset,
|
PatBlt( hdc, r.left + thumbSize, r.top, r.right - r.left - thumbSize,
|
||||||
r.right - r.left - thumbSize - offset,
|
r.bottom - r.top, bottom_selected ? 0x0f0000 : PATCOPY );
|
||||||
r.bottom - r.top - offset*2,
|
|
||||||
bottom_selected ? 0x0f0000 : PATCOPY );
|
|
||||||
r.right = r.left + thumbSize;
|
r.right = r.left + thumbSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draw the thumb */
|
/* Draw the thumb */
|
||||||
|
|
||||||
SelectObject( hdc, GetSysColorBrush(COLOR_BTNFACE) );
|
SelectObject( hdc, GetSysColorBrush(COLOR_BTNFACE) );
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
Rectangle( hdc, r.left+1, r.top+1, r.right-1, r.bottom-1 );
|
||||||
{
|
|
||||||
Rectangle( hdc, r.left, r.top, r.right, r.bottom );
|
|
||||||
r.top++, r.left++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Rectangle( hdc, r.left+1, r.top+1, r.right-1, r.bottom-1 );
|
|
||||||
}
|
|
||||||
DrawEdge( hdc, &r, EDGE_RAISED, BF_RECT );
|
DrawEdge( hdc, &r, EDGE_RAISED, BF_RECT );
|
||||||
|
|
||||||
if (Save_SCROLL_MovingThumb &&
|
if (Save_SCROLL_MovingThumb &&
|
||||||
|
|
|
@ -274,7 +274,7 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_NCCREATE:
|
case WM_NCCREATE:
|
||||||
if ((TWEAK_WineLook > WIN31_LOOK) && (full_style & SS_SUNKEN))
|
if (full_style & SS_SUNKEN)
|
||||||
SetWindowLongA( hwnd, GWL_EXSTYLE,
|
SetWindowLongA( hwnd, GWL_EXSTYLE,
|
||||||
GetWindowLongA( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE );
|
GetWindowLongA( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE );
|
||||||
|
|
||||||
|
@ -585,9 +585,6 @@ static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style )
|
||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
|
||||||
return;
|
|
||||||
|
|
||||||
GetClientRect( hwnd, &rc );
|
GetClientRect( hwnd, &rc );
|
||||||
switch (style & SS_TYPEMASK)
|
switch (style & SS_TYPEMASK)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(graphics);
|
||||||
|
|
||||||
USER_DRIVER USER_Driver;
|
USER_DRIVER USER_Driver;
|
||||||
|
|
||||||
WINE_LOOK TWEAK_WineLook = WIN31_LOOK;
|
WINE_LOOK TWEAK_WineLook = WIN95_LOOK;
|
||||||
|
|
||||||
WORD USER_HeapSel = 0; /* USER heap selector */
|
WORD USER_HeapSel = 0; /* USER heap selector */
|
||||||
HMODULE user32_module = 0;
|
HMODULE user32_module = 0;
|
||||||
|
@ -155,7 +155,7 @@ static void palette_init(void)
|
||||||
*/
|
*/
|
||||||
static void tweak_init(void)
|
static void tweak_init(void)
|
||||||
{
|
{
|
||||||
static const char *OS = "Win3.1";
|
static const char *OS = "Win95";
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
DWORD type, count = sizeof(buffer);
|
DWORD type, count = sizeof(buffer);
|
||||||
|
@ -163,7 +163,7 @@ static void tweak_init(void)
|
||||||
if (RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Tweak.Layout", &hkey ))
|
if (RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Tweak.Layout", &hkey ))
|
||||||
return;
|
return;
|
||||||
if (RegQueryValueExA( hkey, "WineLook", 0, &type, buffer, &count ))
|
if (RegQueryValueExA( hkey, "WineLook", 0, &type, buffer, &count ))
|
||||||
strcpy( buffer, "Win31" ); /* default value */
|
strcpy( buffer, "Win95" ); /* default value */
|
||||||
RegCloseKey( hkey );
|
RegCloseKey( hkey );
|
||||||
|
|
||||||
/* WIN31_LOOK is default */
|
/* WIN31_LOOK is default */
|
||||||
|
|
|
@ -197,7 +197,7 @@ WINE REGISTRY Version 2
|
||||||
"SaveOnlyUpdatedKeys" = "Y"
|
"SaveOnlyUpdatedKeys" = "Y"
|
||||||
|
|
||||||
[Tweak.Layout]
|
[Tweak.Layout]
|
||||||
;; supported styles are 'Win31'(default), 'Win95', 'Win98'
|
;; supported styles are 'Win95'(default), 'Win98'
|
||||||
;; this has *nothing* to do with the windows version Wine returns:
|
;; this has *nothing* to do with the windows version Wine returns:
|
||||||
;; set the "Windows" value in the [Version] section if you want that.
|
;; set the "Windows" value in the [Version] section if you want that.
|
||||||
"WineLook" = "Win95"
|
"WineLook" = "Win95"
|
||||||
|
|
|
@ -31,8 +31,7 @@ extern LONG NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
||||||
extern LONG NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam);
|
extern LONG NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam);
|
||||||
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
extern LONG NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
||||||
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
extern LONG NC_HandleSetCursor( HWND hwnd, WPARAM wParam, LPARAM lParam );
|
||||||
extern void NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down );
|
extern BOOL NC_DrawSysButton( HWND hwnd, HDC hdc, BOOL down );
|
||||||
extern BOOL NC_DrawSysButton95( HWND hwnd, HDC hdc, BOOL down );
|
|
||||||
extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect );
|
extern void NC_GetSysPopupPos( HWND hwnd, RECT* rect );
|
||||||
extern void NC_GetInsideRect( HWND hwnd, RECT *rect );
|
extern void NC_GetInsideRect( HWND hwnd, RECT *rect );
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,6 @@ extern BOOL USER_IsExitingThread( DWORD tid );
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
WIN31_LOOK,
|
|
||||||
WIN95_LOOK,
|
WIN95_LOOK,
|
||||||
WIN98_LOOK
|
WIN98_LOOK
|
||||||
} WINE_LOOK;
|
} WINE_LOOK;
|
||||||
|
|
|
@ -155,38 +155,29 @@ HBRUSH DEFWND_ControlColor( HDC hDC, UINT ctlType )
|
||||||
if( ctlType == CTLCOLOR_SCROLLBAR)
|
if( ctlType == CTLCOLOR_SCROLLBAR)
|
||||||
{
|
{
|
||||||
HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR);
|
HBRUSH hb = GetSysColorBrush(COLOR_SCROLLBAR);
|
||||||
if (TWEAK_WineLook == WIN31_LOOK) {
|
COLORREF bk = GetSysColor(COLOR_3DHILIGHT);
|
||||||
SetTextColor( hDC, RGB(0, 0, 0) );
|
SetTextColor( hDC, GetSysColor(COLOR_3DFACE));
|
||||||
SetBkColor( hDC, RGB(255, 255, 255) );
|
SetBkColor( hDC, bk);
|
||||||
} else {
|
|
||||||
COLORREF bk = GetSysColor(COLOR_3DHILIGHT);
|
/* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT
|
||||||
SetTextColor( hDC, GetSysColor(COLOR_3DFACE));
|
* we better use 0x55aa bitmap brush to make scrollbar's background
|
||||||
SetBkColor( hDC, bk);
|
* look different from the window background.
|
||||||
|
*/
|
||||||
|
if (bk == GetSysColor(COLOR_WINDOW))
|
||||||
|
return CACHE_GetPattern55AABrush();
|
||||||
|
|
||||||
/* if COLOR_WINDOW happens to be the same as COLOR_3DHILIGHT
|
|
||||||
* we better use 0x55aa bitmap brush to make scrollbar's background
|
|
||||||
* look different from the window background.
|
|
||||||
*/
|
|
||||||
if (bk == GetSysColor(COLOR_WINDOW)) {
|
|
||||||
return CACHE_GetPattern55AABrush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UnrealizeObject( hb );
|
UnrealizeObject( hb );
|
||||||
return hb;
|
return hb;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetTextColor( hDC, GetSysColor(COLOR_WINDOWTEXT));
|
SetTextColor( hDC, GetSysColor(COLOR_WINDOWTEXT));
|
||||||
|
|
||||||
if (TWEAK_WineLook > WIN31_LOOK) {
|
if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX))
|
||||||
if ((ctlType == CTLCOLOR_EDIT) || (ctlType == CTLCOLOR_LISTBOX))
|
|
||||||
SetBkColor( hDC, GetSysColor(COLOR_WINDOW) );
|
|
||||||
else {
|
|
||||||
SetBkColor( hDC, GetSysColor(COLOR_3DFACE) );
|
|
||||||
return GetSysColorBrush(COLOR_3DFACE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
SetBkColor( hDC, GetSysColor(COLOR_WINDOW) );
|
SetBkColor( hDC, GetSysColor(COLOR_WINDOW) );
|
||||||
|
else {
|
||||||
|
SetBkColor( hDC, GetSysColor(COLOR_3DFACE) );
|
||||||
|
return GetSysColorBrush(COLOR_3DFACE);
|
||||||
|
}
|
||||||
return GetSysColorBrush(COLOR_WINDOW);
|
return GetSysColorBrush(COLOR_WINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -808,6 +808,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
|
||||||
HBITMAP hSysMenuBitmap = 0;
|
HBITMAP hSysMenuBitmap = 0;
|
||||||
INT nItems;
|
INT nItems;
|
||||||
UINT iId;
|
UINT iId;
|
||||||
|
HICON hIcon;
|
||||||
|
|
||||||
TRACE("frame %p,child %p\n",frame,hChild);
|
TRACE("frame %p,child %p\n",frame,hChild);
|
||||||
|
|
||||||
|
@ -828,18 +829,11 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
|
||||||
AppendMenuA(menu,MF_HELP | MF_BITMAP,
|
AppendMenuA(menu,MF_HELP | MF_BITMAP,
|
||||||
SC_RESTORE, (LPSTR)(DWORD)HBMMENU_MBAR_RESTORE );
|
SC_RESTORE, (LPSTR)(DWORD)HBMMENU_MBAR_RESTORE );
|
||||||
|
|
||||||
/* The close button is only present in Win 95 look */
|
AppendMenuA(menu,MF_HELP | MF_BITMAP,
|
||||||
if(TWEAK_WineLook > WIN31_LOOK)
|
SC_CLOSE, (LPSTR)(DWORD)HBMMENU_MBAR_CLOSE );
|
||||||
{
|
|
||||||
AppendMenuA(menu,MF_HELP | MF_BITMAP,
|
|
||||||
SC_CLOSE, (LPSTR)(DWORD)HBMMENU_MBAR_CLOSE );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* In Win 95 look, the system menu is replaced by the child icon */
|
/* The system menu is replaced by the child icon */
|
||||||
|
hIcon = (HICON)GetClassLongW(hChild, GCL_HICONSM);
|
||||||
if(TWEAK_WineLook > WIN31_LOOK)
|
|
||||||
{
|
|
||||||
HICON hIcon = (HICON)GetClassLongW(hChild, GCL_HICONSM);
|
|
||||||
if (!hIcon)
|
if (!hIcon)
|
||||||
hIcon = (HICON)GetClassLongW(hChild, GCL_HICON);
|
hIcon = (HICON)GetClassLongW(hChild, GCL_HICON);
|
||||||
if (!hIcon)
|
if (!hIcon)
|
||||||
|
@ -869,9 +863,6 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
|
||||||
hSysMenuBitmap = hBitmap;
|
hSysMenuBitmap = hBitmap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
hSysMenuBitmap = hBmpClose;
|
|
||||||
|
|
||||||
if( !InsertMenuA(menu,0,MF_BYPOSITION | MF_BITMAP | MF_POPUP,
|
if( !InsertMenuA(menu,0,MF_BYPOSITION | MF_BITMAP | MF_POPUP,
|
||||||
(UINT_PTR)hSysPopup, (LPSTR)hSysMenuBitmap))
|
(UINT_PTR)hSysPopup, (LPSTR)hSysMenuBitmap))
|
||||||
|
@ -930,11 +921,8 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
|
||||||
DeleteObject(HBITMAP_32(LOWORD(menuInfo.dwTypeData)));
|
DeleteObject(HBITMAP_32(LOWORD(menuInfo.dwTypeData)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(TWEAK_WineLook > WIN31_LOOK)
|
/* close */
|
||||||
{
|
DeleteMenu(menu,GetMenuItemCount(menu) - 1,MF_BYPOSITION);
|
||||||
/* close */
|
|
||||||
DeleteMenu(menu,GetMenuItemCount(menu) - 1,MF_BYPOSITION);
|
|
||||||
}
|
|
||||||
/* restore */
|
/* restore */
|
||||||
DeleteMenu(menu,GetMenuItemCount(menu) - 1,MF_BYPOSITION);
|
DeleteMenu(menu,GetMenuItemCount(menu) - 1,MF_BYPOSITION);
|
||||||
/* minimize */
|
/* minimize */
|
||||||
|
|
|
@ -47,20 +47,19 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
|
||||||
int i, buttons;
|
int i, buttons;
|
||||||
int bspace, bw, bh, theight, tleft, wwidth, wheight, bpos;
|
int bspace, bw, bh, theight, tleft, wwidth, wheight, bpos;
|
||||||
int borheight, borwidth, iheight, ileft, iwidth, twidth, tiheight;
|
int borheight, borwidth, iheight, ileft, iwidth, twidth, tiheight;
|
||||||
|
NONCLIENTMETRICSW nclm;
|
||||||
LPCWSTR lpszText;
|
LPCWSTR lpszText;
|
||||||
WCHAR buf[256];
|
WCHAR buf[256];
|
||||||
|
|
||||||
if (TWEAK_WineLook >= WIN95_LOOK) {
|
nclm.cbSize = sizeof(nclm);
|
||||||
NONCLIENTMETRICSW nclm;
|
SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0);
|
||||||
nclm.cbSize = sizeof(nclm);
|
hFont = CreateFontIndirectW (&nclm.lfMessageFont);
|
||||||
SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0);
|
/* set button font */
|
||||||
hFont = CreateFontIndirectW (&nclm.lfMessageFont);
|
for (i=1; i < 8; i++)
|
||||||
/* set button font */
|
SendDlgItemMessageW (hwnd, i, WM_SETFONT, (WPARAM)hFont, 0);
|
||||||
for (i=1; i < 8; i++)
|
/* set text font */
|
||||||
SendDlgItemMessageW (hwnd, i, WM_SETFONT, (WPARAM)hFont, 0);
|
SendDlgItemMessageW (hwnd, MSGBOX_IDTEXT, WM_SETFONT, (WPARAM)hFont, 0);
|
||||||
/* set text font */
|
|
||||||
SendDlgItemMessageW (hwnd, MSGBOX_IDTEXT, WM_SETFONT, (WPARAM)hFont, 0);
|
|
||||||
}
|
|
||||||
if (HIWORD(lpmb->lpszCaption)) {
|
if (HIWORD(lpmb->lpszCaption)) {
|
||||||
SetWindowTextW(hwnd, lpmb->lpszCaption);
|
SetWindowTextW(hwnd, lpmb->lpszCaption);
|
||||||
} else {
|
} else {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -40,39 +40,6 @@
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(syscolor);
|
WINE_DEFAULT_DEBUG_CHANNEL(syscolor);
|
||||||
|
|
||||||
static const char * const DefSysColors[] =
|
static const char * const DefSysColors[] =
|
||||||
{
|
|
||||||
"Scrollbar", "224 224 224", /* COLOR_SCROLLBAR */
|
|
||||||
"Background", "192 192 192", /* COLOR_BACKGROUND */
|
|
||||||
"ActiveTitle", "0 64 128", /* COLOR_ACTIVECAPTION */
|
|
||||||
"InactiveTitle", "255 255 255", /* COLOR_INACTIVECAPTION */
|
|
||||||
"Menu", "255 255 255", /* COLOR_MENU */
|
|
||||||
"Window", "255 255 255", /* COLOR_WINDOW */
|
|
||||||
"WindowFrame", "0 0 0", /* COLOR_WINDOWFRAME */
|
|
||||||
"MenuText", "0 0 0", /* COLOR_MENUTEXT */
|
|
||||||
"WindowText", "0 0 0", /* COLOR_WINDOWTEXT */
|
|
||||||
"TitleText", "255 255 255", /* COLOR_CAPTIONTEXT */
|
|
||||||
"ActiveBorder", "128 128 128", /* COLOR_ACTIVEBORDER */
|
|
||||||
"InactiveBorder", "255 255 255", /* COLOR_INACTIVEBORDER */
|
|
||||||
"AppWorkspace", "255 255 232", /* COLOR_APPWORKSPACE */
|
|
||||||
"Hilight", "224 224 224", /* COLOR_HIGHLIGHT */
|
|
||||||
"HilightText", "0 0 0", /* COLOR_HIGHLIGHTTEXT */
|
|
||||||
"ButtonFace", "192 192 192", /* COLOR_BTNFACE */
|
|
||||||
"ButtonShadow", "128 128 128", /* COLOR_BTNSHADOW */
|
|
||||||
"GrayText", "192 192 192", /* COLOR_GRAYTEXT */
|
|
||||||
"ButtonText", "0 0 0", /* COLOR_BTNTEXT */
|
|
||||||
"InactiveTitleText", "0 0 0", /* COLOR_INACTIVECAPTIONTEXT */
|
|
||||||
"ButtonHilight", "255 255 255", /* COLOR_BTNHIGHLIGHT */
|
|
||||||
"3DDarkShadow", "32 32 32", /* COLOR_3DDKSHADOW */
|
|
||||||
"3DLight", "192 192 192", /* COLOR_3DLIGHT */
|
|
||||||
"InfoText", "0 0 0", /* COLOR_INFOTEXT */
|
|
||||||
"InfoBackground", "255 255 192", /* COLOR_INFOBK */
|
|
||||||
"AlternateButtonFace", "184 180 184", /* COLOR_ALTERNATEBTNFACE */
|
|
||||||
"HotTrackingColor", "0 0 255", /* COLOR_HOTLIGHT */
|
|
||||||
"GradientActiveTitle", "16 132 208", /* COLOR_GRADIENTACTIVECAPTION */
|
|
||||||
"GradientInactiveTitle", "181 181 181" /* COLOR_GRADIENTINACTIVECAPTION */
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char * const DefSysColors95[] =
|
|
||||||
{
|
{
|
||||||
"Scrollbar", "192 192 192", /* COLOR_SCROLLBAR */
|
"Scrollbar", "192 192 192", /* COLOR_SCROLLBAR */
|
||||||
"Background", "0 128 128", /* COLOR_BACKGROUND */
|
"Background", "0 128 128", /* COLOR_BACKGROUND */
|
||||||
|
@ -174,13 +141,10 @@ static void SYSCOLOR_SetColor( int index, COLORREF color )
|
||||||
void SYSCOLOR_Init(void)
|
void SYSCOLOR_Init(void)
|
||||||
{
|
{
|
||||||
int i, r, g, b;
|
int i, r, g, b;
|
||||||
const char * const *p;
|
|
||||||
char buffer[100];
|
char buffer[100];
|
||||||
BOOL bOk = FALSE, bNoReg = FALSE;
|
BOOL bOk = FALSE, bNoReg = FALSE;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
|
|
||||||
p = (TWEAK_WineLook == WIN31_LOOK) ? DefSysColors : DefSysColors95;
|
|
||||||
|
|
||||||
/* first, try to read the values from the registry */
|
/* first, try to read the values from the registry */
|
||||||
if (RegCreateKeyExA(HKEY_CURRENT_USER, "Control Panel\\Colors", 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0))
|
if (RegCreateKeyExA(HKEY_CURRENT_USER, "Control Panel\\Colors", 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0))
|
||||||
bNoReg = TRUE;
|
bNoReg = TRUE;
|
||||||
|
@ -191,21 +155,21 @@ void SYSCOLOR_Init(void)
|
||||||
if (!bNoReg)
|
if (!bNoReg)
|
||||||
{
|
{
|
||||||
DWORD dwDataSize = sizeof(buffer);
|
DWORD dwDataSize = sizeof(buffer);
|
||||||
if (!(RegQueryValueExA(hKey,(LPSTR)p[i*2], 0, 0, buffer, &dwDataSize)))
|
if (!(RegQueryValueExA(hKey,(LPSTR)DefSysColors[i*2], 0, 0, buffer, &dwDataSize)))
|
||||||
if (sscanf( buffer, "%d %d %d", &r, &g, &b ) == 3)
|
if (sscanf( buffer, "%d %d %d", &r, &g, &b ) == 3)
|
||||||
bOk = TRUE;
|
bOk = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* second try, win.ini */
|
/* second try, win.ini */
|
||||||
if (!bOk)
|
if (!bOk)
|
||||||
{ GetProfileStringA( "colors", p[i*2], p[i*2+1], buffer, 100 );
|
{ GetProfileStringA( "colors", DefSysColors[i*2], DefSysColors[i*2+1], buffer, 100 );
|
||||||
if (sscanf( buffer, " %d %d %d", &r, &g, &b ) == 3)
|
if (sscanf( buffer, " %d %d %d", &r, &g, &b ) == 3)
|
||||||
bOk = TRUE;
|
bOk = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* last chance, take the default */
|
/* last chance, take the default */
|
||||||
if (!bOk)
|
if (!bOk)
|
||||||
{ int iNumColors = sscanf( p[i*2+1], " %d %d %d", &r, &g, &b );
|
{ int iNumColors = sscanf( DefSysColors[i*2+1], " %d %d %d", &r, &g, &b );
|
||||||
assert (iNumColors==3);
|
assert (iNumColors==3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -109,9 +109,6 @@ static int SYSMETRICS_GetRegistryMetric (
|
||||||
* SM_CYFULLSCREEN x-1 x
|
* SM_CYFULLSCREEN x-1 x
|
||||||
* SM_CXFRAME Fixed July 6, 2001 - Bill Medland
|
* SM_CXFRAME Fixed July 6, 2001 - Bill Medland
|
||||||
*
|
*
|
||||||
* (collides with TWEAK_WineLook sometimes,
|
|
||||||
* so changing anything might be difficult)
|
|
||||||
*
|
|
||||||
* Starting at Win95 there are now a large number or Registry entries in the
|
* Starting at Win95 there are now a large number or Registry entries in the
|
||||||
* [WindowMetrics] section that are probably relevant here.
|
* [WindowMetrics] section that are probably relevant here.
|
||||||
*/
|
*/
|
||||||
|
@ -126,36 +123,22 @@ void SYSMETRICS_Init(void)
|
||||||
if (RegOpenKeyExA (HKEY_CURRENT_USER, "Control Panel\\desktop\\WindowMetrics",
|
if (RegOpenKeyExA (HKEY_CURRENT_USER, "Control Panel\\desktop\\WindowMetrics",
|
||||||
0, KEY_QUERY_VALUE, &hkey) != ERROR_SUCCESS) hkey = 0;
|
0, KEY_QUERY_VALUE, &hkey) != ERROR_SUCCESS) hkey = 0;
|
||||||
|
|
||||||
if (TWEAK_WineLook > WIN31_LOOK)
|
sysMetrics[SM_CXVSCROLL] = SYSMETRICS_GetRegistryMetric( hkey, "ScrollWidth", 16 );
|
||||||
{
|
sysMetrics[SM_CYHSCROLL] = sysMetrics[SM_CXVSCROLL];
|
||||||
sysMetrics[SM_CXVSCROLL] = SYSMETRICS_GetRegistryMetric( hkey, "ScrollWidth", 16 );
|
|
||||||
sysMetrics[SM_CYHSCROLL] = sysMetrics[SM_CXVSCROLL];
|
|
||||||
|
|
||||||
/* The Win 2000 resource kit SAYS that this is governed by the ScrollHeight
|
/* The Win 2000 resource kit SAYS that this is governed by the ScrollHeight
|
||||||
* but on my computer that controls the CYV/CXH values. */
|
* but on my computer that controls the CYV/CXH values. */
|
||||||
sysMetrics[SM_CYCAPTION] = SYSMETRICS_GetRegistryMetric(hkey, "CaptionHeight", 18)
|
sysMetrics[SM_CYCAPTION] = SYSMETRICS_GetRegistryMetric(hkey, "CaptionHeight", 18)
|
||||||
+ 1; /* for the separator? */
|
+ 1; /* for the separator? */
|
||||||
|
|
||||||
sysMetrics[SM_CYMENU] = SYSMETRICS_GetRegistryMetric (hkey, "MenuHeight", 18) + 1;
|
sysMetrics[SM_CYMENU] = SYSMETRICS_GetRegistryMetric (hkey, "MenuHeight", 18) + 1;
|
||||||
|
|
||||||
|
|
||||||
sysMetrics[SM_CXDLGFRAME] = 3;
|
sysMetrics[SM_CXDLGFRAME] = 3;
|
||||||
sysMetrics[SM_CYDLGFRAME] = sysMetrics[SM_CXDLGFRAME];
|
sysMetrics[SM_CYDLGFRAME] = sysMetrics[SM_CXDLGFRAME];
|
||||||
|
|
||||||
/* force setting of SM_CXFRAME/SM_CYFRAME */
|
/* force setting of SM_CXFRAME/SM_CYFRAME */
|
||||||
SystemParametersInfoA( SPI_GETBORDER, 0, &dummy, 0 );
|
SystemParametersInfoA( SPI_GETBORDER, 0, &dummy, 0 );
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sysMetrics[SM_CXVSCROLL] = 17;
|
|
||||||
sysMetrics[SM_CYHSCROLL] = sysMetrics[SM_CXVSCROLL];
|
|
||||||
sysMetrics[SM_CYCAPTION] = 20;
|
|
||||||
sysMetrics[SM_CYMENU] = 18;
|
|
||||||
sysMetrics[SM_CXDLGFRAME] = 4;
|
|
||||||
sysMetrics[SM_CYDLGFRAME] = sysMetrics[SM_CXDLGFRAME];
|
|
||||||
sysMetrics[SM_CXFRAME] = GetProfileIntA("Windows", "BorderWidth", 4) + 1;
|
|
||||||
sysMetrics[SM_CYFRAME] = sysMetrics[SM_CXFRAME];
|
|
||||||
}
|
|
||||||
|
|
||||||
sysMetrics[SM_CXCURSOR] = 32;
|
sysMetrics[SM_CXCURSOR] = 32;
|
||||||
sysMetrics[SM_CYCURSOR] = 32;
|
sysMetrics[SM_CYCURSOR] = 32;
|
||||||
|
@ -180,8 +163,8 @@ void SYSMETRICS_Init(void)
|
||||||
sysMetrics[SM_RESERVED4] = 0;
|
sysMetrics[SM_RESERVED4] = 0;
|
||||||
|
|
||||||
/* FIXME: The following two are calculated, but how? */
|
/* FIXME: The following two are calculated, but how? */
|
||||||
sysMetrics[SM_CXMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 112 : 100;
|
sysMetrics[SM_CXMIN] = 112;
|
||||||
sysMetrics[SM_CYMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 27 : 28;
|
sysMetrics[SM_CYMIN] = 27;
|
||||||
|
|
||||||
sysMetrics[SM_CXSIZE] = sysMetrics[SM_CYCAPTION] - 1;
|
sysMetrics[SM_CXSIZE] = sysMetrics[SM_CYCAPTION] - 1;
|
||||||
sysMetrics[SM_CYSIZE] = sysMetrics[SM_CXSIZE];
|
sysMetrics[SM_CYSIZE] = sysMetrics[SM_CXSIZE];
|
||||||
|
|
|
@ -720,11 +720,8 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
|
||||||
border = SYSPARAMS_Twips2Pixels( atoiW(buf) );
|
border = SYSPARAMS_Twips2Pixels( atoiW(buf) );
|
||||||
|
|
||||||
spi_loaded[spi_idx] = TRUE;
|
spi_loaded[spi_idx] = TRUE;
|
||||||
if (TWEAK_WineLook > WIN31_LOOK)
|
SYSMETRICS_Set( SM_CXFRAME, border + GetSystemMetrics( SM_CXDLGFRAME ) );
|
||||||
{
|
SYSMETRICS_Set( SM_CYFRAME, border + GetSystemMetrics( SM_CXDLGFRAME ) );
|
||||||
SYSMETRICS_Set( SM_CXFRAME, border + GetSystemMetrics( SM_CXDLGFRAME ) );
|
|
||||||
SYSMETRICS_Set( SM_CYFRAME, border + GetSystemMetrics( SM_CXDLGFRAME ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
*(INT *)pvParam = border;
|
*(INT *)pvParam = border;
|
||||||
break;
|
break;
|
||||||
|
@ -743,11 +740,8 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
|
||||||
{
|
{
|
||||||
border = uiParam;
|
border = uiParam;
|
||||||
spi_loaded[spi_idx] = TRUE;
|
spi_loaded[spi_idx] = TRUE;
|
||||||
if (TWEAK_WineLook > WIN31_LOOK)
|
SYSMETRICS_Set( SM_CXFRAME, uiParam + GetSystemMetrics( SM_CXDLGFRAME ) );
|
||||||
{
|
SYSMETRICS_Set( SM_CYFRAME, uiParam + GetSystemMetrics( SM_CXDLGFRAME ) );
|
||||||
SYSMETRICS_Set( SM_CXFRAME, uiParam + GetSystemMetrics( SM_CXDLGFRAME ) );
|
|
||||||
SYSMETRICS_Set( SM_CYFRAME, uiParam + GetSystemMetrics( SM_CXDLGFRAME ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1309,11 +1303,10 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
|
||||||
|
|
||||||
/* menu font metrics */
|
/* menu font metrics */
|
||||||
SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfMenuFont), 0 );
|
SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfMenuFont), 0 );
|
||||||
GetProfileStringW( Desktop, MenuFont,
|
GetProfileStringW( Desktop, MenuFont, lpnm->lfCaptionFont.lfFaceName,
|
||||||
(TWEAK_WineLook > WIN31_LOOK) ? lpnm->lfCaptionFont.lfFaceName : System,
|
|
||||||
lpnm->lfMenuFont.lfFaceName, LF_FACESIZE );
|
lpnm->lfMenuFont.lfFaceName, LF_FACESIZE );
|
||||||
lpnm->lfMenuFont.lfHeight = -GetProfileIntW( Desktop, MenuFontSize, 11 );
|
lpnm->lfMenuFont.lfHeight = -GetProfileIntW( Desktop, MenuFontSize, 11 );
|
||||||
lpnm->lfMenuFont.lfWeight = (TWEAK_WineLook > WIN31_LOOK) ? FW_NORMAL : FW_BOLD;
|
lpnm->lfMenuFont.lfWeight = FW_NORMAL;
|
||||||
|
|
||||||
/* status bar font metrics */
|
/* status bar font metrics */
|
||||||
SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
|
SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
|
||||||
|
|
Loading…
Reference in a new issue