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
8934a53e
Commit
8934a53e
authored
Dec 04, 2023
by
Brendan McGrath
Committed by
Alexandre Julliard
Dec 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Check size initially and after changing padding only.
parent
027bbb30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
tab.c
dlls/comctl32/tests/tab.c
+13
-0
No files found.
dlls/comctl32/tests/tab.c
View file @
8934a53e
...
@@ -540,6 +540,7 @@ static void test_tab(INT nMinTabWidth)
...
@@ -540,6 +540,7 @@ static void test_tab(INT nMinTabWidth)
SelectObject
(
hdc
,
hOldFont
);
SelectObject
(
hdc
,
hOldFont
);
ReleaseDC
(
hwTab
,
hdc
);
ReleaseDC
(
hwTab
,
hdc
);
trace
(
"default_min_tab_width: %d
\n
"
,
default_min_tab_width
);
trace
(
" TCS_FIXEDWIDTH tabs no icon...
\n
"
);
trace
(
" TCS_FIXEDWIDTH tabs no icon...
\n
"
);
CHECKSIZE
(
hwTab
,
dpi
,
-
1
,
"default width"
);
CHECKSIZE
(
hwTab
,
dpi
,
-
1
,
"default width"
);
TABCHECKSETSIZE
(
hwTab
,
50
,
20
,
50
,
20
,
"set size"
);
TABCHECKSETSIZE
(
hwTab
,
50
,
20
,
50
,
20
,
"set size"
);
...
@@ -609,6 +610,7 @@ static void test_tab(INT nMinTabWidth)
...
@@ -609,6 +610,7 @@ static void test_tab(INT nMinTabWidth)
ok
(
rTab
.
right
-
rTab
.
left
==
exp
||
broken
(
rTab
.
right
-
rTab
.
left
==
default_min_tab_width
),
ok
(
rTab
.
right
-
rTab
.
left
==
exp
||
broken
(
rTab
.
right
-
rTab
.
left
==
default_min_tab_width
),
"no icon, default width: Expected width [%d] got [%ld]
\n
"
,
exp
,
rTab
.
right
-
rTab
.
left
);
"no icon, default width: Expected width [%d] got [%ld]
\n
"
,
exp
,
rTab
.
right
-
rTab
.
left
);
CHECKSIZE
(
hwTab
,
max
(
size
.
cx
+
TAB_PADDING_X
*
2
,
nMinTabWidth
<
0
?
default_min_tab_width
:
nMinTabWidth
),
size
.
cy
+
5
,
"Initial values"
);
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
{
{
INT
nTabWidth
=
(
nMinTabWidth
<
0
)
?
TabWidthPadded
(
default_min_tab_width
,
i
,
2
)
:
nMinTabWidth
;
INT
nTabWidth
=
(
nMinTabWidth
<
0
)
?
TabWidthPadded
(
default_min_tab_width
,
i
,
2
)
:
nMinTabWidth
;
...
@@ -625,6 +627,11 @@ static void test_tab(INT nMinTabWidth)
...
@@ -625,6 +627,11 @@ static void test_tab(INT nMinTabWidth)
TABCHECKSETSIZE
(
hwTab
,
50
,
30
,
max
(
size
.
cx
+
21
+
i
*
3
,
nTabWidth
),
30
,
"with icon, set size > icon"
);
TABCHECKSETSIZE
(
hwTab
,
50
,
30
,
max
(
size
.
cx
+
21
+
i
*
3
,
nTabWidth
),
30
,
"with icon, set size > icon"
);
TABCHECKSETSIZE
(
hwTab
,
20
,
20
,
max
(
size
.
cx
+
21
+
i
*
3
,
nTabWidth
),
20
,
"with icon, set size < icon"
);
TABCHECKSETSIZE
(
hwTab
,
20
,
20
,
max
(
size
.
cx
+
21
+
i
*
3
,
nTabWidth
),
20
,
"with icon, set size < icon"
);
TABCHECKSETSIZE
(
hwTab
,
0
,
1
,
max
(
size
.
cx
+
21
+
i
*
3
,
nTabWidth
),
1
,
"with icon, min size"
);
TABCHECKSETSIZE
(
hwTab
,
0
,
1
,
max
(
size
.
cx
+
21
+
i
*
3
,
nTabWidth
),
1
,
"with icon, min size"
);
/* tests that a change to padding only doesn't impact reported size */
SendMessageA
(
hwTab
,
TCM_SETPADDING
,
0
,
MAKELPARAM
(
i
+
1
,
i
+
1
));
CHECKSIZE
(
hwTab
,
max
(
size
.
cx
+
21
+
i
*
3
,
nTabWidth
),
1
,
"with icon, min size, padding only change"
);
TABCHECKSETSIZE
(
hwTab
,
0
,
1
,
max
(
size
.
cx
+
21
+
i
*
3
,
nTabWidth
),
1
,
"with icon, min size, same size"
);
}
}
DestroyWindow
(
hwTab
);
DestroyWindow
(
hwTab
);
...
@@ -637,6 +644,7 @@ static void test_tab(INT nMinTabWidth)
...
@@ -637,6 +644,7 @@ static void test_tab(INT nMinTabWidth)
ok
(
rTab
.
right
-
rTab
.
left
==
exp
||
broken
(
rTab
.
right
-
rTab
.
left
==
default_min_tab_width
),
ok
(
rTab
.
right
-
rTab
.
left
==
exp
||
broken
(
rTab
.
right
-
rTab
.
left
==
default_min_tab_width
),
"no icon, default width: Expected width [%d] got [%ld]
\n
"
,
exp
,
rTab
.
right
-
rTab
.
left
);
"no icon, default width: Expected width [%d] got [%ld]
\n
"
,
exp
,
rTab
.
right
-
rTab
.
left
);
CHECKSIZE
(
hwTab
,
nMinTabWidth
<
0
?
default_min_tab_width
:
nMinTabWidth
,
size
.
cy
+
5
,
"Initial values"
);
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
{
{
INT
nTabWidth
=
(
nMinTabWidth
<
0
)
?
TabWidthPadded
(
default_min_tab_width
,
i
,
2
)
:
nMinTabWidth
;
INT
nTabWidth
=
(
nMinTabWidth
<
0
)
?
TabWidthPadded
(
default_min_tab_width
,
i
,
2
)
:
nMinTabWidth
;
...
@@ -654,6 +662,11 @@ static void test_tab(INT nMinTabWidth)
...
@@ -654,6 +662,11 @@ static void test_tab(INT nMinTabWidth)
TABCHECKSETSIZE
(
hwTab
,
50
,
30
,
nTabWidth
,
30
,
"with icon, set size > icon"
);
TABCHECKSETSIZE
(
hwTab
,
50
,
30
,
nTabWidth
,
30
,
"with icon, set size > icon"
);
TABCHECKSETSIZE
(
hwTab
,
20
,
20
,
nTabWidth
,
20
,
"with icon, set size < icon"
);
TABCHECKSETSIZE
(
hwTab
,
20
,
20
,
nTabWidth
,
20
,
"with icon, set size < icon"
);
TABCHECKSETSIZE
(
hwTab
,
0
,
1
,
nTabWidth
,
1
,
"with icon, min size"
);
TABCHECKSETSIZE
(
hwTab
,
0
,
1
,
nTabWidth
,
1
,
"with icon, min size"
);
/* tests that a change to padding only doesn't impact reported size */
SendMessageA
(
hwTab
,
TCM_SETPADDING
,
0
,
MAKELPARAM
(
i
+
1
,
i
+
1
));
CHECKSIZE
(
hwTab
,
nTabWidth
,
1
,
"with icon, min size, padding only change"
);
TABCHECKSETSIZE
(
hwTab
,
0
,
1
,
nTabWidth
,
1
,
"with icon, min size, same size"
);
}
}
DestroyWindow
(
hwTab
);
DestroyWindow
(
hwTab
);
...
...
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