fixed splits not redrawing after font changed
This commit is contained in:
@@ -61,6 +61,10 @@ ChannelView::ChannelView(BaseWidget *parent)
|
||||
this->goToBottom->getLabel().setText("Jump to bottom");
|
||||
this->goToBottom->setVisible(false);
|
||||
|
||||
this->fontChangedConnection = FontManager::getInstance().fontChanged.connect([this] {
|
||||
this->layoutMessages(); //
|
||||
});
|
||||
|
||||
connect(goToBottom, &RippleEffectLabel::clicked, this,
|
||||
[this] { QTimer::singleShot(180, [this] { this->scrollBar.scrollToBottom(); }); });
|
||||
|
||||
@@ -79,6 +83,7 @@ ChannelView::~ChannelView()
|
||||
{
|
||||
QObject::disconnect(&SettingsManager::getInstance(), &SettingsManager::wordTypeMaskChanged,
|
||||
this, &ChannelView::wordTypeMaskChanged);
|
||||
FontManager::getInstance().fontChanged.disconnect(this->fontChangedConnection);
|
||||
}
|
||||
|
||||
void ChannelView::queueUpdate()
|
||||
@@ -241,8 +246,9 @@ QString ChannelView::getSelectedText()
|
||||
|
||||
if (first) {
|
||||
first = false;
|
||||
bool isSingleWord = isSingleMessage && this->selection.max.charIndex - charIndex <
|
||||
part.getCharacterLength();
|
||||
bool isSingleWord =
|
||||
isSingleMessage &&
|
||||
this->selection.max.charIndex - charIndex < part.getCharacterLength();
|
||||
|
||||
if (isSingleWord) {
|
||||
// return single word
|
||||
@@ -519,9 +525,10 @@ void ChannelView::updateMessageBuffer(messages::MessageRef *messageRef, QPixmap
|
||||
// this->selectionMax.messageIndex >= messageIndex) {
|
||||
// painter.fillRect(buffer->rect(), QColor(24, 55, 25));
|
||||
//} else {
|
||||
painter.fillRect(buffer->rect(), (messageRef->getMessage()->getCanHighlightTab())
|
||||
? this->colorScheme.ChatBackgroundHighlighted
|
||||
: this->colorScheme.ChatBackground);
|
||||
painter.fillRect(buffer->rect(),
|
||||
(messageRef->getMessage()->getCanHighlightTab())
|
||||
? this->colorScheme.ChatBackgroundHighlighted
|
||||
: this->colorScheme.ChatBackground);
|
||||
//}
|
||||
|
||||
// draw selection
|
||||
|
||||
Reference in New Issue
Block a user