summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-08 14:55:30 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-08 14:55:30 +0300
commit5267e0262be966b2c9da3d42f73a657bc77339d4 (patch)
tree74cb1a6d66107be4021e3cf1099036861c24895a
parentmacOs: Add missing border on the TopBar (diff)
downloadnheko-5267e0262be966b2c9da3d42f73a657bc77339d4.tar.xz
Remove custom stylesheet for qmenu
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/ui/Menu.h21
2 files changed, 6 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 703a6156..741f4ae4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -314,6 +314,7 @@ qt5_wrap_cpp(MOC_HEADERS
     src/ui/FlatButton.h
     src/ui/Label.h
     src/ui/FloatingButton.h
+    src/ui/Menu.h
     src/ui/OverlayWidget.h
     src/ui/ScrollBar.h
     src/ui/SnackBar.h
diff --git a/src/ui/Menu.h b/src/ui/Menu.h
index 4c2a3c68..d0427851 100644
--- a/src/ui/Menu.h
+++ b/src/ui/Menu.h
@@ -6,27 +6,16 @@
 
 class Menu : public QMenu
 {
+        Q_OBJECT
 public:
         Menu(QWidget *parent = nullptr)
-          : QMenu(parent)
-        {
-                QFont font;
-                font.setPixelSize(conf::fontSize);
-
-                setFont(font);
-                setStyleSheet(
-                  "QMenu { color: black; background-color: white; margin: 0px;}"
-                  "QMenu::item {"
-                  "color: black; padding: 7px 20px; border: 1px solid transparent;"
-                  "margin: 2px 0px; }"
-                  "QMenu::item:selected { color: black; background: rgba(180, 180, 180, 100); }");
-        };
+          : QMenu(parent){};
 
 protected:
-        void leaveEvent(QEvent *e)
+        void leaveEvent(QEvent *e) override
         {
-                Q_UNUSED(e);
-
                 hide();
+
+                QMenu::leaveEvent(e);
         }
 };