Skip to content

Commit

Permalink
Mark ibvalid metadata pkgs with orange background
Browse files Browse the repository at this point in the history
  • Loading branch information
goszpeti committed Aug 25, 2024
1 parent e700b54 commit 9f8bacb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/conan_explorer/ui/dark_style.qss.in
Original file line number Diff line number Diff line change
Expand Up @@ -542,17 +542,23 @@ QListView, QTreeView, QListWidget {
background-color: #474747;
alternate-background-color: #474747;
}
/* border-radius causes grahical glitches */
QListView::item:hover,QTreeView::item:hover{
background: #3375B7;
/* border-radius: {{WINDOW_BORDER_RADIUS-1}}px; */
}
QListView::item:selected,QTreeView::item:selected {
/* border-radius: {{WINDOW_BORDER_RADIUS-1}}px; */
}
QListView::item:selected:active,QTreeView::item:selected:active{
background-color: #6699CC;
/* border-radius: {{WINDOW_BORDER_RADIUS-1}}px; */
}
QListView::item:selected:!active,QTreeView::item:selected:!active {
background-color: #6699CC;
/* border-radius: {{WINDOW_BORDER_RADIUS-1}}px; */
}

QListView::indicator:unchecked,QListWidget::indicator:unchecked {
image: url(icons:material/check_box_empty_white.svg);
}
Expand Down
5 changes: 5 additions & 0 deletions src/conan_explorer/ui/light_style.qss.in
Original file line number Diff line number Diff line change
Expand Up @@ -474,16 +474,21 @@ QListView,QTreeView,QListWidget {
alternate-background-color: white;
}

/* border-radius causes grahical glitches */
QListView::item:hover,QTreeView::item:hover,QListWidget::item:hover {
background: #7fbfff;
/* border-radius: {{WINDOW_BORDER_RADIUS-1}}px; */
}
QListView::item:selected,QTreeView::item:selected,QListWidget::item:selected {
/* border-radius: {{WINDOW_BORDER_RADIUS-1}}px; */
}
QListView::item:selected:active,QTreeView::item:selected:active,QListWidget::item:selected:active {
background: #6699CC;
/* border-radius: {{WINDOW_BORDER_RADIUS-1}}px; */
}
QListView::item:selected:!active,QTreeView::item:selected:!active,QListWidget::item:selected:!active {
background: #4c7399;
/* border-radius: {{WINDOW_BORDER_RADIUS-1}}px; */
}

QListView::indicator:unchecked,QListWidget::indicator:unchecked {
Expand Down
5 changes: 3 additions & 2 deletions src/conan_explorer/ui/views/package_explorer/sel_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def data(self, index: Union[QModelIndex, QPersistentModelIndex], role: int = 0)
font = QFont()
font.setItalic(True)
return font
elif role == Qt.ItemDataRole.ForegroundRole:
# foregroundrole does not seem to work for new win11 platform so use BackgroundRole
elif role == Qt.ItemDataRole.BackgroundRole:
if item.invalid:
return QColor("red")
return QColor("orange")
return None

0 comments on commit 9f8bacb

Please sign in to comment.