mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
centered split header tooltip
This commit is contained in:
parent
1d1fd4d7c0
commit
215e8b7b71
1 changed files with 4 additions and 2 deletions
|
@ -726,11 +726,13 @@ void SplitHeader::enterEvent(QEvent *event)
|
|||
TooltipPreviewImage::instance().setImage(nullptr);
|
||||
|
||||
auto tooltip = TooltipWidget::instance();
|
||||
tooltip->moveTo(this, this->mapToGlobal(this->rect().bottomLeft()),
|
||||
false);
|
||||
tooltip->setText(this->tooltipText_);
|
||||
tooltip->setWordWrap(false);
|
||||
tooltip->adjustSize();
|
||||
auto pos = this->mapToGlobal(this->rect().bottomLeft());
|
||||
pos.setX(pos.x() + (this->width() - tooltip->width()) / 2);
|
||||
|
||||
tooltip->moveTo(this, pos, false);
|
||||
tooltip->show();
|
||||
tooltip->raise();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue