DrawButtonFrame was a bit wrong because it was ignoring COLOR_3DLIGHT;
fixed now. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -338,10 +338,11 @@ bool wxButton::SetForegroundColour(const wxColour &colour)
|
|||||||
The button frame looks like this normally:
|
The button frame looks like this normally:
|
||||||
|
|
||||||
WWWWWWWWWWWWWWWWWWB
|
WWWWWWWWWWWWWWWWWWB
|
||||||
W GB
|
WHHHHHHHHHHHHHHHHGB W = white (HILIGHT)
|
||||||
W GB
|
WH GB H = light grey (LIGHT)
|
||||||
W GB where W, G, B are white, grey and black pixels
|
WH GB G = dark grey (SHADOW)
|
||||||
W GB
|
WH GB B = black (DKSHADOW)
|
||||||
|
WH GB
|
||||||
WGGGGGGGGGGGGGGGGGB
|
WGGGGGGGGGGGGGGGGGB
|
||||||
BBBBBBBBBBBBBBBBBBB
|
BBBBBBBBBBBBBBBBBBB
|
||||||
|
|
||||||
@@ -350,8 +351,9 @@ bool wxButton::SetForegroundColour(const wxColour &colour)
|
|||||||
|
|
||||||
BBBBBBBBBBBBBBBBBBB
|
BBBBBBBBBBBBBBBBBBB
|
||||||
BWWWWWWWWWWWWWWWWBB
|
BWWWWWWWWWWWWWWWWBB
|
||||||
BW GBB
|
BWHHHHHHHHHHHHHHGBB
|
||||||
BW GBB
|
BWH GBB
|
||||||
|
BWH GBB
|
||||||
BWGGGGGGGGGGGGGGGBB
|
BWGGGGGGGGGGGGGGGBB
|
||||||
BBBBBBBBBBBBBBBBBBB
|
BBBBBBBBBBBBBBBBBBB
|
||||||
BBBBBBBBBBBBBBBBBBB
|
BBBBBBBBBBBBBBBBBBB
|
||||||
@@ -363,6 +365,7 @@ bool wxButton::SetForegroundColour(const wxColour &colour)
|
|||||||
BG GB
|
BG GB
|
||||||
BG GB
|
BG GB
|
||||||
BG GB
|
BG GB
|
||||||
|
BG GB
|
||||||
BGGGGGGGGGGGGGGGGGB
|
BGGGGGGGGGGGGGGGGGB
|
||||||
BBBBBBBBBBBBBBBBBBB
|
BBBBBBBBBBBBBBBBBBB
|
||||||
*/
|
*/
|
||||||
@@ -373,9 +376,10 @@ static void DrawButtonFrame(HDC hdc, const RECT& rectBtn,
|
|||||||
RECT r;
|
RECT r;
|
||||||
CopyRect(&r, &rectBtn);
|
CopyRect(&r, &rectBtn);
|
||||||
|
|
||||||
HPEN hpenBlack = CreatePen(PS_SOLID, 1, GetSysColor(COLOR_3DDKSHADOW)),
|
HPEN hpenBlack = CreatePen(PS_SOLID, 1, GetSysColor(COLOR_3DDKSHADOW)),
|
||||||
hpenGrey = CreatePen(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW)),
|
hpenGrey = CreatePen(PS_SOLID, 1, GetSysColor(COLOR_3DSHADOW)),
|
||||||
hpenWhite = CreatePen(PS_SOLID, 1, GetSysColor(COLOR_3DHILIGHT));
|
hpenLightGr = CreatePen(PS_SOLID, 1, GetSysColor(COLOR_3DLIGHT)),
|
||||||
|
hpenWhite = CreatePen(PS_SOLID, 1, GetSysColor(COLOR_3DHILIGHT));
|
||||||
|
|
||||||
HPEN hpenOld = (HPEN)SelectObject(hdc, hpenBlack);
|
HPEN hpenOld = (HPEN)SelectObject(hdc, hpenBlack);
|
||||||
|
|
||||||
@@ -409,6 +413,11 @@ static void DrawButtonFrame(HDC hdc, const RECT& rectBtn,
|
|||||||
LineTo(hdc, r.left, r.top);
|
LineTo(hdc, r.left, r.top);
|
||||||
LineTo(hdc, r.right, r.top);
|
LineTo(hdc, r.right, r.top);
|
||||||
|
|
||||||
|
(void)SelectObject(hdc, hpenLightGr);
|
||||||
|
MoveToEx(hdc, r.left + 1, r.bottom - 2, NULL);
|
||||||
|
LineTo(hdc, r.left + 1, r.top + 1);
|
||||||
|
LineTo(hdc, r.right - 1, r.top + 1);
|
||||||
|
|
||||||
(void)SelectObject(hdc, hpenGrey);
|
(void)SelectObject(hdc, hpenGrey);
|
||||||
MoveToEx(hdc, r.left + 1, r.bottom - 1, NULL);
|
MoveToEx(hdc, r.left + 1, r.bottom - 1, NULL);
|
||||||
LineTo(hdc, r.right - 1, r.bottom - 1);
|
LineTo(hdc, r.right - 1, r.bottom - 1);
|
||||||
@@ -417,6 +426,7 @@ static void DrawButtonFrame(HDC hdc, const RECT& rectBtn,
|
|||||||
|
|
||||||
(void)SelectObject(hdc, hpenOld);
|
(void)SelectObject(hdc, hpenOld);
|
||||||
DeleteObject(hpenWhite);
|
DeleteObject(hpenWhite);
|
||||||
|
DeleteObject(hpenLightGr);
|
||||||
DeleteObject(hpenGrey);
|
DeleteObject(hpenGrey);
|
||||||
DeleteObject(hpenBlack);
|
DeleteObject(hpenBlack);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user