Improved textEdit placeholder (#2149)

* Made colors a bit lighter

And also removed the tooltip from non-twitch channels

* Updated the changelog entry

Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Paweł
2020-11-05 09:06:34 +01:00
committed by GitHub
parent f36c0fee97
commit c3ff98da87
5 changed files with 23 additions and 1 deletions
+18
View File
@@ -283,6 +283,11 @@ void Split::setContainer(SplitContainer *container)
void Split::onAccountSelected()
{
if (!this->getChannel()->isTwitchChannel())
{
return;
}
auto user = getApp()->accounts->twitch.getCurrent();
QString placeholderText;
@@ -298,6 +303,19 @@ void Split::onAccountSelected()
}
this->input_->ui_.textEdit->setPlaceholderText(placeholderText);
this->updateTooltipColor();
this->signalHolder_.managedConnect(this->theme->updated, [this]() {
this->updateTooltipColor(); //
});
}
void Split::updateTooltipColor()
{
QPalette dankPalette;
dankPalette.setColor(QPalette::PlaceholderText,
this->theme->messages.textColors.chatPlaceholder);
this->input_->ui_.textEdit->setPalette(dankPalette);
}
IndirectChannel Split::getIndirectChannel()