Fix occasional menu crash

pull/7/head
rekols 5 years ago
parent e3b7b56b2b
commit 5273300134

@ -65,8 +65,8 @@ ControlCenterDialog {
id: _background
anchors.fill: parent
radius: control.height * 0.05
color: FishUI.Theme.darkMode ? "#5E5E5E" : "#FFFFFF"
opacity: FishUI.Theme.darkMode ? 0.5 : 0.6
color: FishUI.Theme.darkMode ? "#828286" : "#FFFFFF"
opacity: FishUI.Theme.darkMode ? 0.5 : 0.7
antialiasing: true
border.width: 0
}

@ -15,8 +15,8 @@ Item {
Rectangle {
id: background
anchors.fill: parent
color: FishUI.Theme.backgroundColor
opacity: FishUI.Theme.darkMode ? 0.6 : 0.7
color: FishUI.Theme.darkMode ? "#828286" : "#FFFFFF"
opacity: FishUI.Theme.darkMode ? 0.5 : 0.7
Behavior on color {
ColorAnimation {

@ -132,10 +132,9 @@ void StatusNotifierItemSource::scroll(int delta, const QString &direction)
void StatusNotifierItemSource::contextMenu(int x, int y)
{
if (m_menuImporter) {
m_menuImporter->updateMenu();
// Popup menu
if (m_menuImporter->menu()) {
m_menuImporter->updateMenu();
m_menuImporter->menu()->popup(QPoint(x, y));
}
} else {
@ -148,8 +147,10 @@ void StatusNotifierItemSource::contextMenu(int x, int y)
void StatusNotifierItemSource::contextMenuReady()
{
if (m_menuImporter && m_menuImporter->menu()) {
emit contextMenuReady(m_menuImporter->menu());
}
}
void StatusNotifierItemSource::refreshTitle()
{

Loading…
Cancel
Save