Skip to content

Commit

Permalink
Improve checkbox colors (use accent color)
Browse files Browse the repository at this point in the history
and darken view hover/selected colors to play nicer with other widget colors

See #52
  • Loading branch information
ColinDuquesnoy committed May 13, 2017
1 parent f0ed7ba commit 8e0899e
Show file tree
Hide file tree
Showing 12 changed files with 1,554 additions and 1,662 deletions.
4 changes: 4 additions & 0 deletions example/example_pyqt.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ def main():
ui.actionAction,
ui.actionAction_C
])
item = QtGui.QTableWidgetItem("Test")
item.setCheckState(QtCore.Qt.Checked)
ui.tableWidget.setItem(0, 0, item)
window.setWindowTitle("QDarkStyle example")
window.setWindowTitle("QDarkStyle example")

# tabify dock widgets to show bug #6
Expand Down
3 changes: 3 additions & 0 deletions example/example_pyqt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def main():
ui.actionAction,
ui.actionAction_C
])
item = QtWidgets.QTableWidgetItem("Test")
item.setCheckState(QtCore.Qt.Checked)
ui.tableWidget.setItem(0, 0, item)
window.setWindowTitle("QDarkStyle example")

# tabify dock widgets to show bug #6
Expand Down
5 changes: 5 additions & 0 deletions example/example_pyside.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ def main():
ui.actionAction,
ui.actionAction_C
])

item = QtGui.QTableWidgetItem("Test")
item.setCheckState(QtCore.Qt.Checked)
ui.tableWidget.setItem(0, 0, item)
window.setWindowTitle("QDarkStyle example")
window.setWindowTitle("QDarkStyle example")

# tabify dock widgets to show bug #6
Expand Down
2,208 changes: 1,074 additions & 1,134 deletions qdarkstyle/pyqt5_style_rc.py

Large diffs are not rendered by default.

976 changes: 458 additions & 518 deletions qdarkstyle/pyqt_style_rc.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions qdarkstyle/pyside_style_rc.py

Large diffs are not rendered by default.

Binary file modified qdarkstyle/rc/checkbox_checked_focus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified qdarkstyle/rc/checkbox_indeterminate_focus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified qdarkstyle/rc/checkbox_unchecked_focus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified qdarkstyle/rc/radio_checked_focus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified qdarkstyle/rc/radio_unchecked_focus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions qdarkstyle/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ QWidget

QWidget:item:hover
{
background-color: #3daee9;
background-color: #18465d;
color: #eff0f1;
}

QWidget:item:selected
{
background-color: #3daee9;
background-color: #18465d;
}

QCheckBox
Expand Down Expand Up @@ -662,7 +662,7 @@ QComboBox QAbstractItemView
background-color: #232629;
border-radius: 2px;
border: 1px solid #76797C;
selection-background-color: #3daee9;
selection-background-color: #18465d;
}

QComboBox::drop-down
Expand Down Expand Up @@ -969,13 +969,13 @@ QTreeView::branch:open:has-children:has-siblings:hover {
}

QListView::item:!selected:hover, QTreeView::item:!selected:hover {
background: rgba(167,218,245, 0.3);
background: #18465d;
outline: 0;
color: #eff0f1
}

QListView::item:selected:hover, QTreeView::item:selected:hover {
background: #3daee9;
background: #287399;
color: #eff0f1;
}

Expand Down Expand Up @@ -1090,12 +1090,12 @@ QTableView, QHeaderView
}

QTableView::item:pressed, QListView::item:pressed, QTreeView::item:pressed {
background: #3daee9;
background: #18465d;
color: #eff0f1;
}

QTableView::item:selected:active, QTreeView::item:selected:active, QListView::item:selected:active {
background: #3daee9;
background: #287399;
color: #eff0f1;
}

Expand Down

0 comments on commit 8e0899e

Please sign in to comment.