Skip to content

Commit

Permalink
[themes] Fix checkbox styled as enabled within disabled table and tre…
Browse files Browse the repository at this point in the history
…e widgets
  • Loading branch information
nirvn authored and github-actions[bot] committed Oct 27, 2023
1 parent d45af7d commit 3898ae9
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 4 deletions.
20 changes: 19 additions & 1 deletion resources/themes/Blend of Gray/style.qss
Expand Up @@ -903,9 +903,15 @@ QAbstractItemView::selected, QListView::selected {
QAbstractItemView::indicator:checked, QListView::indicator:checked {
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
}
QAbstractItemView::indicator:checked:disabled, QListView::indicator:checked:disabled {
image: url(@theme_path/icons/qcheckbox-checked-disabled.svg);
}
QAbstractItemView::indicator:unchecked, QListView::indicator:unchecked {
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
}
QAbstractItemView::indicator:unchecked:disabled, QListView::indicator:unchecked:disabled {
image: url(@theme_path/icons/qcheckbox-unchecked-disabled.svg);
}

/* ==================================================================================== */
/* TREE VIEW */
Expand Down Expand Up @@ -952,11 +958,17 @@ QTreeView::indicator:intermediary {
image: url(@theme_path/icons/qcheckbox-intermediary.svg);
}
QTreeView::indicator:checked {
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
image: url(@theme_path/icons/qcheckbox-checked.svg);
}
QTreeView::indicator:checked:disabled {
image: url(@theme_path/icons/qcheckbox-checked-disabled.svg);
}
QTreeView::indicator:unchecked {
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
}
QTreeView::indicator:unchecked:disabled {
image: url(@theme_path/icons/qcheckbox-unchecked-disabled.svg);
}

QgsLayerTreeView::item,
QTreeView#viewGraduated::item,
Expand Down Expand Up @@ -1010,9 +1022,15 @@ QTableView::indicator:intermediary {
QTableView::indicator:checked {
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
}
QTableView::indicator:checked:disabled {
image: url(@theme_path/icons/qcheckbox-checked-disabled.svg);
}
QTableView::indicator:unchecked {
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
}
QTableView::indicator:unchecked:disabled {
image: url(@theme_path/icons/qcheckbox-unchecked-disabled.svg);
}

QTableView QTableCornerButton::section {
background-color: @background;
Expand Down
44 changes: 41 additions & 3 deletions resources/themes/Night Mapping/style.qss
Expand Up @@ -902,9 +902,18 @@ QAbstractItemView::indicator:checked, QListView::indicator:checked {
border: 1px solid @background;
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
}
QAbstractItemView::indicator:checked:disabled, QListView::indicator:checked:disabled {
image: url(@theme_path/icons/qcheckbox-checked.svg);
border-color: @itemdarkbackground;
background-color: rgba(0, 0, 0, 0);
}
QAbstractItemView::indicator:unchecked, QListView::indicator:unchecked {
border: 1px solid @background;
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
}
QAbstractItemView::indicator:unchecked:disabled, QListView::indicator:unchecked:disabled {
border-color: @itemdarkbackground;
background-color: rgba(0, 0, 0, 0);
background-color: rgba(0, 0, 0, 0);
}

/* ==================================================================================== */
Expand Down Expand Up @@ -948,6 +957,10 @@ QTreeView::indicator {
width:0.8em;
height:0.8em;
}
QTreeView::indicator:disabled {
border-color: @itemdarkbackground;
background-color: rgba(0, 0, 0, 0);
}
QTreeView::indicator:intermediary {
background-color: @toggleoff;
image: url(@theme_path/icons/qcheckbox-intermediary.svg);
Expand All @@ -956,10 +969,21 @@ QTreeView::indicator:checked {
background-color: @toggleon;
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
}
QTreeView::indicator:checked:disabled {
image: url(@theme_path/icons/qcheckbox-checked.svg);
border-color: @itemdarkbackground;
background-color: rgba(0, 0, 0, 0);
}
QTreeView::indicator:unchecked {
background-color: @toggleoff;
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
image: none;
}
QTreeView::indicator:unchecked:disabled {
border-color: @itemdarkbackground;
background-color: rgba(0, 0, 0, 0);
image: none;
}


QgsLayerTreeView::item,
QTreeView#viewGraduated::item,
Expand Down Expand Up @@ -1031,6 +1055,10 @@ QTableView::indicator {
width:0.8em;
height:0.8em;
}
QTableView::indicator:disabled {
border-color: @itemdarkbackground;
background-color: rgba(0, 0, 0, 0);
}
QTableView::indicator:intermediary {
background-color: @toggleoff;
image: url(@theme_path/icons/qcheckbox-intermediary.svg);
Expand All @@ -1039,9 +1067,19 @@ QTableView::indicator:checked {
background-color: @toggleon;
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
}
QTableView::indicator:checked:disabled {
image: url(@theme_path/icons/qcheckbox-checked.svg);
border-color: @itemdarkbackground;
background-color: rgba(0, 0, 0, 0);
}
QTableView::indicator:unchecked {
background-color: @toggleoff;
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
image: none;
}
QTableView::indicator:unchecked:disabled {
border-color: @itemdarkbackground;
background-color: rgba(0, 0, 0, 0);
image: none;
}

QTableView QTableCornerButton::section {
Expand Down

0 comments on commit 3898ae9

Please sign in to comment.