summary refs log tree commit diff
path: root/src/ui/Menu.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 16:37:25 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-17 16:37:25 +0300
commit0e814da91c8e041897a4c3f7e6e9234bbc7c6f7a (patch)
tree21f655d30630fe77ba48d07e4b357e2b6c6a5730 /src/ui/Menu.h
parentMerge pull request #372 from bebehei/notification (diff)
downloadnheko-0e814da91c8e041897a4c3f7e6e9234bbc7c6f7a.tar.xz
Move all files under src/
Diffstat (limited to 'src/ui/Menu.h')
-rw-r--r--src/ui/Menu.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/ui/Menu.h b/src/ui/Menu.h
new file mode 100644

index 00000000..4c2a3c68 --- /dev/null +++ b/src/ui/Menu.h
@@ -0,0 +1,32 @@ +#pragma once + +#include <QMenu> + +#include "Config.h" + +class Menu : public QMenu +{ +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); }"); + }; + +protected: + void leaveEvent(QEvent *e) + { + Q_UNUSED(e); + + hide(); + } +};