summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-08-27 09:36:56 +1000
committerNathan Scott <nathans@redhat.com>2020-08-27 09:36:56 +1000
commit4a8ae4b5d45adbe541f46a717f416a78a6a0f441 (patch)
tree3ee82b2af2ab3d38b6e4b07f3994516aac72f742
parentdf7e4fcdc0f36d2d1fc3941c0e68a72620c68a0f (diff)
parent94b8c2e714e740639f0c345e9df5b6de7cbe966a (diff)
Merge branch 'bertwesarg-affinity-fix-panel-width'3.0.0
-rw-r--r--Action.c1
-rw-r--r--AffinityPanel.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/Action.c b/Action.c
index 363c2b98..d9cc5abf 100644
--- a/Action.c
+++ b/Action.c
@@ -320,6 +320,7 @@ static Htop_Reaction actionSetAffinity(State* st) {
if (!affinity1) return HTOP_OK;
int width;
Panel* affinityPanel = AffinityPanel_new(st->pl, affinity1, &width);
+ width += 1; /* we add a gap between the panels */
Affinity_delete(affinity1);
void* set = Action_pickFromVector(st, affinityPanel, width, true);
diff --git a/AffinityPanel.c b/AffinityPanel.c
index 7accb2ab..e95b381e 100644
--- a/AffinityPanel.c
+++ b/AffinityPanel.c
@@ -352,7 +352,9 @@ Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity, int* width) {
Panel_init(super, 1, 1, 1, 1, Class(MaskItem), false, FunctionBar_new(AffinityPanelFunctions, AffinityPanelKeys, AffinityPanelEvents));
this->pl = pl;
- this->width = 15;
+ /* defaults to 15, this also includes the gap between the panels,
+ * but this will be added by the caller */
+ this->width = 14;
this->cpuids = Vector_new(Class(MaskItem), true, DEFAULT_SIZE);

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