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
ecde1c3c
Commit
ecde1c3c
authored
Feb 27, 2008
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Feb 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: rebar: Image height should be taken into account when computing the band height.
parent
81590db3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
rebar.c
dlls/comctl32/rebar.c
+5
-5
rebar.c
dlls/comctl32/tests/rebar.c
+23
-1
No files found.
dlls/comctl32/rebar.c
View file @
ecde1c3c
...
...
@@ -1513,7 +1513,7 @@ REBAR_ValidateBand (const REBAR_INFO *infoPtr, REBAR_BAND *lpBand)
/* the internal band structure: cxHeader, cyHeader, cxMinBand, cyMinBand, fStatus */
{
UINT
header
=
0
;
UINT
textheight
=
0
;
UINT
textheight
=
0
,
imageheight
=
0
;
UINT
i
,
nonfixed
;
REBAR_BAND
*
tBand
;
...
...
@@ -1576,11 +1576,11 @@ REBAR_ValidateBand (const REBAR_INFO *infoPtr, REBAR_BAND *lpBand)
lpBand
->
fStatus
|=
HAS_IMAGE
;
if
(
infoPtr
->
dwStyle
&
CCS_VERT
)
{
header
+=
(
infoPtr
->
imageSize
.
cy
+
REBAR_POST_IMAGE
);
lpBand
->
cyMinBand
=
infoPtr
->
imageSize
.
cx
+
2
;
imageheight
=
infoPtr
->
imageSize
.
cx
+
4
;
}
else
{
header
+=
(
infoPtr
->
imageSize
.
cx
+
REBAR_POST_IMAGE
);
lpBand
->
cyMinBand
=
infoPtr
->
imageSize
.
cy
+
2
;
imageheight
=
infoPtr
->
imageSize
.
cy
+
4
;
}
}
...
...
@@ -1610,7 +1610,7 @@ REBAR_ValidateBand (const REBAR_INFO *infoPtr, REBAR_BAND *lpBand)
/* check if user overrode the header value */
if
(
!
(
lpBand
->
fStyle
&
RBBS_UNDOC_FIXEDHEADER
))
lpBand
->
cxHeader
=
header
;
lpBand
->
cyHeader
=
textheight
;
lpBand
->
cyHeader
=
max
(
textheight
,
imageheight
)
;
/* Now compute minimum size of child window */
update_min_band_height
(
infoPtr
,
lpBand
);
/* update lpBand->cyMinBand from cyHeader and cyChild*/
...
...
@@ -2633,7 +2633,7 @@ REBAR_SetBandInfoT(REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL bUnic
REBAR_DumpBand
(
infoPtr
);
if
(
bChanged
&&
(
lprbbi
->
fMask
&
(
RBBIM_CHILDSIZE
|
RBBIM_SIZE
|
RBBIM_STYLE
)))
{
if
(
bChanged
&&
(
lprbbi
->
fMask
&
(
RBBIM_CHILDSIZE
|
RBBIM_SIZE
|
RBBIM_STYLE
|
RBBIM_IMAGE
)))
{
REBAR_Layout
(
infoPtr
);
InvalidateRect
(
infoPtr
->
hwndSelf
,
0
,
1
);
}
...
...
dlls/comctl32/tests/rebar.c
View file @
ecde1c3c
...
...
@@ -17,6 +17,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* make sure the structures work with a comctl32 v5.x */
#define _WIN32_WINNT 0x500
#define _WIN32_IE 0x500
#include <assert.h>
#include <stdarg.h>
...
...
@@ -252,6 +256,11 @@ rbsize_result_t rbsize_results[] = {
{
{
328
,
0
,
511
,
20
},
0x00
,
183
},
{
{
511
,
0
,
672
,
20
},
0x00
,
161
},
{
{
0
,
20
,
672
,
40
},
0x00
,
200
},
},
},
{
{
0
,
0
,
672
,
56
},
56
,
2
,
{
28
,
28
,
},
5
,
{
{
{
0
,
0
,
114
,
28
},
0x00
,
40
},
{
{
114
,
0
,
328
,
28
},
0x00
,
214
},
{
{
328
,
0
,
511
,
28
},
0x00
,
183
},
{
{
511
,
0
,
672
,
28
},
0x00
,
161
},
{
{
0
,
28
,
672
,
56
},
0x00
,
200
},
},
},
{
{
0
,
0
,
672
,
0
},
0
,
0
,
{
0
,
},
0
,
{{{
0
,
0
,
0
,
0
},
0
,
0
},
},
},
{
{
0
,
0
,
672
,
65
},
65
,
1
,
{
65
,
},
3
,
{
...
...
@@ -329,6 +338,8 @@ static void layout_test(void)
{
HWND
hRebar
=
NULL
;
REBARBANDINFO
rbi
;
HIMAGELIST
himl
;
REBARINFO
ri
;
rebuild_rebar
(
&
hRebar
);
check_sizes
();
...
...
@@ -406,6 +417,17 @@ static void layout_test(void)
SendMessageA
(
hRebar
,
RB_MINIMIZEBAND
,
0
,
0
);
check_sizes
();
/* an image will increase the band height */
himl
=
ImageList_LoadImage
(
LoadLibrary
(
"comctl32"
),
MAKEINTRESOURCE
(
121
),
24
,
2
,
CLR_NONE
,
IMAGE_BITMAP
,
LR_DEFAULTCOLOR
);
ri
.
cbSize
=
sizeof
(
ri
);
ri
.
fMask
=
RBIM_IMAGELIST
;
ri
.
himl
=
himl
;
ok
(
SendMessage
(
hRebar
,
RB_SETBARINFO
,
0
,
(
LPARAM
)
&
ri
),
"RB_SETBARINFO failed
\n
"
);
rbi
.
fMask
=
RBBIM_IMAGE
;
rbi
.
iImage
=
1
;
SendMessage
(
hRebar
,
RB_SETBANDINFO
,
1
,
(
LPARAM
)
&
rbi
);
check_sizes
();
/* VARHEIGHT resizing test on a horizontal rebar */
rebuild_rebar
(
&
hRebar
);
SetWindowLong
(
hRebar
,
GWL_STYLE
,
GetWindowLong
(
hRebar
,
GWL_STYLE
)
|
RBS_AUTOSIZE
);
...
...
@@ -793,7 +815,7 @@ START_TEST(rebar)
MSG
msg
;
RECT
rc
;
hComctl32
=
GetModuleHandle
A
(
"comctl32.dll"
);
hComctl32
=
LoadLibrary
A
(
"comctl32.dll"
);
pInitCommonControlsEx
=
(
void
*
)
GetProcAddress
(
hComctl32
,
"InitCommonControlsEx"
);
if
(
!
pInitCommonControlsEx
)
{
...
...
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