diff options
| author | Crystalwarrior <varsash@gmail.com> | 2019-09-13 15:13:40 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2019-09-13 15:13:40 +0300 |
| commit | f1b31697130101ab493a2f2907e3974f3cf1fa58 (patch) | |
| tree | ed7b2b773013b6678bbdee02bd0a482421b5c1a8 /src/courtroom.cpp | |
| parent | 040898feff5d15f7236afb5e41c3bcc47e703a2a (diff) | |
CONTROVERSIAL: Detach ui_vp_message from ui_vp_chatbox to prevent it from being affected by the screenshake. ui_vp_message still sets position relative to the chat box for now (as doing otherwise would break a lot of themes).
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 04c2f86e..2e174f26 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -86,7 +86,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow() ui_vp_chatbox = new AOImage(this, ao_app); ui_vp_showname = new QLabel(ui_vp_chatbox); - ui_vp_message = new QTextEdit(ui_vp_chatbox); + ui_vp_message = new QTextEdit(this); ui_vp_message->setFrameStyle(QFrame::NoFrame); ui_vp_message->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); ui_vp_message->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); @@ -476,6 +476,8 @@ void Courtroom::set_widgets() set_size_and_pos(ui_vp_showname, "showname"); set_size_and_pos(ui_vp_message, "message"); + //We detached the text as parent from the chatbox so it doesn't get affected by the screenshake. +// ui_vp_message->move(ui_vp_message->x() + ui_vp_chatbox->x(), ui_vp_message->y() + ui_vp_chatbox->y()); ui_vp_message->setTextInteractionFlags(Qt::NoTextInteraction); ui_vp_message->setStyleSheet("background-color: rgba(0, 0, 0, 0);" "color: white"); |
