mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Adds visual indicator to message length if too long (#2659)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
4636197f12
commit
c413a0984e
|
@ -2,6 +2,7 @@
|
|||
|
||||
## Unversioned
|
||||
|
||||
- Minor: Added visual indicator to message length if over 500 characters long (#2659)
|
||||
- Minor: Added `is:<flags>` search filter to find messages of specific types. (#2653, #2671)
|
||||
- Minor: Added image links to the badge context menu. (#2667)
|
||||
- Minor: Added a setting to hide Twitch Predictions badges. (#2668)
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <QPainter>
|
||||
|
||||
namespace chatterino {
|
||||
const int TWITCH_MESSAGE_LIMIT = 500;
|
||||
|
||||
SplitInput::SplitInput(Split *_chatWidget)
|
||||
: BaseWidget(_chatWidget)
|
||||
|
@ -604,6 +605,14 @@ void SplitInput::editTextChanged()
|
|||
if (text.length() > 0 && getSettings()->showMessageLength)
|
||||
{
|
||||
labelText = QString::number(text.length());
|
||||
if (text.length() > TWITCH_MESSAGE_LIMIT)
|
||||
{
|
||||
this->ui_.textEditLength->setStyleSheet("color: red");
|
||||
}
|
||||
else
|
||||
{
|
||||
this->ui_.textEditLength->setStyleSheet("");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue