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
b11b448d
Commit
b11b448d
authored
Jul 13, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskmgr: Use SetRect() instead of open coding it.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4c5e3205
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
20 deletions
+6
-20
graphctl.c
programs/taskmgr/graphctl.c
+4
-12
taskmgr.c
programs/taskmgr/taskmgr.c
+1
-4
trayicon.c
programs/taskmgr/trayicon.c
+1
-4
No files found.
programs/taskmgr/graphctl.c
View file @
b11b448d
...
...
@@ -117,10 +117,7 @@ static void GraphCtrl_Resize(TGraphCtrl* this)
/* the "left" coordinate and "width" will be modified in */
/* InvalidateCtrl to be based on the width of the y axis scaling */
this
->
m_rectPlot
.
left
=
0
;
this
->
m_rectPlot
.
top
=
-
1
;
this
->
m_rectPlot
.
right
=
this
->
m_rectClient
.
right
-
0
;
this
->
m_rectPlot
.
bottom
=
this
->
m_rectClient
.
bottom
-
0
;
SetRect
(
&
this
->
m_rectPlot
,
0
,
-
1
,
this
->
m_rectClient
.
right
,
this
->
m_rectClient
.
bottom
);
/* set some member variables to avoid multiple function calls */
this
->
m_nPlotHeight
=
this
->
m_rectPlot
.
bottom
-
this
->
m_rectPlot
.
top
;
/* m_rectPlot.Height(); */
...
...
@@ -340,19 +337,14 @@ static void GraphCtrl_DrawPoint(TGraphCtrl* this)
if
((
prevY
<=
this
->
m_rectPlot
.
top
)
||
(
currY
<=
this
->
m_rectPlot
.
top
))
{
RECT
rc
;
rc
.
bottom
=
this
->
m_rectPlot
.
top
+
1
;
rc
.
left
=
prevX
;
rc
.
right
=
currX
+
1
;
rc
.
top
=
this
->
m_rectClient
.
top
;
SetRect
(
&
rc
,
prevX
,
this
->
m_rectClient
.
top
,
currX
+
1
,
this
->
m_rectPlot
.
top
+
1
);
FillRect
(
this
->
m_dcPlot
,
&
rc
,
this
->
m_brushBack
);
}
if
((
prevY
>=
this
->
m_rectPlot
.
bottom
)
||
(
currY
>=
this
->
m_rectPlot
.
bottom
))
{
RECT
rc
;
rc
.
bottom
=
this
->
m_rectClient
.
bottom
+
1
;
rc
.
left
=
prevX
;
rc
.
right
=
currX
+
1
;
rc
.
top
=
this
->
m_rectPlot
.
bottom
+
1
;
SetRect
(
&
rc
,
prevX
,
this
->
m_rectPlot
.
bottom
+
1
,
currX
+
1
,
this
->
m_rectClient
.
bottom
+
1
);
/* RECT rc(prevX, m_rectPlot.bottom+1, currX+1, m_rectClient.bottom+1); */
FillRect
(
this
->
m_dcPlot
,
&
rc
,
this
->
m_brushBack
);
}
...
...
programs/taskmgr/taskmgr.c
View file @
b11b448d
...
...
@@ -65,10 +65,7 @@ static void FillSolidRect2(HDC hDC, int x, int y, int cx, int cy, COLORREF clr)
RECT
rect
;
SetBkColor
(
hDC
,
clr
);
rect
.
left
=
x
;
rect
.
top
=
y
;
rect
.
right
=
x
+
cx
;
rect
.
bottom
=
y
+
cy
;
SetRect
(
&
rect
,
x
,
y
,
x
+
cx
,
y
+
cy
);
ExtTextOutW
(
hDC
,
0
,
0
,
ETO_OPAQUE
,
&
rect
,
NULL
,
0
,
NULL
);
}
...
...
programs/taskmgr/trayicon.c
View file @
b11b448d
...
...
@@ -90,10 +90,7 @@ static HICON TrayIcon_GetProcessorUsageIcon(void)
* just having 10.
*/
nLinesToDraw
=
(
ProcessorUsage
+
(
ProcessorUsage
/
10
))
/
11
;
rc
.
left
=
3
;
rc
.
top
=
12
-
nLinesToDraw
;
rc
.
right
=
13
;
rc
.
bottom
=
13
;
SetRect
(
&
rc
,
3
,
12
-
nLinesToDraw
,
13
,
13
);
/*
* Now draw the cpu usage
...
...
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