mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-28 16:17:28 -04:00
fixed bug in chat room notify
This commit is contained in:
parent
6f6e0de5f1
commit
8f12dd6322
2 changed files with 11 additions and 2 deletions
|
@ -63,6 +63,7 @@ public:
|
||||||
QString textToNotify() { return _textToNotify.join("\n");}
|
QString textToNotify() { return _textToNotify.join("\n");}
|
||||||
void setTextCaseSensitive(bool value);
|
void setTextCaseSensitive(bool value);
|
||||||
bool isTextCaseSensitive() {return _bTextCaseSensitive;}
|
bool isTextCaseSensitive() {return _bTextCaseSensitive;}
|
||||||
|
virtual QString textInfo() const override { return tr("mention(s)"); }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void countChanged(ChatLobbyId id, unsigned int count);
|
void countChanged(ChatLobbyId id, unsigned int count);
|
||||||
|
|
|
@ -167,9 +167,17 @@ void UserNotify::update()
|
||||||
if (mMainAction) {
|
if (mMainAction) {
|
||||||
mMainAction->setIcon(getMainIcon(count > 0));
|
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->setText(QString("%1 (%2)").arg(mButtonText).arg(count));
|
||||||
mMainAction->setToolTip((count > 0) ? (!mButtonText2.isNull())?QString("%1 %2").arg(count).arg(mButtonText2) : QString("%1").arg(count) : mButtonText);
|
}
|
||||||
|
else
|
||||||
|
mMainAction->setText(mButtonText);
|
||||||
|
|
||||||
QFont font = mMainAction->font();
|
QFont font = mMainAction->font();
|
||||||
font.setBold(count > 0);
|
font.setBold(count > 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue