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
7ba2a371
Commit
7ba2a371
authored
Apr 30, 2003
by
Maxime Bellengé
Committed by
Alexandre Julliard
Apr 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix some indentation problems.
- Handle correctly the alignement of the checkboxes if the BS_TOP/BS_BOTTOM flags are set.
parent
812b4f46
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
button.c
controls/button.c
+25
-6
No files found.
controls/button.c
View file @
7ba2a371
...
@@ -862,6 +862,12 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
...
@@ -862,6 +862,12 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
rbox
.
right
=
checkBoxWidth
;
rbox
.
right
=
checkBoxWidth
;
}
}
/* Draw label */
client
=
rtext
;
dtFlags
=
BUTTON_CalcLabelRect
(
hwnd
,
hDC
,
&
rtext
);
rbox
.
top
=
rtext
.
top
;
rbox
.
bottom
=
rtext
.
bottom
;
/* Draw the check-box bitmap */
/* Draw the check-box bitmap */
if
(
action
==
ODA_DRAWENTIRE
||
action
==
ODA_SELECT
)
if
(
action
==
ODA_DRAWENTIRE
||
action
==
ODA_SELECT
)
{
{
...
@@ -911,27 +917,40 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
...
@@ -911,27 +917,40 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
/* rbox must have the correct height */
/* rbox must have the correct height */
delta
=
rbox
.
bottom
-
rbox
.
top
-
checkBoxHeight
;
delta
=
rbox
.
bottom
-
rbox
.
top
-
checkBoxHeight
;
if
(
style
&
BS_TOP
)
{
if
(
delta
>
0
)
{
rbox
.
bottom
=
rbox
.
top
+
checkBoxHeight
;
}
else
{
rbox
.
top
-=
-
delta
/
2
+
1
;
rbox
.
bottom
+=
rbox
.
top
+
checkBoxHeight
;
}
}
else
if
(
style
&
BS_BOTTOM
)
{
if
(
delta
>
0
)
{
rbox
.
top
=
rbox
.
bottom
-
checkBoxHeight
;
}
else
{
rbox
.
bottom
+=
-
delta
/
2
+
1
;
rbox
.
top
=
rbox
.
bottom
-=
checkBoxHeight
;
}
}
else
{
/* Default */
if
(
delta
>
0
)
if
(
delta
>
0
)
{
{
int
ofs
=
(
abs
(
delta
)
/
2
);
int
ofs
=
(
delta
/
2
);
rbox
.
bottom
-=
ofs
+
1
;
rbox
.
bottom
-=
ofs
+
1
;
rbox
.
top
=
rbox
.
bottom
-
checkBoxHeight
;
rbox
.
top
=
rbox
.
bottom
-
checkBoxHeight
;
}
}
else
if
(
delta
<
0
)
else
if
(
delta
<
0
)
{
{
int
ofs
=
(
abs
(
delta
)
/
2
);
int
ofs
=
(
-
delta
/
2
);
rbox
.
top
-=
ofs
+
1
;
rbox
.
top
-=
ofs
+
1
;
rbox
.
bottom
=
rbox
.
top
+
checkBoxHeight
;
rbox
.
bottom
=
rbox
.
top
+
checkBoxHeight
;
}
}
}
DrawFrameControl
(
hDC
,
&
rbox
,
DFC_BUTTON
,
flags
);
DrawFrameControl
(
hDC
,
&
rbox
,
DFC_BUTTON
,
flags
);
}
}
}
}
/* Draw label */
client
=
rtext
;
dtFlags
=
BUTTON_CalcLabelRect
(
hwnd
,
hDC
,
&
rtext
);
if
(
dtFlags
==
(
UINT
)
-
1L
)
/* Noting to draw */
if
(
dtFlags
==
(
UINT
)
-
1L
)
/* Noting to draw */
return
;
return
;
hRgn
=
CreateRectRgn
(
client
.
left
,
client
.
top
,
client
.
right
,
client
.
bottom
);
hRgn
=
CreateRectRgn
(
client
.
left
,
client
.
top
,
client
.
right
,
client
.
bottom
);
...
...
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