blob: 2029b1fde170a1b34b57da53b2d7a0a7c21d53c6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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();
}
};
|