Make fonts consistent on knobs and labels

This commit is contained in:
Jean Pierre Cimalando 2021-04-13 22:12:24 +02:00
parent 2a0101675d
commit 95188b14f5
3 changed files with 11 additions and 6 deletions

View file

@ -212,7 +212,7 @@ widget_class mainView {open
}
}
}
Fl_Group {subPanels_[kPanelControls]} {
Fl_Group {subPanels_[kPanelControls]} {open
xywh {5 110 790 285} hide
class LogicalGroup
} {
@ -220,8 +220,8 @@ widget_class mainView {open
xywh {5 110 790 285} box ROUNDED_BOX
class RoundedGroup
} {
Fl_Group controlsPanel_ {open
xywh {5 110 790 285} box THIN_DOWN_FRAME
Fl_Group controlsPanel_ {selected
xywh {5 110 790 285} box THIN_DOWN_FRAME labelsize 12
class ControlsPanel
} {}
}
@ -351,7 +351,7 @@ widget_class mainView {open
class ValueLabel
}
Fl_Spinner oscillatorQualitySlider_ {
comment {tag=kTagSetOscillatorQuality} selected
comment {tag=kTagSetOscillatorQuality}
xywh {630 195 80 25} labelsize 12 textsize 12
class ValueMenu
}

View file

@ -876,6 +876,7 @@ void Editor::Impl::createFrameContents()
box->setNameLabelFont(font);
box->setKnobFont(font);
box->setCCLabelText(label);
box->setCCLabelFont(font);
OnThemeChanged.push_back([box, palette]() {
box->setNameLabelFontColor(palette->knobText);
box->setCCLabelFontColor(palette->knobLabelText);
@ -896,8 +897,12 @@ void Editor::Impl::createFrameContents()
container->setBackground(background);
return container;
};
auto createControlsPanel = [this, &palette](const CRect& bounds, int, const char*, CHoriTxtAlign, int) {
auto createControlsPanel = [this, &palette](const CRect& bounds, int, const char*, CHoriTxtAlign, int fontsize) {
auto* panel = new SControlsPanel(bounds);
auto font = makeOwned<CFontDesc>("Roboto", fontsize);
panel->setNameLabelFont(font);
panel->setKnobFont(font);
panel->setCCLabelFont(font);
OnThemeChanged.push_back([panel, palette]() {
panel->setNameLabelFontColor(palette->knobText);
panel->setCCLabelFontColor(palette->knobLabelText);

View file

@ -115,7 +115,7 @@ view__0->addView(view__43);
view__43->setVisible(false);
auto* const view__44 = createRoundedGroup(CRect(0, 0, 790, 285), -1, "", kCenterText, 14);
view__43->addView(view__44);
auto* const view__45 = createControlsPanel(CRect(0, 0, 790, 285), -1, "", kCenterText, 14);
auto* const view__45 = createControlsPanel(CRect(0, 0, 790, 285), -1, "", kCenterText, 12);
controlsPanel_ = view__45;
view__44->addView(view__45);
auto* const view__46 = createLogicalGroup(CRect(5, 109, 795, 425), -1, "", kCenterText, 14);