Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d93aab9c
Commit
d93aab9c
authored
May 17, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/treeview: Use cached colors instead of GetSysColor in TreeView.
parent
27f3a6d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
treeview.c
dlls/comctl32/treeview.c
+13
-11
No files found.
dlls/comctl32/treeview.c
View file @
d93aab9c
...
@@ -2306,7 +2306,7 @@ TREEVIEW_DrawItemLines(const TREEVIEW_INFO *infoPtr, HDC hdc, const TREEVIEW_ITE
...
@@ -2306,7 +2306,7 @@ TREEVIEW_DrawItemLines(const TREEVIEW_INFO *infoPtr, HDC hdc, const TREEVIEW_ITE
&
(
TVS_LINESATROOT
|
TVS_HASLINES
|
TVS_HASBUTTONS
))
&
(
TVS_LINESATROOT
|
TVS_HASLINES
|
TVS_HASBUTTONS
))
>
TVS_LINESATROOT
);
>
TVS_LINESATROOT
);
HBRUSH
hbr
,
hbrOld
;
HBRUSH
hbr
,
hbrOld
;
COLORREF
clrBk
=
infoPtr
->
clrBk
==
-
1
?
GetSysColor
(
COLOR_WINDOW
)
:
COLORREF
clrBk
=
infoPtr
->
clrBk
==
-
1
?
comctl32_color
.
clrWindow
:
infoPtr
->
clrBk
;
infoPtr
->
clrBk
;
if
(
!
lar
&&
item
->
iLevel
==
0
)
if
(
!
lar
&&
item
->
iLevel
==
0
)
...
@@ -2460,26 +2460,26 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *wineItem
...
@@ -2460,26 +2460,26 @@ TREEVIEW_DrawItem(const TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *wineItem
{
{
if
((
wineItem
->
state
&
TVIS_DROPHILITED
)
||
inFocus
)
if
((
wineItem
->
state
&
TVIS_DROPHILITED
)
||
inFocus
)
{
{
nmcdhdr
.
clrTextBk
=
GetSysColor
(
COLOR_HIGHLIGHT
)
;
nmcdhdr
.
clrTextBk
=
comctl32_color
.
clrHighlight
;
nmcdhdr
.
clrText
=
GetSysColor
(
COLOR_HIGHLIGHTTEXT
)
;
nmcdhdr
.
clrText
=
comctl32_color
.
clrHighlightText
;
}
}
else
else
{
{
nmcdhdr
.
clrTextBk
=
GetSysColor
(
COLOR_BTNFACE
)
;
nmcdhdr
.
clrTextBk
=
comctl32_color
.
clrBtnFace
;
if
(
infoPtr
->
clrText
==
-
1
)
if
(
infoPtr
->
clrText
==
-
1
)
nmcdhdr
.
clrText
=
GetSysColor
(
COLOR_WINDOWTEXT
)
;
nmcdhdr
.
clrText
=
comctl32_color
.
clrWindowText
;
else
else
nmcdhdr
.
clrText
=
infoPtr
->
clrText
;
nmcdhdr
.
clrText
=
infoPtr
->
clrText
;
}
}
}
}
else
else
{
{
nmcdhdr
.
clrTextBk
=
infoPtr
->
clrBk
==
-
1
?
GetSysColor
(
COLOR_WINDOW
)
:
nmcdhdr
.
clrTextBk
=
infoPtr
->
clrBk
==
-
1
?
comctl32_color
.
clrWindow
:
infoPtr
->
clrBk
;
infoPtr
->
clrBk
;
if
((
infoPtr
->
dwStyle
&
TVS_TRACKSELECT
)
&&
(
wineItem
==
infoPtr
->
hotItem
))
if
((
infoPtr
->
dwStyle
&
TVS_TRACKSELECT
)
&&
(
wineItem
==
infoPtr
->
hotItem
))
nmcdhdr
.
clrText
=
comctl32_color
.
clrHighlight
;
nmcdhdr
.
clrText
=
comctl32_color
.
clrHighlight
;
else
if
(
infoPtr
->
clrText
==
-
1
)
else
if
(
infoPtr
->
clrText
==
-
1
)
nmcdhdr
.
clrText
=
GetSysColor
(
COLOR_WINDOWTEXT
)
;
nmcdhdr
.
clrText
=
comctl32_color
.
clrWindowText
;
else
else
nmcdhdr
.
clrText
=
infoPtr
->
clrText
;
nmcdhdr
.
clrText
=
infoPtr
->
clrText
;
}
}
...
@@ -2786,7 +2786,7 @@ static LRESULT
...
@@ -2786,7 +2786,7 @@ static LRESULT
TREEVIEW_EraseBackground
(
const
TREEVIEW_INFO
*
infoPtr
,
HDC
hDC
)
TREEVIEW_EraseBackground
(
const
TREEVIEW_INFO
*
infoPtr
,
HDC
hDC
)
{
{
HBRUSH
hBrush
;
HBRUSH
hBrush
;
COLORREF
clrBk
=
infoPtr
->
clrBk
==
-
1
?
GetSysColor
(
COLOR_WINDOW
)
:
COLORREF
clrBk
=
infoPtr
->
clrBk
==
-
1
?
comctl32_color
.
clrWindow
:
infoPtr
->
clrBk
;
infoPtr
->
clrBk
;
RECT
rect
;
RECT
rect
;
...
@@ -4885,7 +4885,7 @@ initialize_checkboxes(TREEVIEW_INFO *infoPtr)
...
@@ -4885,7 +4885,7 @@ initialize_checkboxes(TREEVIEW_INFO *infoPtr)
SelectObject
(
hdc
,
hbmOld
);
SelectObject
(
hdc
,
hbmOld
);
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlState
,
hbm
,
nIndex
=
ImageList_AddMasked
(
infoPtr
->
himlState
,
hbm
,
GetSysColor
(
COLOR_WINDOW
)
);
comctl32_color
.
clrWindow
);
TRACE
(
"checkbox index %d
\n
"
,
nIndex
);
TRACE
(
"checkbox index %d
\n
"
,
nIndex
);
DeleteObject
(
hbm
);
DeleteObject
(
hbm
);
...
@@ -4949,7 +4949,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
...
@@ -4949,7 +4949,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
infoPtr
->
clrBk
=
-
1
;
/* use system color */
infoPtr
->
clrBk
=
-
1
;
/* use system color */
infoPtr
->
clrText
=
-
1
;
/* use system color */
infoPtr
->
clrText
=
-
1
;
/* use system color */
infoPtr
->
clrLine
=
RGB
(
128
,
128
,
128
);
infoPtr
->
clrLine
=
RGB
(
128
,
128
,
128
);
infoPtr
->
clrInsertMark
=
GetSysColor
(
COLOR_BTNTEXT
)
;
infoPtr
->
clrInsertMark
=
comctl32_color
.
clrBtnText
;
/* hwndToolTip */
/* hwndToolTip */
...
@@ -5705,7 +5705,9 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -5705,7 +5705,9 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_STYLECHANGED
:
case
WM_STYLECHANGED
:
return
TREEVIEW_StyleChanged
(
infoPtr
,
wParam
,
lParam
);
return
TREEVIEW_StyleChanged
(
infoPtr
,
wParam
,
lParam
);
/* WM_SYSCOLORCHANGE */
case
WM_SYSCOLORCHANGE
:
COMCTL32_RefreshSysColors
();
return
0
;
/* WM_SYSKEYDOWN */
/* WM_SYSKEYDOWN */
...
...
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