Transmitter config widget

Frequency manager duplicate alert
Tone sets
This commit is contained in:
furrtek 2017-01-30 13:10:30 +00:00
parent 0642d633c3
commit 688a012443
29 changed files with 759 additions and 203 deletions

View file

@ -44,6 +44,8 @@ void MenuItemView::unhighlight() {
}
void MenuItemView::paint(Painter& painter) {
Coord offset_x;
const auto r = screen_rect();
const auto paint_style = (highlighted() && (parent()->has_focus() || keep_highlight_)) ? style().invert() : style();
@ -67,7 +69,9 @@ void MenuItemView::paint(Painter& painter) {
final_item_color,
final_bg_color
);
}
offset_x = 26;
} else
offset_x = 8;
Style text_style {
.font = paint_style.font,
@ -76,7 +80,7 @@ void MenuItemView::paint(Painter& painter) {
};
painter.draw_string(
{ r.location().x() + 26, r.location().y() + (r.size().height() - font_height) / 2 },
{ r.location().x() + offset_x, r.location().y() + (r.size().height() - font_height) / 2 },
text_style,
item.text
);