Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions normcap/gui/menu_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
)
}
QMenu::item {
padding: 3px 16px 3px 16px;
padding: 3px 22px 3px 28px;
background-color: transparent;
right: 10px;
color: white;
}
QMenu::item:disabled {
Expand All @@ -41,7 +40,17 @@
background-color: rgba(150,150,150,0.5);
}
QMenu::indicator {
right: -5px;
width: 11px;
height: 11px;
left: 8px;
}
QMenu::indicator:unchecked {
border: 1px solid rgba(255,255,255,0.6);
background-color: transparent;
}
QMenu::indicator:checked {
border: 1px solid $COLOR;
background-color: $COLOR;
}
QMenu::left-arrow,
QMenu::right-arrow {
Expand Down
7 changes: 7 additions & 0 deletions tests/tests_gui/test_menu_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ def test_settings_group(menu_btn):
assert setting_value == action.isChecked()


def test_menu_has_visible_check_indicators(menu_btn):
stylesheet = menu_btn.menu().styleSheet()

assert "QMenu::indicator:checked" in stylesheet
assert "QMenu::indicator:unchecked" in stylesheet


def test_show_message_box(qapp, monkeypatch, menu_btn):
# GIVEN a menu button and a mocked QMessageBox.exec() method
exec_args = []
Expand Down