diff --git a/src/app/MenuBar.cpp b/src/app/MenuBar.cpp index 01a71f83..2961ec14 100644 --- a/src/app/MenuBar.cpp +++ b/src/app/MenuBar.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -1057,12 +1058,12 @@ struct HelpButton : MenuButton { // MenuBar //////////////////// -struct MeterLabel : widget::OpaqueWidget { - void draw(const DrawArgs& args) override { +struct MeterLabel : ui::Label { + void step() override { double meterAverage = APP->engine->getMeterAverage(); double meterMax = APP->engine->getMeterMax(); - std::string text = string::f("%.1f%% avg / %.1f%% max", meterAverage * 100, meterMax * 100); - bndMenuLabel(args.vg, 0.0, 0.0, box.size.x, box.size.y, -1, text.c_str()); + text = string::f("%.1f%% avg / %.1f%% max", meterAverage * 100, meterMax * 100); + Label::step(); } }; @@ -1110,6 +1111,8 @@ struct MenuBar : widget::OpaqueWidget { meterLabel = new MeterLabel; meterLabel->box.pos.y = margin; meterLabel->box.size.x = 160; + meterLabel->alignment = ui::Label::RIGHT_ALIGNMENT; + meterLabel->color.a = 0.5; addChild(meterLabel); } @@ -1121,7 +1124,7 @@ struct MenuBar : widget::OpaqueWidget { } void step() override { - meterLabel->box.pos.x = box.size.x - meterLabel->box.size.x; + meterLabel->box.pos.x = box.size.x - meterLabel->box.size.x - 5; Widget::step(); } }; diff --git a/src/ui/Label.cpp b/src/ui/Label.cpp index a95e1546..73e6c6f3 100644 --- a/src/ui/Label.cpp +++ b/src/ui/Label.cpp @@ -7,7 +7,7 @@ namespace ui { Label::Label() { box.size.y = BND_WIDGET_HEIGHT; - fontSize = 13; + fontSize = 11; color = bndGetTheme()->regularTheme.textColor; }