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
696e36cb
Commit
696e36cb
authored
Aug 25, 2015
by
Christian Hesse
Browse files
remove extra space in dual meters without margins
parent
f585fc98
Changes
1
Show whitespace changes
Inline
Side-by-side
CPUMeter.c
View file @
696e36cb
...
@@ -170,16 +170,17 @@ static void AllCPUsMeter_updateMode(Meter* this, int mode) {
...
@@ -170,16 +170,17 @@ static void AllCPUsMeter_updateMode(Meter* this, int mode) {
static
void
DualColCPUsMeter_draw
(
Meter
*
this
,
int
x
,
int
y
,
int
w
)
{
static
void
DualColCPUsMeter_draw
(
Meter
*
this
,
int
x
,
int
y
,
int
w
)
{
Meter
**
meters
=
(
Meter
**
)
this
->
drawData
;
Meter
**
meters
=
(
Meter
**
)
this
->
drawData
;
int
start
,
count
;
int
start
,
count
;
int
pad
=
this
->
pl
->
settings
->
headerMargin
?
2
:
0
;
AllCPUsMeter_getRange
(
this
,
&
start
,
&
count
);
AllCPUsMeter_getRange
(
this
,
&
start
,
&
count
);
int
height
=
(
count
+
1
)
/
2
;
int
height
=
(
count
+
1
)
/
2
;
int
startY
=
y
;
int
startY
=
y
;
for
(
int
i
=
0
;
i
<
height
;
i
++
)
{
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
+=
meters
[
i
]
->
h
;
}
}
y
=
startY
;
y
=
startY
;
for
(
int
i
=
height
;
i
<
count
;
i
++
)
{
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
;
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