Fix highlighting of QGroupBox checkbox.

Fix the highlighting of an unchecked QGroupBox when it is not hovered or the active widget.

Closes #55.
main
Alex Huszagh 2022-05-02 17:26:31 -05:00
parent e96a0049f0
commit f5a6a9fb77
7 changed files with 4462 additions and 4446 deletions

File diff suppressed because it is too large Load Diff

View File

@ -114,12 +114,15 @@ QGroupBox::title
} }
QCheckBox::indicator, QCheckBox::indicator,
QTreeView::indicator QTreeView::indicator,
QGroupBox::indicator
{ {
width: 1em; width: 1em;
height: 1em; height: 1em;
} }
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:focus,
QCheckBox::indicator:unchecked, QCheckBox::indicator:unchecked,
QCheckBox::indicator:unchecked:focus, QCheckBox::indicator:unchecked:focus,
QTreeView::indicator:unchecked, QTreeView::indicator:unchecked,
@ -128,13 +131,12 @@ QTreeView::indicator:unchecked:focus
border-image: url(dark:checkbox_unchecked_disabled.svg); border-image: url(dark:checkbox_unchecked_disabled.svg);
} }
QGroupBox::indicator:unchecked,
QCheckBox::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover,
QCheckBox::indicator:unchecked:pressed, QCheckBox::indicator:unchecked:pressed,
QTreeView::indicator:unchecked:hover, QTreeView::indicator:unchecked:hover,
QTreeView::indicator:unchecked:pressed, QTreeView::indicator:unchecked:pressed,
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:hover, QGroupBox::indicator:unchecked:hover,
QGroupBox::indicator:unchecked:focus,
QGroupBox::indicator:unchecked:pressed QGroupBox::indicator:unchecked:pressed
{ {
border: none; border: none;

View File

@ -114,12 +114,15 @@ QGroupBox::title
} }
QCheckBox::indicator, QCheckBox::indicator,
QTreeView::indicator QTreeView::indicator,
QGroupBox::indicator
{ {
width: 1em; width: 1em;
height: 1em; height: 1em;
} }
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:focus,
QCheckBox::indicator:unchecked, QCheckBox::indicator:unchecked,
QCheckBox::indicator:unchecked:focus, QCheckBox::indicator:unchecked:focus,
QTreeView::indicator:unchecked, QTreeView::indicator:unchecked,
@ -128,13 +131,12 @@ QTreeView::indicator:unchecked:focus
border-image: url(light:checkbox_unchecked_disabled.svg); border-image: url(light:checkbox_unchecked_disabled.svg);
} }
QGroupBox::indicator:unchecked,
QCheckBox::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover,
QCheckBox::indicator:unchecked:pressed, QCheckBox::indicator:unchecked:pressed,
QTreeView::indicator:unchecked:hover, QTreeView::indicator:unchecked:hover,
QTreeView::indicator:unchecked:pressed, QTreeView::indicator:unchecked:pressed,
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:hover, QGroupBox::indicator:unchecked:hover,
QGroupBox::indicator:unchecked:focus,
QGroupBox::indicator:unchecked:pressed QGroupBox::indicator:unchecked:pressed
{ {
border: none; border: none;

View File

@ -114,12 +114,15 @@ QGroupBox::title
} }
QCheckBox::indicator, QCheckBox::indicator,
QTreeView::indicator QTreeView::indicator,
QGroupBox::indicator
{ {
width: 1em; width: 1em;
height: 1em; height: 1em;
} }
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:focus,
QCheckBox::indicator:unchecked, QCheckBox::indicator:unchecked,
QCheckBox::indicator:unchecked:focus, QCheckBox::indicator:unchecked:focus,
QTreeView::indicator:unchecked, QTreeView::indicator:unchecked,
@ -128,13 +131,12 @@ QTreeView::indicator:unchecked:focus
border-image: url(:/dark/checkbox_unchecked_disabled.svg); border-image: url(:/dark/checkbox_unchecked_disabled.svg);
} }
QGroupBox::indicator:unchecked,
QCheckBox::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover,
QCheckBox::indicator:unchecked:pressed, QCheckBox::indicator:unchecked:pressed,
QTreeView::indicator:unchecked:hover, QTreeView::indicator:unchecked:hover,
QTreeView::indicator:unchecked:pressed, QTreeView::indicator:unchecked:pressed,
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:hover, QGroupBox::indicator:unchecked:hover,
QGroupBox::indicator:unchecked:focus,
QGroupBox::indicator:unchecked:pressed QGroupBox::indicator:unchecked:pressed
{ {
border: none; border: none;

View File

@ -114,12 +114,15 @@ QGroupBox::title
} }
QCheckBox::indicator, QCheckBox::indicator,
QTreeView::indicator QTreeView::indicator,
QGroupBox::indicator
{ {
width: 1em; width: 1em;
height: 1em; height: 1em;
} }
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:focus,
QCheckBox::indicator:unchecked, QCheckBox::indicator:unchecked,
QCheckBox::indicator:unchecked:focus, QCheckBox::indicator:unchecked:focus,
QTreeView::indicator:unchecked, QTreeView::indicator:unchecked,
@ -128,13 +131,12 @@ QTreeView::indicator:unchecked:focus
border-image: url(:/light/checkbox_unchecked_disabled.svg); border-image: url(:/light/checkbox_unchecked_disabled.svg);
} }
QGroupBox::indicator:unchecked,
QCheckBox::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover,
QCheckBox::indicator:unchecked:pressed, QCheckBox::indicator:unchecked:pressed,
QTreeView::indicator:unchecked:hover, QTreeView::indicator:unchecked:hover,
QTreeView::indicator:unchecked:pressed, QTreeView::indicator:unchecked:pressed,
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:hover, QGroupBox::indicator:unchecked:hover,
QGroupBox::indicator:unchecked:focus,
QGroupBox::indicator:unchecked:pressed QGroupBox::indicator:unchecked:pressed
{ {
border: none; border: none;

View File

@ -114,12 +114,15 @@ QGroupBox::title
} }
QCheckBox::indicator, QCheckBox::indicator,
QTreeView::indicator QTreeView::indicator,
QGroupBox::indicator
{ {
width: 1em; width: 1em;
height: 1em; height: 1em;
} }
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:focus,
QCheckBox::indicator:unchecked, QCheckBox::indicator:unchecked,
QCheckBox::indicator:unchecked:focus, QCheckBox::indicator:unchecked:focus,
QTreeView::indicator:unchecked, QTreeView::indicator:unchecked,
@ -128,13 +131,12 @@ QTreeView::indicator:unchecked:focus
border-image: url(^style^checkbox_unchecked_disabled.svg); border-image: url(^style^checkbox_unchecked_disabled.svg);
} }
QGroupBox::indicator:unchecked,
QCheckBox::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover,
QCheckBox::indicator:unchecked:pressed, QCheckBox::indicator:unchecked:pressed,
QTreeView::indicator:unchecked:hover, QTreeView::indicator:unchecked:hover,
QTreeView::indicator:unchecked:pressed, QTreeView::indicator:unchecked:pressed,
QGroupBox::indicator:unchecked,
QGroupBox::indicator:unchecked:hover, QGroupBox::indicator:unchecked:hover,
QGroupBox::indicator:unchecked:focus,
QGroupBox::indicator:unchecked:pressed QGroupBox::indicator:unchecked:pressed
{ {
border: none; border: none;

View File

@ -1677,7 +1677,11 @@ def test_frame(widget, *_):
def test_groupbox(widget, *_): def test_groupbox(widget, *_):
child = [] child = []
child.append(QtWidgets.QGroupBox('Groupbox 1', widget)) groupbox = QtWidgets.QGroupBox('Groupbox 1', widget)
vbox1 = QtWidgets.QVBoxLayout(groupbox)
vbox1.setAlignment(AlignHCenter)
vbox1.addWidget(QtWidgets.QLineEdit('Sample Label'))
child.append(groupbox)
checkable = QtWidgets.QGroupBox('Groupbox 2', widget) checkable = QtWidgets.QGroupBox('Groupbox 2', widget)
checkable.setCheckable(True) checkable.setCheckable(True)
child.append(checkable) child.append(checkable)