Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
f6d48c17
Commit
f6d48c17
authored
Aug 27, 2015
by
Hisham Muhammad
Browse files
Merge pull request #247 from eworm-de/dual-meters-margin
remove extra space in dual meters without margins
parents
f585fc98
696e36cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
CPUMeter.c
View file @
f6d48c17
...
...
@@ -170,16 +170,17 @@ static void AllCPUsMeter_updateMode(Meter* this, int mode) {
static
void
DualColCPUsMeter_draw
(
Meter
*
this
,
int
x
,
int
y
,
int
w
)
{
Meter
**
meters
=
(
Meter
**
)
this
->
drawData
;
int
start
,
count
;
int
pad
=
this
->
pl
->
settings
->
headerMargin
?
2
:
0
;
AllCPUsMeter_getRange
(
this
,
&
start
,
&
count
);
int
height
=
(
count
+
1
)
/
2
;
int
startY
=
y
;
for
(
int
i
=
0
;
i
<
height
;
i
++
)
{
meters
[
i
]
->
draw
(
meters
[
i
],
x
,
y
,
(
w
-
2
)
/
2
);
meters
[
i
]
->
draw
(
meters
[
i
],
x
,
y
,
(
w
-
pad
)
/
2
);
y
+=
meters
[
i
]
->
h
;
}
y
=
startY
;
for
(
int
i
=
height
;
i
<
count
;
i
++
)
{
meters
[
i
]
->
draw
(
meters
[
i
],
x
+
(
w
-
1
)
/
2
+
2
,
y
,
(
w
-
2
)
/
2
);
meters
[
i
]
->
draw
(
meters
[
i
],
x
+
(
w
-
1
)
/
2
+
1
+
(
pad
/
2
)
,
y
,
(
w
-
pad
)
/
2
);
y
+=
meters
[
i
]
->
h
;
}
}
...
...
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