修改右键菜单适配最新主题
This commit is contained in:
parent
695c85536d
commit
027149137e
|
|
@ -8,8 +8,9 @@ CustomMenu::CustomMenu(QWidget* parent)
|
||||||
setStyleSheet("QMenu{\n"
|
setStyleSheet("QMenu{\n"
|
||||||
" margin:2px;\n"
|
" margin:2px;\n"
|
||||||
" padding:2px;\n"
|
" padding:2px;\n"
|
||||||
" background-color:white;\n"
|
" color:rgb(240, 240, 240);\n"
|
||||||
" border:1px solid #bbbbbb;\n"
|
" background-color:rgb(30, 30, 30);\n"
|
||||||
|
" border:1px solid rgb(50, 50, 50);\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
"QMenu:item{\n"
|
"QMenu:item{\n"
|
||||||
" height:21px;\n"
|
" height:21px;\n"
|
||||||
|
|
@ -18,8 +19,17 @@ CustomMenu::CustomMenu(QWidget* parent)
|
||||||
" padding-left:15px;\n"
|
" padding-left:15px;\n"
|
||||||
" padding-right:15px;\n"
|
" padding-right:15px;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
|
"QMenu:item:disabled{\n"
|
||||||
|
" color:rgb(140, 140, 140);\n"
|
||||||
|
"}\n"
|
||||||
|
"QMenu::separator{\n"
|
||||||
|
" height:1px;\n"
|
||||||
|
" background:rgb(140, 140, 140);\n"
|
||||||
|
" margin-left:1px;\n"
|
||||||
|
" margin-right:1px;\n"
|
||||||
|
"}\n"
|
||||||
"QMenu:item:selected{\n"
|
"QMenu:item:selected{\n"
|
||||||
" background-color:rgb(211,241,250);\n"
|
" background-color: rgba(49, 91, 125, 180);\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
//设置阴影
|
//设置阴影
|
||||||
QGraphicsDropShadowEffect* shadow = new QGraphicsDropShadowEffect(this);
|
QGraphicsDropShadowEffect* shadow = new QGraphicsDropShadowEffect(this);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue