Merge pull request #78 from Alexhuszagh/menubar_hover

Fix hover styling on QMenuBar.
main
Alexander Huszagh 2022-12-08 16:14:13 -06:00 committed by GitHub
commit 5f45edebed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 6029 additions and 6038 deletions

File diff suppressed because it is too large Load Diff

View File

@ -347,6 +347,7 @@ QMenuBar::item
QMenuBar::item:selected QMenuBar::item:selected
{ {
background: transparent; background: transparent;
border: 0.04em solid #3daee9;
} }
QMenuBar::item:disabled QMenuBar::item:disabled
@ -467,11 +468,6 @@ QAbstractItemView
border-radius: 0.09em; border-radius: 0.09em;
} }
QMenuBar::item:focus:!disabled
{
border: 0.04em solid #3daee9;
}
QTabWidget:focus, QTabWidget:focus,
QCheckBox:focus, QCheckBox:focus,
QRadioButton:focus, QRadioButton:focus,

View File

@ -347,6 +347,7 @@ QMenuBar::item
QMenuBar::item:selected QMenuBar::item:selected
{ {
background: transparent; background: transparent;
border: 0.04em solid rgba(51, 164, 223, 0.5);
} }
QMenuBar::item:disabled QMenuBar::item:disabled
@ -467,11 +468,6 @@ QAbstractItemView
border-radius: 0.09em; border-radius: 0.09em;
} }
QMenuBar::item:focus:!disabled
{
border: 0.04em solid rgba(51, 164, 223, 0.5);
}
QTabWidget:focus, QTabWidget:focus,
QCheckBox:focus, QCheckBox:focus,
QRadioButton:focus, QRadioButton:focus,

View File

@ -347,6 +347,7 @@ QMenuBar::item
QMenuBar::item:selected QMenuBar::item:selected
{ {
background: transparent; background: transparent;
border: 0.04em solid #3daee9;
} }
QMenuBar::item:disabled QMenuBar::item:disabled
@ -467,11 +468,6 @@ QAbstractItemView
border-radius: 0.09em; border-radius: 0.09em;
} }
QMenuBar::item:focus:!disabled
{
border: 0.04em solid #3daee9;
}
QTabWidget:focus, QTabWidget:focus,
QCheckBox:focus, QCheckBox:focus,
QRadioButton:focus, QRadioButton:focus,

View File

@ -347,6 +347,7 @@ QMenuBar::item
QMenuBar::item:selected QMenuBar::item:selected
{ {
background: transparent; background: transparent;
border: 0.04em solid rgba(51, 164, 223, 0.5);
} }
QMenuBar::item:disabled QMenuBar::item:disabled
@ -467,11 +468,6 @@ QAbstractItemView
border-radius: 0.09em; border-radius: 0.09em;
} }
QMenuBar::item:focus:!disabled
{
border: 0.04em solid rgba(51, 164, 223, 0.5);
}
QTabWidget:focus, QTabWidget:focus,
QCheckBox:focus, QCheckBox:focus,
QRadioButton:focus, QRadioButton:focus,

View File

@ -347,6 +347,7 @@ QMenuBar::item
QMenuBar::item:selected QMenuBar::item:selected
{ {
background: transparent; background: transparent;
border: 0.04em solid ^highlight^;
} }
QMenuBar::item:disabled QMenuBar::item:disabled
@ -467,11 +468,6 @@ QAbstractItemView
border-radius: 0.09em; border-radius: 0.09em;
} }
QMenuBar::item:focus:!disabled
{
border: 0.04em solid ^highlight^;
}
QTabWidget:focus, QTabWidget:focus,
QCheckBox:focus, QCheckBox:focus,
QRadioButton:focus, QRadioButton:focus,

View File

@ -341,6 +341,17 @@ def test_menu(widget, window, font, width, *_):
child.addAction(menu.menuAction()) child.addAction(menu.menuAction())
window.setMenuBar(child) window.setMenuBar(child)
file = QtWidgets.QMenu('File', child)
file.addAction(compat.QAction('&Open', window))
file.addAction(compat.QAction('&Close', window))
child.addAction(file.menuAction())
edit = QtWidgets.QMenu('Edit', child)
edit.addAction(compat.QAction('&Cut', window))
edit.addAction(compat.QAction('&Copy', window))
edit.addAction(compat.QAction('&Paste', window))
child.addAction(edit.menuAction())
return child return child
def _menu(window, font, width): def _menu(window, font, width):