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
b98b7dd6
Commit
b98b7dd6
authored
Nov 10, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Nov 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Set cache bitmap dimensions correctly when a 0x0 image list is used.
- Optimize WM_STYLECHANGED handler to only redraw when a CCS_* style is changed, like native.
parent
5f06380b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
19 deletions
+30
-19
toolbar.c
dlls/comctl32/toolbar.c
+30
-19
No files found.
dlls/comctl32/toolbar.c
View file @
b98b7dd6
...
@@ -160,7 +160,7 @@ typedef struct
...
@@ -160,7 +160,7 @@ typedef struct
BOOL
bAnchor
;
/* anchor highlight enabled */
BOOL
bAnchor
;
/* anchor highlight enabled */
BOOL
bDoRedraw
;
/* Redraw status */
BOOL
bDoRedraw
;
/* Redraw status */
BOOL
bDragOutSent
;
/* has TBN_DRAGOUT notification been sent for this drag? */
BOOL
bDragOutSent
;
/* has TBN_DRAGOUT notification been sent for this drag? */
BOOL
bUnicode
;
/* ASCII (FALSE) or Unicode (TRUE)? */
BOOL
bUnicode
;
/*
Notifications are
ASCII (FALSE) or Unicode (TRUE)? */
BOOL
bCaptured
;
/* mouse captured? */
BOOL
bCaptured
;
/* mouse captured? */
DWORD
dwStyle
;
/* regular toolbar style */
DWORD
dwStyle
;
/* regular toolbar style */
DWORD
dwExStyle
;
/* extended toolbar style */
DWORD
dwExStyle
;
/* extended toolbar style */
...
@@ -234,6 +234,10 @@ static inline int TOOLBAR_GetListTextOffset(TOOLBAR_INFO *infoPtr, INT iListGap)
...
@@ -234,6 +234,10 @@ static inline int TOOLBAR_GetListTextOffset(TOOLBAR_INFO *infoPtr, INT iListGap)
TBSTYLE_EX_MIXEDBUTTONS | \
TBSTYLE_EX_MIXEDBUTTONS | \
TBSTYLE_EX_HIDECLIPPEDBUTTONS)
TBSTYLE_EX_HIDECLIPPEDBUTTONS)
/* all of the CCS_ styles */
#define COMMON_STYLES (CCS_TOP|CCS_NOMOVEY|CCS_BOTTOM|CCS_NORESIZE| \
CCS_NOPARENTALIGN|CCS_ADJUSTABLE|CCS_NODIVIDER|CCS_VERT)
#define GETIBITMAP(infoPtr, i) (infoPtr->iVersion >= 5 ? LOWORD(i) : i)
#define GETIBITMAP(infoPtr, i) (infoPtr->iVersion >= 5 ? LOWORD(i) : i)
#define GETHIMLID(infoPtr, i) (infoPtr->iVersion >= 5 ? HIWORD(i) : 0)
#define GETHIMLID(infoPtr, i) (infoPtr->iVersion >= 5 ? HIWORD(i) : 0)
#define GETDEFIMAGELIST(infoPtr, id) TOOLBAR_GetImageList(infoPtr->himlDef, infoPtr->cimlDef, id)
#define GETDEFIMAGELIST(infoPtr, id) TOOLBAR_GetImageList(infoPtr->himlDef, infoPtr->cimlDef, id)
...
@@ -4971,10 +4975,15 @@ TOOLBAR_SetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -4971,10 +4975,15 @@ TOOLBAR_SetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
for
(
i
=
0
;
i
<
infoPtr
->
cimlDef
;
i
++
)
for
(
i
=
0
;
i
<
infoPtr
->
cimlDef
;
i
++
)
infoPtr
->
nNumBitmaps
+=
ImageList_GetImageCount
(
infoPtr
->
himlDef
[
i
]
->
himl
);
infoPtr
->
nNumBitmaps
+=
ImageList_GetImageCount
(
infoPtr
->
himlDef
[
i
]
->
himl
);
ImageList_GetIconSize
(
himl
,
&
infoPtr
->
nBitmapWidth
,
if
(
!
ImageList_GetIconSize
(
himl
,
&
infoPtr
->
nBitmapWidth
,
&
infoPtr
->
nBitmapHeight
);
&
infoPtr
->
nBitmapHeight
))
TRACE
(
"hwnd %p, new himl=%08x, count=%d, bitmap w=%d, h=%d
\n
"
,
{
hwnd
,
(
INT
)
infoPtr
->
himlDef
,
infoPtr
->
nNumBitmaps
,
infoPtr
->
nBitmapWidth
=
0
;
infoPtr
->
nBitmapHeight
=
0
;
}
TRACE
(
"hwnd %p, new himl=%p, id = %d, count=%d, bitmap w=%d, h=%d
\n
"
,
hwnd
,
infoPtr
->
himlDef
,
id
,
infoPtr
->
nNumBitmaps
,
infoPtr
->
nBitmapWidth
,
infoPtr
->
nBitmapHeight
);
infoPtr
->
nBitmapWidth
,
infoPtr
->
nBitmapHeight
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
...
@@ -6653,28 +6662,30 @@ TOOLBAR_StyleChanged (HWND hwnd, INT nType, LPSTYLESTRUCT lpStyle)
...
@@ -6653,28 +6662,30 @@ TOOLBAR_StyleChanged (HWND hwnd, INT nType, LPSTYLESTRUCT lpStyle)
{
{
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
TOOLBAR_INFO
*
infoPtr
=
TOOLBAR_GetInfoPtr
(
hwnd
);
if
(
nType
==
GWL_STYLE
)
{
if
(
nType
==
GWL_STYLE
)
if
(
lpStyle
->
styleNew
&
TBSTYLE_LIST
)
{
{
infoPtr
->
dwDTFlags
=
DT_LEFT
|
DT_VCENTER
|
DT_SINGLELINE
|
DT_END_ELLIPSIS
;
if
(
lpStyle
->
styleNew
&
TBSTYLE_LIST
)
}
infoPtr
->
dwDTFlags
=
DT_LEFT
|
DT_VCENTER
|
DT_SINGLELINE
|
DT_END_ELLIPSIS
;
else
{
else
infoPtr
->
dwDTFlags
=
DT_CENTER
|
DT_END_ELLIPSIS
;
infoPtr
->
dwDTFlags
=
DT_CENTER
|
DT_END_ELLIPSIS
;
}
infoPtr
->
bBtnTranspnt
=
(
lpStyle
->
styleNew
&
infoPtr
->
bBtnTranspnt
=
(
lpStyle
->
styleNew
&
(
TBSTYLE_FLAT
|
TBSTYLE_LIST
));
(
TBSTYLE_FLAT
|
TBSTYLE_LIST
));
TOOLBAR_CheckStyle
(
hwnd
,
lpStyle
->
styleNew
);
TOOLBAR_CheckStyle
(
hwnd
,
lpStyle
->
styleNew
);
TRACE
(
"new style 0x%08lx
\n
"
,
lpStyle
->
styleNew
);
TRACE
(
"new style 0x%08lx
\n
"
,
lpStyle
->
styleNew
);
/* only resize if one of the CCS_* styles was changed */
if
((
infoPtr
->
dwStyle
^
lpStyle
->
styleNew
)
&
COMMON_STYLES
)
{
TOOLBAR_AutoSize
(
hwnd
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
}
infoPtr
->
dwStyle
=
lpStyle
->
styleNew
;
infoPtr
->
dwStyle
=
lpStyle
->
styleNew
;
}
}
TOOLBAR_CalcToolbar
(
hwnd
);
TOOLBAR_AutoSize
(
hwnd
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
return
0
;
return
0
;
}
}
...
...
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