[NV14] Fix mix channel monitor size (#1231)

* fix mix channel monitor size on nv14

* add right margin to mix channel monitor on nv14

* Rebase and revert libopenui change

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
Kevin Koenig
2021-12-12 19:27:36 +11:00
committed by GitHub
co-authored by Peter Feerick
parent d6e1213554
commit af87e2e365
+13 -2
View File
@@ -58,6 +58,17 @@ bool reachMixesLimit()
return false;
}
#if (LCD_W > LCD_H)
#define MIX_STATUS_BAR_WIDTH 250
#define MIX_STATUS_BAR_MARGIN 3
#define MIX_RIGHT_MARGIN 0
#else
#define MIX_STATUS_BAR_WIDTH 180
#define MIX_STATUS_BAR_MARGIN 0
#define MIX_RIGHT_MARGIN 3
#endif
class MixerEditStatusBar : public Window
{
public:
@@ -65,7 +76,7 @@ class MixerEditStatusBar : public Window
Window(parent, rect),
_channel(channel)
{
channelBar = new ComboChannelBar(this, {3, 0, rect.w - 6, rect.h}, channel);
channelBar = new ComboChannelBar(this, {MIX_STATUS_BAR_MARGIN, 0, rect.w - (MIX_STATUS_BAR_MARGIN * 2), rect.h}, channel);
channelBar->setLeftMargin(0);
channelBar->setTextColor(COLOR_THEME_PRIMARY2);
channelBar->setOutputChannelBarLimitColor(COLOR_THEME_EDIT);
@@ -109,7 +120,7 @@ class MixEditWindow : public Page
getSourceString(MIXSRC_CH1 + channel), 0, COLOR_THEME_PRIMARY2);
statusBar = new MixerEditStatusBar(
window, {window->getRect().w - 250, 0, 250, MENU_HEADER_HEIGHT + 3},
window, {window->getRect().w - MIX_STATUS_BAR_WIDTH - MIX_RIGHT_MARGIN, 0, MIX_STATUS_BAR_WIDTH, MENU_HEADER_HEIGHT + 3},
channel);
}