diff --git a/normcap/gui/menu_button.py b/normcap/gui/menu_button.py index 94df349fe..b62b41534 100644 --- a/normcap/gui/menu_button.py +++ b/normcap/gui/menu_button.py @@ -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 { @@ -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 { diff --git a/tests/tests_gui/test_menu_button.py b/tests/tests_gui/test_menu_button.py index 7d8e98d41..3bd49e360 100644 --- a/tests/tests_gui/test_menu_button.py +++ b/tests/tests_gui/test_menu_button.py @@ -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 = []