fix chatbox not hiding correctly on pre-anim

This commit is contained in:
Mauricio 2020-08-05 21:26:52 -04:00
parent 6cde53fd0a
commit 2b63d87b65

View File

@ -664,25 +664,26 @@ class gui(QtGui.QWidget):
bench = QtGui.QPixmap(AOpath + 'background/default/defensedesk.png') bench = QtGui.QPixmap(AOpath + 'background/default/defensedesk.png')
self.court.setPixmap(QtGui.QPixmap(AOpath + 'background/default/defenseempty.png')) self.court.setPixmap(QtGui.QPixmap(AOpath + 'background/default/defenseempty.png'))
self.bench.setPixmap(bench) self.bench.setPixmap(bench)
self.chatbox = QtGui.QLabel(self) self.chatbox = QtGui.QLabel(self)
chatbox = QtGui.QPixmap(AOpath + 'themes/default/chatmed.png') chatbox = QtGui.QPixmap(AOpath + 'themes/default/chatmed.png')
chatboxheight = chatbox.size().height() chatboxheight = chatbox.size().height()
self.chatbox.setPixmap(chatbox) self.chatbox.setPixmap(chatbox)
self.chatbox.move(0, 192 - chatboxheight) self.chatbox.move(0, 192 - chatboxheight)
self.text = QtGui.QLabel(self) self.text = QtGui.QLabel(self.chatbox)
self.text.setWordWrap(True) self.text.setWordWrap(True)
self.text.resize(250, 96) self.text.resize(250, 96)
self.text.move(6, 192 - chatboxheight + 20) self.text.move(6, 20)
self.text.setStyleSheet('color: white') self.text.setStyleSheet('color: white')
self.text.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.text.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
self.ao2text = QtGui.QTextEdit(self) self.ao2text = QtGui.QTextEdit(self.chatbox)
self.ao2text.setFrameStyle(QtGui.QFrame.NoFrame) self.ao2text.setFrameStyle(QtGui.QFrame.NoFrame)
self.ao2text.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.ao2text.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.ao2text.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.ao2text.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.ao2text.setReadOnly(True) self.ao2text.setReadOnly(True)
self.ao2text.setGeometry(2, 192-chatboxheight+16, 240+10, 96) self.ao2text.setGeometry(2, 16, 240+10, 96)
self.ao2text.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) self.ao2text.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
self.ao2text.setStyleSheet("background-color: rgba(0, 0, 0, 0);" self.ao2text.setStyleSheet("background-color: rgba(0, 0, 0, 0);"
"color: white") "color: white")