mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Removed some more hardcoded colors
- NetworkDialog - ChatLobbyWidget - FeedReader Fixed style blacknight git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6476 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
90e7a3cd54
commit
3208cf9e3a
6 changed files with 73 additions and 130 deletions
|
@ -161,7 +161,7 @@ void ChatLobbyWidget::lobbyChanged()
|
|||
updateDisplay();
|
||||
}
|
||||
|
||||
static void updateItem(QTreeWidgetItem *item, ChatLobbyId id, const std::string &name, const std::string &topic, int count, bool subscribed, bool autoSubscribe)
|
||||
static void updateItem(QTreeWidget *treeWidget, QTreeWidgetItem *item, ChatLobbyId id, const std::string &name, const std::string &topic, int count, bool subscribed, bool autoSubscribe)
|
||||
{
|
||||
item->setText(COLUMN_NAME, QString::fromUtf8(name.c_str()));
|
||||
item->setData(COLUMN_NAME, ROLE_SORT, QString::fromUtf8(name.c_str()));
|
||||
|
@ -183,10 +183,10 @@ static void updateItem(QTreeWidgetItem *item, ChatLobbyId id, const std::string
|
|||
item->setData(COLUMN_DATA, ROLE_SUBSCRIBED, subscribed);
|
||||
item->setData(COLUMN_DATA, ROLE_AUTOSUBSCRIBE, autoSubscribe);
|
||||
|
||||
QColor color = QApplication::palette().color(QPalette::Active, QPalette::Text);
|
||||
QColor color = treeWidget->palette().color(QPalette::Active, QPalette::Text);
|
||||
if (!subscribed) {
|
||||
// Average between Base and Text colors
|
||||
QColor color2 = QApplication::palette().color(QPalette::Active, QPalette::Base);
|
||||
QColor color2 = treeWidget->palette().color(QPalette::Active, QPalette::Base);
|
||||
color.setRgbF((color2.redF()+color.redF())/2, (color2.greenF()+color.greenF())/2, (color2.blueF()+color.blueF())/2);
|
||||
}
|
||||
|
||||
|
@ -336,7 +336,7 @@ void ChatLobbyWidget::updateDisplay()
|
|||
}
|
||||
}
|
||||
|
||||
updateItem(item, lobby.lobby_id, lobby.lobby_name,lobby.lobby_topic, lobby.total_number_of_peers, subscribed, autoSubscribe);
|
||||
updateItem(lobbyTreeWidget, item, lobby.lobby_id, lobby.lobby_name,lobby.lobby_topic, lobby.total_number_of_peers, subscribed, autoSubscribe);
|
||||
|
||||
}
|
||||
|
||||
|
@ -386,7 +386,7 @@ void ChatLobbyWidget::updateDisplay()
|
|||
|
||||
bool autoSubscribe = rsMsgs->getLobbyAutoSubscribe(lobby.lobby_id);
|
||||
|
||||
updateItem(item, lobby.lobby_id, lobby.lobby_name,lobby.lobby_topic, lobby.nick_names.size(), true, autoSubscribe);
|
||||
updateItem(lobbyTreeWidget, item, lobby.lobby_id, lobby.lobby_name,lobby.lobby_topic, lobby.nick_names.size(), true, autoSubscribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue