fix(color): Don't display long press widget menu if no options (#4263)
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
@@ -58,6 +58,7 @@ Widget::Widget(const WidgetFactory* factory, Window* parent,
|
|||||||
|
|
||||||
void Widget::openMenu()
|
void Widget::openMenu()
|
||||||
{
|
{
|
||||||
|
if (getOptions() || fsAllowed) {
|
||||||
// Widgets are placed on a full screen window which is underneath the main view menu bar
|
// Widgets are placed on a full screen window which is underneath the main view menu bar
|
||||||
// Find the parent of this so that when the popup loads it covers the main view menu
|
// Find the parent of this so that when the popup loads it covers the main view menu
|
||||||
Window* w = parent->getFullScreenWindow()->getParent();
|
Window* w = parent->getFullScreenWindow()->getParent();
|
||||||
@@ -69,6 +70,7 @@ void Widget::openMenu()
|
|||||||
menu->addLine(STR_WIDGET_SETTINGS,
|
menu->addLine(STR_WIDGET_SETTINGS,
|
||||||
[=]() { new WidgetSettings(this, this); });
|
[=]() { new WidgetSettings(this, this); });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::paint(BitmapBuffer * dc)
|
void Widget::paint(BitmapBuffer * dc)
|
||||||
|
|||||||
Reference in New Issue
Block a user