Merge pull request #2331 from PhenomRetroShare/Fix_FriendList_FontOnQSS

Fix NewFriendList item Font defined in QSS
This commit is contained in:
defnax 2021-02-17 13:50:17 +01:00 committed by GitHub
commit f57c7ac2bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}