!28 解决最近区域提示快速滑动闪烁问题;关机按钮点击时主动隐藏

Merge pull request !28 from lixueman/upstream
This commit is contained in:
lixueman 2022-11-04 08:44:10 +00:00 committed by Gitee
commit e61fcfa080
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 7 additions and 2 deletions

View File

@ -242,7 +242,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
painter->restore();
if ((option.state & QStyle::State_MouseOver) || (option.state & QStyle::State_HasFocus)) {
QToolTip::showText(QCursor::pos(), "为了刷新");
QToolTip::hideText();
int len = fm.boundingRect(appname).width();
//富文本,tooltip可自动换行
QString tipString = QString("<font>");
@ -252,7 +252,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
tipString += tr("path:") + url;
}
tipString += QString("</font>");
QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.right() + 20, rect.center().y())), tipString);
QToolTip::showText(option.widget->mapToGlobal(QPoint(rect.right(), rect.center().y())), tipString);
}
} else {
QRect iconRect = QRect(rect.left() + 11, rect.y() + (rect.height() - 32) / 2, 32, 32);

View File

@ -133,6 +133,7 @@ void FullCommonUseWidget::initVerticalScrollBar()
void FullCommonUseWidget::on_powerOffButton_clicked()
{
QProcess::startDetached(QString("ukui-session-tools"));
Q_EMIT sendHideMainWindowSignal();
}
void FullCommonUseWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)

View File

@ -153,6 +153,7 @@ void FullFunctionWidget::initVerticalScrollBar()
void FullFunctionWidget::on_powerOffButton_clicked()
{
QProcess::startDetached(QString("ukui-session-tools"));
Q_EMIT sendHideMainWindowSignal();
}
void FullFunctionWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)

View File

@ -148,6 +148,7 @@ void FullLetterWidget::initVerticalScrollBar()
void FullLetterWidget::on_powerOffButton_clicked()
{
QProcess::startDetached(QString("ukui-session-tools"));
Q_EMIT sendHideMainWindowSignal();
}
void FullLetterWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)

View File

@ -122,6 +122,7 @@ void FullSearchResultWidget::initVerticalScrollBar()
void FullSearchResultWidget::on_powerOffButton_clicked()
{
QProcess::startDetached(QString("ukui-session-tools"));
Q_EMIT sendHideMainWindowSignal();
}
void FullSearchResultWidget::on_powerOffButton_customContextMenuRequested(const QPoint &pos)

View File

@ -1426,6 +1426,7 @@ void MainWindow::showNormalWindowSlot()
void MainWindow::on_powerOffButton_clicked()
{
QProcess::startDetached(QString("ukui-session-tools"));
hideWindow();
}
void MainWindow::on_powerOffButton_customContextMenuRequested(const QPoint &pos)
{