mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
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:
parent
f36c0fee97
commit
c3ff98da87
5 changed files with 23 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Unversioned
|
||||
|
||||
- Minor: Added placeholder text for message text input box. (#2143)
|
||||
- Minor: Added placeholder text for message text input box. (#2143, #2149)
|
||||
- Minor: Added support for FrankerFaceZ badges. (#2101, part of #1658)
|
||||
- Minor: Added a navigation list to the settings and reordered them.
|
||||
- Major: Added "Channel Filters". See https://wiki.chatterino.com/Filters/ for how they work or how to configure them. (#1748, #2083)
|
||||
|
|
|
@ -156,6 +156,8 @@ void AB_THEME_CLASS::actuallyUpdate(double hue, double multiplier)
|
|||
this->messages.textColors.link =
|
||||
isLight_ ? QColor(66, 134, 244) : QColor(66, 134, 244);
|
||||
this->messages.textColors.system = QColor(140, 127, 127);
|
||||
this->messages.textColors.chatPlaceholder =
|
||||
isLight_ ? QColor(175, 159, 159) : QColor(93, 85, 85);
|
||||
|
||||
this->messages.backgrounds.regular = getColor(0, sat, 1);
|
||||
this->messages.backgrounds.alternate = getColor(0, sat, 0.96);
|
||||
|
|
|
@ -61,6 +61,7 @@ public:
|
|||
QColor caret;
|
||||
QColor link;
|
||||
QColor system;
|
||||
QColor chatPlaceholder;
|
||||
} textColors;
|
||||
|
||||
struct {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -97,6 +97,7 @@ private:
|
|||
void channelNameUpdated(const QString &newChannelName);
|
||||
void handleModifiers(Qt::KeyboardModifiers modifiers);
|
||||
void onAccountSelected();
|
||||
void updateTooltipColor();
|
||||
|
||||
SplitContainer *container_;
|
||||
IndirectChannel channel_;
|
||||
|
|
Loading…
Reference in a new issue