mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 13:24:15 -05:00
fixed bug in chat room notify
This commit is contained in:
parent
6f6e0de5f1
commit
8f12dd6322
@ -63,6 +63,7 @@ public:
|
||||
QString textToNotify() { return _textToNotify.join("\n");}
|
||||
void setTextCaseSensitive(bool value);
|
||||
bool isTextCaseSensitive() {return _bTextCaseSensitive;}
|
||||
virtual QString textInfo() const override { return tr("mention(s)"); }
|
||||
|
||||
signals:
|
||||
void countChanged(ChatLobbyId id, unsigned int count);
|
||||
|
@ -167,9 +167,17 @@ void UserNotify::update()
|
||||
if (mMainAction) {
|
||||
mMainAction->setIcon(getMainIcon(count > 0));
|
||||
|
||||
if(count > 0)
|
||||
{
|
||||
if(!mButtonText2.isNull())
|
||||
mMainAction->setToolTip(QString("%1 (%2 %3)").arg(mButtonText).arg(count).arg(mButtonText2));
|
||||
else
|
||||
mMainAction->setToolTip(QString("%1 (%2)").arg(mButtonText).arg(count));
|
||||
|
||||
mMainAction->setText((count > 0) ? (!mButtonText2.isNull())?QString("%1 (%2)").arg(mButtonText).arg(count).arg(mButtonText2) : QString("%1 (%2 %3)").arg(mButtonText).arg(count) : mButtonText);
|
||||
mMainAction->setToolTip((count > 0) ? (!mButtonText2.isNull())?QString("%1 %2").arg(count).arg(mButtonText2) : QString("%1").arg(count) : mButtonText);
|
||||
mMainAction->setText(QString("%1 (%2)").arg(mButtonText).arg(count));
|
||||
}
|
||||
else
|
||||
mMainAction->setText(mButtonText);
|
||||
|
||||
QFont font = mMainAction->font();
|
||||
font.setBold(count > 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user