Fix NewFriendList item Font defined in QSS

This commit is contained in:
Phenom 2021-02-17 11:52:29 +01:00
parent 36b64696a1
commit 1293da2206
3 changed files with 9 additions and 2 deletions

View File

@ -608,6 +608,10 @@ QVariant RsFriendListModel::fontRole(const EntryIndex& e, int col) const
case RS_STATUS_INACTIVE:
{
QFont font ;
QTreeView* myParent = dynamic_cast<QTreeView*>(QAbstractItemModel::parent());
if (myParent)
font = myParent->font();
font.setBold(true);
return QVariant(font);

View File

@ -183,7 +183,7 @@ NewFriendList::NewFriendList(QWidget */*parent*/) : /* RsAutoUpdatePage(5000,par
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e) { handleEvent(e); }, mEventHandlerId_peer, RsEventType::PEER_CONNECTION );
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e) { handleEvent(e); }, mEventHandlerId_gssp, RsEventType::GOSSIP_DISCOVERY );
mModel = new RsFriendListModel();
mModel = new RsFriendListModel(ui->peerTreeWidget);
mProxyModel = new FriendListSortFilterProxyModel(ui->peerTreeWidget->header(),this);
mProxyModel->setSourceModel(mModel);

View File

@ -1205,7 +1205,10 @@ BoardsCommentsItem QLabel#subjectLabel, QLabel#titleLabel , QLabel#nameLabel {
font: bold;
}
NewFriendList QTreeView#peerTreeWidget::item:selected {
NewFriendList QTreeView#peerTreeWidget::item:selected, QTreeView#peerTreeWidget::branch:selected {
background-color: #cde8ff;
}
NewFriendList QTreeView#peerTreeWidget {
font-size: 1.2em;
}