fix(color): mixes list view not resizing when mixer monitors enabled (#4931)

This commit is contained in:
philmoz
2024-04-28 15:00:45 +10:00
committed by GitHub
parent d7d9d925f4
commit 8dfa467731
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ class InputMixGroupBase : public Window
mixsrc_t getMixSrc() { return idx; }
size_t getLineCount() { return lines.size(); }
void adjustHeight();
virtual void adjustHeight();
void addLine(InputMixButtonBase* line);
bool removeLine(InputMixButtonBase* line);
+11
View File
@@ -205,6 +205,17 @@ class MixGroup : public InputMixGroupBase
adjustHeight();
}
void adjustHeight() override
{
coord_t y = monitorVisible ? 17 : 2;
for (auto it = lines.cbegin(); it != lines.cend(); ++it) {
auto line = *it;
line->updatePos(LN_X, y);
y += line->height() + 2;
}
setHeight(y + 4);
}
protected:
MixerChannelBar* monitor = nullptr;
bool monitorVisible = false;