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
c33c2da8
Commit
c33c2da8
authored
Nov 28, 2004
by
Ge van Geldorp
Committed by
Alexandre Julliard
Nov 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix vertical position of text in single-line edit controls.
- Add tests for this.
parent
584c1572
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
6 deletions
+36
-6
edit.c
dlls/user/edit.c
+36
-6
edit.c
dlls/user/tests/edit.c
+0
-0
No files found.
dlls/user/edit.c
View file @
c33c2da8
...
...
@@ -2186,13 +2186,39 @@ static void EDIT_SetCaretPos(EDITSTATE *es, INT pos,
*/
static
void
EDIT_SetRectNP
(
EDITSTATE
*
es
,
LPRECT
rc
)
{
RECT
ClientRect
;
LONG_PTR
ExStyle
;
CopyRect
(
&
es
->
format_rect
,
rc
);
if
(
es
->
style
&
WS_BORDER
)
{
INT
bw
=
GetSystemMetrics
(
SM_CXBORDER
)
+
1
;
es
->
format_rect
.
left
+=
bw
;
es
->
format_rect
.
top
+=
bw
;
es
->
format_rect
.
right
-=
bw
;
es
->
format_rect
.
bottom
-=
bw
;
if
(
es
->
style
&
ES_MULTILINE
)
{
if
(
es
->
style
&
WS_BORDER
)
{
INT
bw
=
GetSystemMetrics
(
SM_CXBORDER
)
+
1
;
es
->
format_rect
.
left
+=
bw
;
es
->
format_rect
.
right
-=
bw
;
es
->
format_rect
.
top
+=
bw
;
es
->
format_rect
.
bottom
-=
bw
;
}
}
else
{
ExStyle
=
GetWindowLongPtrW
(
es
->
hwndSelf
,
GWL_EXSTYLE
);
if
(
ExStyle
&
WS_EX_CLIENTEDGE
)
{
if
(
es
->
line_height
+
2
<=
es
->
format_rect
.
bottom
-
es
->
format_rect
.
top
)
{
es
->
format_rect
.
top
++
;
es
->
format_rect
.
bottom
--
;
}
}
else
if
(
es
->
style
&
WS_BORDER
)
{
INT
bw
=
GetSystemMetrics
(
SM_CXBORDER
)
+
1
;
es
->
format_rect
.
left
+=
bw
;
es
->
format_rect
.
right
-=
bw
;
if
(
es
->
line_height
+
2
*
bw
<=
es
->
format_rect
.
bottom
-
es
->
format_rect
.
top
)
{
es
->
format_rect
.
top
+=
bw
;
es
->
format_rect
.
bottom
-=
bw
;
}
}
}
es
->
format_rect
.
left
+=
es
->
left_margin
;
es
->
format_rect
.
right
-=
es
->
right_margin
;
...
...
@@ -2224,6 +2250,10 @@ static void EDIT_SetRectNP(EDITSTATE *es, LPRECT rc)
/* Windows doesn't care to fix text placement for SL controls */
es
->
format_rect
.
bottom
=
es
->
format_rect
.
top
+
es
->
line_height
;
/* Always stay within the client area */
GetClientRect
(
es
->
hwndSelf
,
&
ClientRect
);
es
->
format_rect
.
bottom
=
min
(
es
->
format_rect
.
bottom
,
ClientRect
.
bottom
);
if
((
es
->
style
&
ES_MULTILINE
)
&&
!
(
es
->
style
&
ES_AUTOHSCROLL
))
EDIT_BuildLineDefs_ML
(
es
,
0
,
strlenW
(
es
->
text
),
0
,
NULL
);
}
...
...
dlls/user/tests/edit.c
View file @
c33c2da8
This diff is collapsed.
Click to expand it.
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