Skip to content

Commit

Permalink
updates in managerview UI
Browse files Browse the repository at this point in the history
  • Loading branch information
veloman-yunkan committed May 14, 2024
1 parent 49858ff commit 01776d7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
8 changes: 8 additions & 0 deletions resources/css/_contentManager.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ QTreeView::branch:closed:has-children {
padding: 7px;
}

QTreeView::branch:has-children {
border-bottom: 1px solid #cccccc;
}

QTreeView::branch:has-children:hover {
background-color: #eaecf0;
}

QTreeView::item:has-children {
border-bottom: 1px solid #cccccc;
}
Expand Down
20 changes: 19 additions & 1 deletion src/contentmanagerdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,20 @@ void ContentManagerDelegate::paint(QPainter *painter, const QStyleOptionViewItem
showDownloadProgress(painter, r, *downloadState);
}
else {
baseButton->style()->drawControl( QStyle::CE_PushButton, &button, painter, baseButton.data());
QString backgroundColor = "#eaecf0";
if (option.state & QStyle::State_MouseOver) {
}else{
backgroundColor = "white";
}
baseButton->setStyleSheet(QString("background-color: %1;"
"border: 0;"
"font-weight: bold;"
"font-family: Selawik;"
"border-bottom: 1px solid #cccccc;"
"color: blue;"
"margin: 0;").arg(backgroundColor));
}
baseButton->style()->drawControl( QStyle::CE_PushButton, &button, painter, baseButton.data());
return;
}
if (index.column() == 0) {
Expand All @@ -193,7 +205,13 @@ void ContentManagerDelegate::paint(QPainter *painter, const QStyleOptionViewItem
QPixmap pix;
pix.loadFromData(iconData);
QIcon icon(pix);
if (option.state & QStyle::State_MouseOver) {
painter->fillRect(QRect(x, y, w, h), QColor("#eaecf0"));
}
icon.paint(painter, QRect(x+10, y+10, 30, 50));
painter->setPen(QPen(QColor("#cccccc")));
painter->drawLine(x, y + h - 1, x + w, y + h - 1);
painter->setPen(QPen(QColor("black")));
return;
}
if (index.column() == 1) {
Expand Down

0 comments on commit 01776d7

Please sign in to comment.