mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Remove custom stylesheet for qmenu
This commit is contained in:
parent
0588cb3dbf
commit
5267e0262b
2 changed files with 6 additions and 16 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue