diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/tab_actor_info.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/tab_actor_info.cpp b/src/widgets/tab_actor_info.cpp index 9a289e0..7a01980 100644 --- a/src/widgets/tab_actor_info.cpp +++ b/src/widgets/tab_actor_info.cpp @@ -55,7 +55,11 @@ void TabActorInfo::paintEvent(QPaintEvent* event) { if (actor and actor->header) { painter.setOpacity(0.75); QPixmap pixmap = actor->header->get_pixmap(ui->displayNameText->width()); - painter.drawPixmap(ui->displayNameText->geometry(), pixmap); + auto &widget = *(ui->displayNameText); + painter.translate(widget.pos()); + QPoint centre(widget.width() / 2 - pixmap.width() / 2, + widget.height() / 2 - pixmap.height() / 2); + painter.drawPixmap(centre, pixmap); painter.setOpacity(1.0); } } |