Adds visual indicator to message length if too long (#2659)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Unversioned
|
## 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 `is:<flags>` search filter to find messages of specific types. (#2653, #2671)
|
||||||
- Minor: Added image links to the badge context menu. (#2667)
|
- Minor: Added image links to the badge context menu. (#2667)
|
||||||
- Minor: Added a setting to hide Twitch Predictions badges. (#2668)
|
- Minor: Added a setting to hide Twitch Predictions badges. (#2668)
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
const int TWITCH_MESSAGE_LIMIT = 500;
|
||||||
|
|
||||||
SplitInput::SplitInput(Split *_chatWidget)
|
SplitInput::SplitInput(Split *_chatWidget)
|
||||||
: BaseWidget(_chatWidget)
|
: BaseWidget(_chatWidget)
|
||||||
@@ -604,6 +605,14 @@ void SplitInput::editTextChanged()
|
|||||||
if (text.length() > 0 && getSettings()->showMessageLength)
|
if (text.length() > 0 && getSettings()->showMessageLength)
|
||||||
{
|
{
|
||||||
labelText = QString::number(text.length());
|
labelText = QString::number(text.length());
|
||||||
|
if (text.length() > TWITCH_MESSAGE_LIMIT)
|
||||||
|
{
|
||||||
|
this->ui_.textEditLength->setStyleSheet("color: red");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->ui_.textEditLength->setStyleSheet("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user