parent
a4be54d444
commit
edc31073e3
22 changed files with 141 additions and 199 deletions
@ -1,50 +0,0 @@ |
||||
From ab439368d73236c2f1927ddd2e1f6d4b62eac6eb Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Thu, 13 Nov 2025 21:02:55 -0500
|
||||
Subject: [PATCH 01/22] Make the separator between columns larger
|
||||
|
||||
---
|
||||
Header.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Header.c b/Header.c
|
||||
index 7447f718..8f90f2f3 100644
|
||||
--- a/Header.c
|
||||
+++ b/Header.c
|
||||
@@ -194,12 +194,14 @@ void Header_reinit(Header* this) {
|
||||
void Header_draw(const Header* this) {
|
||||
const int height = this->height;
|
||||
const int pad = this->pad;
|
||||
+ const int sep = 3;
|
||||
+
|
||||
attrset(CRT_colors[RESET_COLOR]);
|
||||
for (int y = 0; y < height; y++) {
|
||||
mvhline(y, 0, ' ', COLS);
|
||||
}
|
||||
const size_t numCols = HeaderLayout_getColumns(this->headerLayout);
|
||||
- const int width = COLS - 2 * pad - ((int)numCols - 1);
|
||||
+ const int width = COLS - 2 * pad - sep*((int)numCols - 1);
|
||||
int x = pad;
|
||||
float roundingLoss = 0.0F;
|
||||
|
||||
@@ -222,7 +224,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+=sep; /* separator column */
|
||||
actualWidth += (float)width * HeaderLayout_layouts[this->headerLayout].widths[col + j] / 100.0F;
|
||||
}
|
||||
}
|
||||
@@ -233,7 +235,7 @@ void Header_draw(const Header* this) {
|
||||
}
|
||||
|
||||
x += floorf(colWidth);
|
||||
- x++; /* separator column */
|
||||
+ x+= sep; /* separator column */
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -1,38 +1,42 @@ |
||||
From 228f7448a37f4f3988fddd0255e44a680a547b14 Mon Sep 17 00:00:00 2001
|
||||
From b118cf8c48cae7912a9d7a9eea129e01f75fc684 Mon Sep 17 00:00:00 2001
|
||||
From: Jacopo De Simoi <wilderjds@protonmail.com>
|
||||
Date: Thu, 13 Nov 2025 21:26:27 -0500
|
||||
Date: Mon, 17 Nov 2025 12:48:55 -0500
|
||||
Subject: [PATCH 11/22] Remove Bar borders
|
||||
|
||||
This is an experiment in Tufte-ism
|
||||
---
|
||||
Meter.c | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
Meter.c | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Meter.c b/Meter.c
|
||||
index 331ef303..cb08f152 100644
|
||||
index 5982b436..e8708a93 100644
|
||||
--- a/Meter.c
|
||||
+++ b/Meter.c
|
||||
@@ -101,11 +101,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
@@ -80,12 +80,10 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
w -= captionLen;
|
||||
|
||||
// Draw the bar borders
|
||||
if (w >= 1) {
|
||||
- x += captionLen;
|
||||
- attrset(CRT_colors[BAR_BORDER]);
|
||||
- mvaddch(y, x, '[');
|
||||
- w--;
|
||||
- mvaddch(y, x + w, ']');
|
||||
- attrset(CRT_colors[BAR_BORDER]);
|
||||
- mvaddch(y, x, '[');
|
||||
- w--;
|
||||
- mvaddch(y, x + MAXIMUM(w, 0), ']');
|
||||
- w--;
|
||||
- attrset(CRT_colors[RESET_COLOR]);
|
||||
+ if (w >= 1) {
|
||||
+ x += captionLen + 1;
|
||||
w--;
|
||||
}
|
||||
+ w--;
|
||||
+ }
|
||||
|
||||
x++;
|
||||
|
||||
@@ -119,7 +115,6 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
goto end;
|
||||
@@ -93,6 +91,8 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
return;
|
||||
}
|
||||
attrset(CRT_colors[RESET_COLOR]); // Clear the bold attribute
|
||||
- x++;
|
||||
|
||||
+ attrset(CRT_colors[RESET_COLOR]); // Clear the bold attribute
|
||||
+
|
||||
// The text in the bar is right aligned;
|
||||
// Pad with maximal spaces and then calculate needed starting position offset
|
||||
RichString_begin(bar);
|
||||
--
|
||||
2.51.0
|
||||
|
||||
|
||||
Loading…
Reference in new issue