Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
c56820ad
Commit
c56820ad
authored
Feb 15, 2016
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reset chat input text formatting between messages
parent
bd5fc473
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
chatwindow.py
blink/chatwindow.py
+5
-1
No files found.
blink/chatwindow.py
View file @
c56820ad
...
@@ -12,7 +12,7 @@ import re
...
@@ -12,7 +12,7 @@ import re
from
PyQt4
import
uic
from
PyQt4
import
uic
from
PyQt4.QtCore
import
Qt
,
QBuffer
,
QEasingCurve
,
QEvent
,
QPoint
,
QPointF
,
QPropertyAnimation
,
QRect
,
QRectF
,
QSettings
,
QSize
,
QSizeF
,
QTimer
,
QUrl
,
pyqtSignal
from
PyQt4.QtCore
import
Qt
,
QBuffer
,
QEasingCurve
,
QEvent
,
QPoint
,
QPointF
,
QPropertyAnimation
,
QRect
,
QRectF
,
QSettings
,
QSize
,
QSizeF
,
QTimer
,
QUrl
,
pyqtSignal
from
PyQt4.QtGui
import
QAction
,
QBrush
,
QColor
,
QIcon
,
QLabel
,
QLinearGradient
,
QListView
,
QMenu
,
QPainter
,
QPalette
,
QPen
,
QPixmap
,
QPolygonF
,
QTextCursor
,
QTextDocument
,
QTextEdit
,
QToolButton
from
PyQt4.QtGui
import
QAction
,
QBrush
,
QColor
,
QIcon
,
QLabel
,
QLinearGradient
,
QListView
,
QMenu
,
QPainter
,
QPalette
,
QPen
,
QPixmap
,
QPolygonF
,
QTextCursor
,
QTextDocument
,
QTextEdit
,
QToolButton
from
PyQt4.QtGui
import
QApplication
,
QDesktopServices
,
QImageReader
,
QKeyEvent
from
PyQt4.QtGui
import
QApplication
,
QDesktopServices
,
QImageReader
,
QKeyEvent
,
QTextCharFormat
from
PyQt4.QtWebKit
import
QWebPage
,
QWebSettings
,
QWebView
from
PyQt4.QtWebKit
import
QWebPage
,
QWebSettings
,
QWebView
from
abc
import
ABCMeta
,
abstractmethod
from
abc
import
ABCMeta
,
abstractmethod
...
@@ -463,6 +463,10 @@ class ChatTextInput(QTextEdit):
...
@@ -463,6 +463,10 @@ class ChatTextInput(QTextEdit):
def
_SH_DocumentLayoutSizeChanged
(
self
,
new_size
):
def
_SH_DocumentLayoutSizeChanged
(
self
,
new_size
):
self
.
setFixedHeight
(
min
(
new_size
.
height
()
+
self
.
contentsMargins
()
.
top
()
+
self
.
contentsMargins
()
.
bottom
(),
self
.
parent
()
.
height
()
/
2
))
self
.
setFixedHeight
(
min
(
new_size
.
height
()
+
self
.
contentsMargins
()
.
top
()
+
self
.
contentsMargins
()
.
bottom
(),
self
.
parent
()
.
height
()
/
2
))
def
clear
(
self
):
super
(
ChatTextInput
,
self
)
.
clear
()
self
.
setCurrentCharFormat
(
QTextCharFormat
())
# clear() doesn't clear the text formatting, only the content
def
setHtml
(
self
,
text
):
def
setHtml
(
self
,
text
):
super
(
ChatTextInput
,
self
)
.
setHtml
(
text
)
super
(
ChatTextInput
,
self
)
.
setHtml
(
text
)
cursor
=
self
.
textCursor
()
cursor
=
self
.
textCursor
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment