Browse Source

Clean up Module Browser's ModelBox tooltip creation.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
6ae98b6194
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      src/app/ModuleBrowser.cpp

+ 6
- 2
src/app/ModuleBrowser.cpp View File

@@ -239,7 +239,7 @@ struct ModelBox : widget::OpaqueWidget {
}
}

void onEnter(const EnterEvent& e) override {
ui::Tooltip* createTooltip() {
std::string text;
text = model->plugin->brand;
text += " " + model->name;
@@ -257,7 +257,11 @@ struct ModelBox : widget::OpaqueWidget {
}
ui::Tooltip* tooltip = new ui::Tooltip;
tooltip->text = text;
setTooltip(tooltip);
return tooltip;
}

void onEnter(const EnterEvent& e) override {
setTooltip(createTooltip());
}

void onLeave(const LeaveEvent& e) override {


Loading…
Cancel
Save