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
1970556b
Commit
1970556b
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: Fix TAB_SetItemSize.
Windows sets the default width to LOGPIXELSX regardless of the style. It will also always return the previous cx value provided.
parent
7296bcd8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
tab.c
dlls/comctl32/tab.c
+7
-7
tab.c
dlls/comctl32/tests/tab.c
+2
-2
No files found.
dlls/comctl32/tab.c
View file @
1970556b
...
...
@@ -2662,19 +2662,20 @@ TAB_SetItemSize (TAB_INFO *infoPtr, INT cx, INT cy)
lResult
=
MAKELONG
(
infoPtr
->
tabWidth
,
infoPtr
->
tabHeight
);
/* UNDOCUMENTED: If requested Width or Height is 0 this means that program wants to use auto size. */
if
(
infoPtr
->
dwStyle
&
TCS_FIXEDWIDTH
&&
(
infoPtr
->
tabWidth
!=
cx
)
)
if
(
infoPtr
->
tabWidth
!=
cx
)
{
infoPtr
->
tabWidth
=
cx
;
bNeedPaint
=
TRUE
;
}
if
(
infoPtr
->
tabHeight
!=
cy
)
if
(
infoPtr
->
tabHeight
!=
cy
&&
cy
!=
0
)
{
if
((
infoPtr
->
fHeightSet
=
(
cy
!=
0
)))
infoPtr
->
tabHeight
=
cy
;
infoPtr
->
tabHeight
=
cy
;
bNeedPaint
=
TRUE
;
}
infoPtr
->
fHeightSet
=
(
cy
!=
0
);
TRACE
(
"was h=%d,w=%d, now h=%d,w=%d
\n
"
,
HIWORD
(
lResult
),
LOWORD
(
lResult
),
infoPtr
->
tabHeight
,
infoPtr
->
tabWidth
);
...
...
@@ -3063,8 +3064,7 @@ static LRESULT TAB_Create (HWND hwnd, LPARAM lParam)
infoPtr
->
uVItemPadding
;
/* Initialize the width of a tab. */
if
(
infoPtr
->
dwStyle
&
TCS_FIXEDWIDTH
)
infoPtr
->
tabWidth
=
GetDeviceCaps
(
hdc
,
LOGPIXELSX
);
infoPtr
->
tabWidth
=
GetDeviceCaps
(
hdc
,
LOGPIXELSX
);
infoPtr
->
tabMinWidth
=
-
1
;
...
...
dlls/comctl32/tests/tab.c
View file @
1970556b
...
...
@@ -689,10 +689,10 @@ static void test_setitemsize(void)
ReleaseDC
(
hwTab
,
hdc
);
result
=
SendMessageA
(
hwTab
,
TCM_SETITEMSIZE
,
0
,
MAKELPARAM
(
50
,
20
));
todo_wine
ok
(
LOWORD
(
result
)
==
dpi
,
"Excepted width to be %d, got %d
\n
"
,
dpi
,
LOWORD
(
result
));
ok
(
LOWORD
(
result
)
==
dpi
,
"Excepted width to be %d, got %d
\n
"
,
dpi
,
LOWORD
(
result
));
result
=
SendMessageA
(
hwTab
,
TCM_SETITEMSIZE
,
0
,
MAKELPARAM
(
0
,
1
));
todo_wine
ok
(
LOWORD
(
result
)
==
50
,
"Excepted width to be 50, got %d
\n
"
,
LOWORD
(
result
));
ok
(
LOWORD
(
result
)
==
50
,
"Excepted width to be 50, got %d
\n
"
,
LOWORD
(
result
));
ok
(
HIWORD
(
result
)
==
20
,
"Excepted height to be 20, got %d
\n
"
,
HIWORD
(
result
));
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