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
39f5c438
Commit
39f5c438
authored
Mar 19, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Simplify the scrollbar visibility checks.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5b3816c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
16 deletions
+8
-16
paint.c
dlls/riched20/paint.c
+8
-16
No files found.
dlls/riched20/paint.c
View file @
39f5c438
...
...
@@ -1035,7 +1035,7 @@ static void draw_paragraph( ME_Context *c, ME_Paragraph *para )
void
ME_ScrollAbs
(
ME_TextEditor
*
editor
,
int
x
,
int
y
)
{
BOOL
bScrollBarIsVisible
,
bScrollBarWillBeVisible
;
BOOL
old_vis
,
new_vis
;
int
scrollX
=
0
,
scrollY
=
0
;
if
(
editor
->
horz_si
.
nPos
!=
x
)
{
...
...
@@ -1072,25 +1072,17 @@ void ME_ScrollAbs(ME_TextEditor *editor, int x, int y)
LONG
winStyle
=
GetWindowLongW
(
editor
->
hWnd
,
GWL_STYLE
);
if
(
editor
->
scrollbars
&
WS_HSCROLL
)
{
bScrollBarIsVisible
=
(
winStyle
&
WS_HSCROLL
)
!=
0
;
bScrollBarWillBeVisible
=
(
editor
->
nTotalWidth
>
editor
->
sizeWindow
.
cx
&&
(
editor
->
scrollbars
&
WS_HSCROLL
))
||
(
editor
->
scrollbars
&
ES_DISABLENOSCROLL
);
if
(
bScrollBarIsVisible
!=
bScrollBarWillBeVisible
)
ITextHost_TxShowScrollBar
(
editor
->
texthost
,
SB_HORZ
,
bScrollBarWillBeVisible
);
old_vis
=
winStyle
&
WS_HSCROLL
;
new_vis
=
editor
->
nTotalWidth
>
editor
->
sizeWindow
.
cx
||
editor
->
scrollbars
&
ES_DISABLENOSCROLL
;
if
(
!
old_vis
^
!
new_vis
)
ITextHost_TxShowScrollBar
(
editor
->
texthost
,
SB_HORZ
,
new_vis
);
}
if
(
editor
->
scrollbars
&
WS_VSCROLL
)
{
bScrollBarIsVisible
=
(
winStyle
&
WS_VSCROLL
)
!=
0
;
bScrollBarWillBeVisible
=
(
editor
->
nTotalLength
>
editor
->
sizeWindow
.
cy
&&
(
editor
->
scrollbars
&
WS_VSCROLL
)
&&
(
editor
->
props
&
TXTBIT_MULTILINE
))
||
(
editor
->
scrollbars
&
ES_DISABLENOSCROLL
);
if
(
bScrollBarIsVisible
!=
bScrollBarWillBeVisible
)
ITextHost_TxShowScrollBar
(
editor
->
texthost
,
SB_VERT
,
bScrollBarWillBeVisible
);
old_vis
=
winStyle
&
WS_VSCROLL
;
new_vis
=
(
editor
->
nTotalLength
>
editor
->
sizeWindow
.
cy
&&
editor
->
props
&
TXTBIT_MULTILINE
)
||
editor
->
scrollbars
&
ES_DISABLENOSCROLL
;
if
(
!
old_vis
^
!
new_vis
)
ITextHost_TxShowScrollBar
(
editor
->
texthost
,
SB_VERT
,
new_vis
);
}
}
ME_UpdateScrollBar
(
editor
);
...
...
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