forked from blue/squawk
minor bugfixes about message body, automatic focus and that quirk with font becomming bigger
This commit is contained in:
parent
788c6ca556
commit
5f6691067a
@ -5,9 +5,12 @@
|
||||
- build in release mode now no longer spams warnings
|
||||
- build now correctly installs all build plugin libs
|
||||
- a bug where the correction message was received, the indication was on but the text didn't actually change
|
||||
- message body now doesn't intecept context menu from the whole message
|
||||
- message input now doesn't increase font when you remove everything from it
|
||||
|
||||
### Improvements
|
||||
- reduced amount of places where platform specific path separator is used
|
||||
- now message input is automatically focused when you open a dialog or a room
|
||||
|
||||
### New features
|
||||
- the settings are here! You con config different stuff from there
|
||||
|
@ -94,7 +94,6 @@ Conversation::Conversation(bool muc, Models::Account* acc, Models::Element* el,
|
||||
this, &Conversation::onTextEditDocSizeChanged);
|
||||
|
||||
m_ui->messageEditor->installEventFilter(&ker);
|
||||
m_ui->messageEditor->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
||||
connect(m_ui->messageEditor, &QTextEdit::customContextMenuRequested, this, &Conversation::onMessageEditorContext);
|
||||
connect(pasteImageAction, &QAction::triggered, this, &Conversation::onImagePasted);
|
||||
@ -555,3 +554,11 @@ void Conversation::onMessageEditRequested(const QString& id)
|
||||
qDebug() << "Ignoring";
|
||||
}
|
||||
}
|
||||
|
||||
void Conversation::showEvent(QShowEvent* event)
|
||||
{
|
||||
QWidget::showEvent(event);
|
||||
|
||||
emit shown();
|
||||
m_ui->messageEditor->setFocus();
|
||||
}
|
||||
|
@ -103,6 +103,7 @@ protected:
|
||||
void dropEvent(QDropEvent* event) override;
|
||||
void initializeOverlay();
|
||||
virtual void onMessage(const Shared::Message& msg);
|
||||
virtual void showEvent(QShowEvent * event) override;
|
||||
|
||||
protected slots:
|
||||
void initiateMessageSending();
|
||||
|
@ -402,6 +402,9 @@
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -424,7 +427,7 @@ background-color: transparent
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Noto Sans'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Liberation Sans'; font-size:10pt;"><br /></p></body></html></string>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
@ -447,6 +450,7 @@ p, li { white-space: pre-wrap; }
|
||||
<class>Badge</class>
|
||||
<extends>QFrame</extends>
|
||||
<header location="global">ui/utils/badge.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
|
@ -582,6 +582,7 @@ QLabel * MessageDelegate::getBody(const Models::FeedItem& data) const
|
||||
} else {
|
||||
result = new QLabel();
|
||||
result->setFont(bodyFont);
|
||||
result->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
result->setWordWrap(true);
|
||||
result->setOpenExternalLinks(true);
|
||||
result->setTextInteractionFlags(result->textInteractionFlags() | Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse);
|
||||
|
Loading…
Reference in New Issue
Block a user