Skip to content

Commit

Permalink
updates in managerview UI
Browse files Browse the repository at this point in the history
  • Loading branch information
MeerIsmailAli committed Mar 19, 2024
1 parent 693b7b1 commit 060144a
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/contentmanagerdelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,23 @@ void ContentManagerDelegate::paint(QPainter *painter, const QStyleOptionViewItem
showDownloadProgress(painter, r, *downloadState);
}
else {
baseButton->style()->drawControl( QStyle::CE_PushButton, &button, painter, baseButton.data());
if (option.state & QStyle::State_MouseOver) {
baseButton->setStyleSheet("background-color: #eaecf0;"
"border: 0;"
"font-weight: bold;"
"font-family: Selawik;"
"color: blue;"
"margin: 0;");
baseButton->style()->drawControl( QStyle::CE_PushButton, &button, painter, baseButton.data());
}else{
baseButton->setStyleSheet("background-color: white;"
"border: 0;"
"font-weight: bold;"
"font-family: Selawik;"
"color: blue;"
"margin: 0;");
baseButton->style()->drawControl( QStyle::CE_PushButton, &button, painter, baseButton.data());
}
}
return;
}
Expand All @@ -193,6 +209,9 @@ 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));
return;
}
Expand Down

0 comments on commit 060144a

Please sign in to comment.