aboutsummaryrefslogtreecommitdiffstats
path: root/Header.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2022-05-02 16:04:21 +0200
committerDaniel Lange <DLange@git.local>2022-05-02 16:04:21 +0200
commit1b805a31720727008b32b1129a167758519fd4db (patch)
tree900c84e10a25f2c8eaeec3ae54f1365688ce02a4 /Header.c
parenta6822e98434cf7da6fab033898094976d881ee0f (diff)
downloaddebian_htop-1b805a31720727008b32b1129a167758519fd4db.tar.gz
debian_htop-1b805a31720727008b32b1129a167758519fd4db.tar.bz2
debian_htop-1b805a31720727008b32b1129a167758519fd4db.zip
New upstream version 3.2.0upstream/3.2.0
Diffstat (limited to 'Header.c')
-rw-r--r--Header.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Header.c b/Header.c
index c557a45..8dff89b 100644
--- a/Header.c
+++ b/Header.c
@@ -194,7 +194,8 @@ void Header_draw(const Header* this) {
for (int y = 0; y < height; y++) {
mvhline(y, 0, ' ', COLS);
}
- const int width = COLS - pad;
+ const int numCols = HeaderLayout_getColumns(this->headerLayout);
+ const int width = COLS - 2 * pad - (numCols - 1);
int x = pad;
float roundingLoss = 0.0F;
@@ -217,6 +218,7 @@ void Header_draw(const Header* this) {
except for multi column meters. */
if (meter->mode == TEXT_METERMODE && !Meter_isMultiColumn(meter)) {
for (int j = 1; j < meter->columnWidthCount; j++) {
+ actualWidth++; /* separator column */
actualWidth += (float)width * HeaderLayout_layouts[this->headerLayout].widths[col + j] / 100.0F;
}
}
@@ -227,6 +229,7 @@ void Header_draw(const Header* this) {
}
x += floorf(colWidth);
+ x++; /* separator column */
}
}
@@ -283,6 +286,9 @@ int Header_calculateHeight(Header* this) {
}
maxHeight = MAXIMUM(maxHeight, height);
}
+ if (this->settings->screenTabs) {
+ maxHeight++;
+ }
this->height = maxHeight;
this->pad = pad;
return maxHeight;

© 2014-2024 Faster IT GmbH | imprint | privacy policy