Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f3596020
Commit
f3596020
authored
Mar 02, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Correctly report systemcolor use for Treeview background.
parent
114da7c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
treeview.c
dlls/comctl32/tests/treeview.c
+3
-5
treeview.c
dlls/comctl32/treeview.c
+12
-6
No files found.
dlls/comctl32/tests/treeview.c
View file @
f3596020
...
...
@@ -427,11 +427,9 @@ static void TestGetSetBkColor(void)
{
COLORREF
crColor
=
RGB
(
0
,
0
,
0
);
todo_wine
{
/* If the value is -1, the control is using the system color for the background color. */
crColor
=
(
COLORREF
)
SendMessage
(
hTree
,
TVM_GETBKCOLOR
,
0
,
0
);
ok
(
crColor
==
-
1
,
"Default background color reported as 0x%.8x
\n
"
,
crColor
);
}
/* If the value is -1, the control is using the system color for the background color. */
crColor
=
(
COLORREF
)
SendMessage
(
hTree
,
TVM_GETBKCOLOR
,
0
,
0
);
ok
(
crColor
==
-
1
,
"Default background color reported as 0x%.8x
\n
"
,
crColor
);
/* Test for black background */
SendMessage
(
hTree
,
TVM_SETBKCOLOR
,
0
,
(
LPARAM
)
RGB
(
0
,
0
,
0
)
);
...
...
dlls/comctl32/treeview.c
View file @
f3596020
...
...
@@ -2306,11 +2306,13 @@ TREEVIEW_DrawItemLines(const TREEVIEW_INFO *infoPtr, HDC hdc, const TREEVIEW_ITE
&
(
TVS_LINESATROOT
|
TVS_HASLINES
|
TVS_HASBUTTONS
))
>
TVS_LINESATROOT
);
HBRUSH
hbr
,
hbrOld
;
COLORREF
clrBk
=
infoPtr
->
clrBk
==
-
1
?
GetSysColor
(
COLOR_WINDOW
)
:
infoPtr
->
clrBk
;
if
(
!
lar
&&
item
->
iLevel
==
0
)
return
;
hbr
=
CreateSolidBrush
(
infoPtr
->
clrBk
);
hbr
=
CreateSolidBrush
(
clrBk
);
hbrOld
=
SelectObject
(
hdc
,
hbr
);
centerx
=
(
item
->
linesOffset
+
item
->
stateOffset
)
/
2
;
...
...
@@ -2423,8 +2425,8 @@ TREEVIEW_DrawItemLines(const TREEVIEW_INFO *infoPtr, HDC hdc, const TREEVIEW_ITE
{
Rectangle
(
hdc
,
centerx
-
1
,
centery
-
plussize
+
1
,
centerx
+
2
,
centery
+
plussize
);
SetPixel
(
hdc
,
centerx
-
1
,
centery
,
infoPtr
->
clrBk
);
SetPixel
(
hdc
,
centerx
+
1
,
centery
,
infoPtr
->
clrBk
);
SetPixel
(
hdc
,
centerx
-
1
,
centery
,
clrBk
);
SetPixel
(
hdc
,
centerx
+
1
,
centery
,
clrBk
);
}
}
}
...
...
@@ -2472,7 +2474,8 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *wineItem
}
else
{
nmcdhdr
.
clrTextBk
=
infoPtr
->
clrBk
;
nmcdhdr
.
clrTextBk
=
infoPtr
->
clrBk
==
-
1
?
GetSysColor
(
COLOR_WINDOW
)
:
infoPtr
->
clrBk
;
if
((
infoPtr
->
dwStyle
&
TVS_TRACKSELECT
)
&&
(
wineItem
==
infoPtr
->
hotItem
))
nmcdhdr
.
clrText
=
comctl32_color
.
clrHighlight
;
else
if
(
infoPtr
->
clrText
==
-
1
)
...
...
@@ -2782,9 +2785,12 @@ TREEVIEW_UpdateScrollBars(TREEVIEW_INFO *infoPtr)
static
LRESULT
TREEVIEW_EraseBackground
(
const
TREEVIEW_INFO
*
infoPtr
,
HDC
hDC
)
{
HBRUSH
hBrush
=
CreateSolidBrush
(
infoPtr
->
clrBk
);
HBRUSH
hBrush
;
COLORREF
clrBk
=
infoPtr
->
clrBk
==
-
1
?
GetSysColor
(
COLOR_WINDOW
)
:
infoPtr
->
clrBk
;
RECT
rect
;
hBrush
=
CreateSolidBrush
(
clrBk
);
GetClientRect
(
infoPtr
->
hwnd
,
&
rect
);
FillRect
(
hDC
,
&
rect
,
hBrush
);
DeleteObject
(
hBrush
);
...
...
@@ -4937,7 +4943,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr
->
scrollX
=
0
;
infoPtr
->
clrBk
=
GetSysColor
(
COLOR_WINDOW
);
infoPtr
->
clrBk
=
-
1
;
/* use system color */
infoPtr
->
clrText
=
-
1
;
/* use system color */
infoPtr
->
clrLine
=
RGB
(
128
,
128
,
128
);
infoPtr
->
clrInsertMark
=
GetSysColor
(
COLOR_BTNTEXT
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment