mirror of https://github.com/xzeldon/htop.git
MemorySwapMeter: use full width on odd total width
This commit is contained in:
parent
a905c45195
commit
cf45a5d02b
|
@ -33,12 +33,10 @@ static void MemorySwapMeter_updateValues(Meter* this) {
|
||||||
static void MemorySwapMeter_draw(Meter* this, int x, int y, int w) {
|
static void MemorySwapMeter_draw(Meter* this, int x, int y, int w) {
|
||||||
MemorySwapMeterData* data = this->meterData;
|
MemorySwapMeterData* data = this->meterData;
|
||||||
|
|
||||||
int colwidth = (w - 2) / 2 + 1;
|
|
||||||
|
|
||||||
assert(data->memoryMeter->draw);
|
assert(data->memoryMeter->draw);
|
||||||
data->memoryMeter->draw(data->memoryMeter, x, y, colwidth);
|
data->memoryMeter->draw(data->memoryMeter, x, y, w / 2);
|
||||||
assert(data->swapMeter->draw);
|
assert(data->swapMeter->draw);
|
||||||
data->swapMeter->draw(data->swapMeter, x + w / 2, y, colwidth);
|
data->swapMeter->draw(data->swapMeter, x + w / 2, y, w - w / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MemorySwapMeter_init(Meter* this) {
|
static void MemorySwapMeter_init(Meter* this) {
|
||||||
|
|
Loading…
Reference in New Issue