Skip to content

Commit 8c8a43b

Browse files
nirvnnyalldawson
authored andcommittedOct 27, 2023
[themes] Fix checkbox styled as enabled within disabled table and tree widgets
1 parent 2f2340d commit 8c8a43b

File tree

2 files changed

+60
-4
lines changed

2 files changed

+60
-4
lines changed
 

‎resources/themes/Blend of Gray/style.qss

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,9 +902,15 @@ QAbstractItemView::selected, QListView::selected {
902902
QAbstractItemView::indicator:checked, QListView::indicator:checked {
903903
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
904904
}
905+
QAbstractItemView::indicator:checked:disabled, QListView::indicator:checked:disabled {
906+
image: url(@theme_path/icons/qcheckbox-checked-disabled.svg);
907+
}
905908
QAbstractItemView::indicator:unchecked, QListView::indicator:unchecked {
906909
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
907910
}
911+
QAbstractItemView::indicator:unchecked:disabled, QListView::indicator:unchecked:disabled {
912+
image: url(@theme_path/icons/qcheckbox-unchecked-disabled.svg);
913+
}
908914

909915
/* ==================================================================================== */
910916
/* TREE VIEW */
@@ -951,11 +957,17 @@ QTreeView::indicator:intermediary {
951957
image: url(@theme_path/icons/qcheckbox-intermediary.svg);
952958
}
953959
QTreeView::indicator:checked {
954-
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
960+
image: url(@theme_path/icons/qcheckbox-checked.svg);
961+
}
962+
QTreeView::indicator:checked:disabled {
963+
image: url(@theme_path/icons/qcheckbox-checked-disabled.svg);
955964
}
956965
QTreeView::indicator:unchecked {
957966
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
958967
}
968+
QTreeView::indicator:unchecked:disabled {
969+
image: url(@theme_path/icons/qcheckbox-unchecked-disabled.svg);
970+
}
959971

960972
QgsLayerTreeView::item,
961973
QTreeView#viewGraduated::item,
@@ -1009,9 +1021,15 @@ QTableView::indicator:intermediary {
10091021
QTableView::indicator:checked {
10101022
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
10111023
}
1024+
QTableView::indicator:checked:disabled {
1025+
image: url(@theme_path/icons/qcheckbox-checked-disabled.svg);
1026+
}
10121027
QTableView::indicator:unchecked {
10131028
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
10141029
}
1030+
QTableView::indicator:unchecked:disabled {
1031+
image: url(@theme_path/icons/qcheckbox-unchecked-disabled.svg);
1032+
}
10151033

10161034
QTableView QTableCornerButton::section {
10171035
background-color: @background;

‎resources/themes/Night Mapping/style.qss

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,18 @@ QAbstractItemView::indicator:checked, QListView::indicator:checked {
900900
border: 1px solid @background;
901901
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
902902
}
903+
QAbstractItemView::indicator:checked:disabled, QListView::indicator:checked:disabled {
904+
image: url(@theme_path/icons/qcheckbox-checked.svg);
905+
border-color: @itemdarkbackground;
906+
background-color: rgba(0, 0, 0, 0);
907+
}
903908
QAbstractItemView::indicator:unchecked, QListView::indicator:unchecked {
904909
border: 1px solid @background;
905-
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
910+
}
911+
QAbstractItemView::indicator:unchecked:disabled, QListView::indicator:unchecked:disabled {
912+
border-color: @itemdarkbackground;
913+
background-color: rgba(0, 0, 0, 0);
914+
background-color: rgba(0, 0, 0, 0);
906915
}
907916

908917
/* ==================================================================================== */
@@ -946,6 +955,10 @@ QTreeView::indicator {
946955
width:0.8em;
947956
height:0.8em;
948957
}
958+
QTreeView::indicator:disabled {
959+
border-color: @itemdarkbackground;
960+
background-color: rgba(0, 0, 0, 0);
961+
}
949962
QTreeView::indicator:intermediary {
950963
background-color: @toggleoff;
951964
image: url(@theme_path/icons/qcheckbox-intermediary.svg);
@@ -954,10 +967,21 @@ QTreeView::indicator:checked {
954967
background-color: @toggleon;
955968
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
956969
}
970+
QTreeView::indicator:checked:disabled {
971+
image: url(@theme_path/icons/qcheckbox-checked.svg);
972+
border-color: @itemdarkbackground;
973+
background-color: rgba(0, 0, 0, 0);
974+
}
957975
QTreeView::indicator:unchecked {
958976
background-color: @toggleoff;
959-
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
977+
image: none;
960978
}
979+
QTreeView::indicator:unchecked:disabled {
980+
border-color: @itemdarkbackground;
981+
background-color: rgba(0, 0, 0, 0);
982+
image: none;
983+
}
984+
961985

962986
QgsLayerTreeView::item,
963987
QTreeView#viewGraduated::item,
@@ -1029,6 +1053,10 @@ QTableView::indicator {
10291053
width:0.8em;
10301054
height:0.8em;
10311055
}
1056+
QTableView::indicator:disabled {
1057+
border-color: @itemdarkbackground;
1058+
background-color: rgba(0, 0, 0, 0);
1059+
}
10321060
QTableView::indicator:intermediary {
10331061
background-color: @toggleoff;
10341062
image: url(@theme_path/icons/qcheckbox-intermediary.svg);
@@ -1037,9 +1065,19 @@ QTableView::indicator:checked {
10371065
background-color: @toggleon;
10381066
image: url(@theme_path/icons/qcheckbox-checked.svg) !important;
10391067
}
1068+
QTableView::indicator:checked:disabled {
1069+
image: url(@theme_path/icons/qcheckbox-checked.svg);
1070+
border-color: @itemdarkbackground;
1071+
background-color: rgba(0, 0, 0, 0);
1072+
}
10401073
QTableView::indicator:unchecked {
10411074
background-color: @toggleoff;
1042-
image: url(@theme_path/icons/qcheckbox-unchecked.svg);
1075+
image: none;
1076+
}
1077+
QTableView::indicator:unchecked:disabled {
1078+
border-color: @itemdarkbackground;
1079+
background-color: rgba(0, 0, 0, 0);
1080+
image: none;
10431081
}
10441082

10451083
QTableView QTableCornerButton::section {

0 commit comments

Comments
 (0)
Please sign in to comment.