aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Noir <Varsash@gmail.com>2022-05-21 20:34:49 +0300
committerAlex Noir <Varsash@gmail.com>2022-05-21 20:34:49 +0300
commit7d687955d4190ef7361e42e51187f6307bb6543e (patch)
tree599ee110fe8307c0d06678aba64e3b683a386eda
parentb56805e3e2c45a3096a9c47cd8fa0bb8a9dd33b3 (diff)
Fix stickers being layered under the chatbox rather than above (but still under text/showname)
Fix stickers being incorrectly layered and affected by effects etc.
-rw-r--r--src/courtroom.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 11f543aa..2db30e45 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -70,6 +70,13 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
ui_vp_chatbox = new AOImage(this, ao_app);
ui_vp_chatbox->setObjectName("ui_vp_chatbox");
+
+ ui_vp_sticker = new StickerLayer(this, ao_app);
+ ui_vp_sticker->set_play_once(false);
+ ui_vp_sticker->set_cull_image(false);
+ ui_vp_sticker->setAttribute(Qt::WA_TransparentForMouseEvents);
+ ui_vp_sticker->setObjectName("ui_vp_sticker");
+
ui_vp_showname = new QLabel(ui_vp_chatbox);
ui_vp_showname->setObjectName("ui_vp_showname");
ui_vp_showname->setAlignment(Qt::AlignLeft);
@@ -179,11 +186,6 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
ui_ic_chat_message->installEventFilter(ui_ic_chat_message_filter);
ui_ic_chat_message->setObjectName("ui_ic_chat_message");
- ui_vp_sticker = new StickerLayer(ui_viewport, ao_app);
- ui_vp_sticker->set_play_once(false);
- ui_vp_sticker->setAttribute(Qt::WA_TransparentForMouseEvents);
- ui_vp_sticker->setObjectName("ui_vp_sticker");
-
ui_muted = new AOImage(ui_ic_chat_message, ao_app);
ui_muted->hide();
ui_muted->setObjectName("ui_muted");
@@ -830,7 +832,7 @@ void Courtroom::set_widgets()
ui_vp_message->y() + ui_vp_chatbox->y());
ui_vp_message->setTextInteractionFlags(Qt::NoTextInteraction);
- ui_vp_sticker->move(0, 0);
+ ui_vp_sticker->move(ui_viewport->x(), ui_viewport->y());
ui_vp_sticker->combo_resize(ui_viewport->width(),
ui_viewport->height());