From 1399065568c05f8b747c3fe42f814c4cd05ee1bc Mon Sep 17 00:00:00 2001 From: lixueman Date: Fri, 4 Nov 2022 16:27:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9C=80=E8=BF=91=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E6=8F=90=E7=A4=BA=E5=BF=AB=E9=80=9F=E6=BB=91=E5=8A=A8?= =?UTF-8?q?=E9=97=AA=E7=83=81=E9=97=AE=E9=A2=98=EF=BC=9B=E5=85=B3=E6=9C=BA?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=82=B9=E5=87=BB=E6=97=B6=E4=B8=BB=E5=8A=A8?= =?UTF-8?q?=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UserInterface/ViewItem/itemdelegate.cpp | 4 ++-- src/UserInterface/Widget/full_commonuse_widget.cpp | 1 + src/UserInterface/Widget/full_function_widget.cpp | 1 + src/UserInterface/Widget/full_letter_widget.cpp | 1 + src/UserInterface/Widget/full_searchresult_widget.cpp | 1 + src/UserInterface/mainwindow.cpp | 1 + 6 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/UserInterface/ViewItem/itemdelegate.cpp b/src/UserInterface/ViewItem/itemdelegate.cpp index ba41cc7..1615b37 100755 --- a/src/UserInterface/ViewItem/itemdelegate.cpp +++ b/src/UserInterface/ViewItem/itemdelegate.cpp @@ -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(""); @@ -252,7 +252,7 @@ void ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, tipString += tr("path:") + url; } tipString += QString(""); - 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); diff --git a/src/UserInterface/Widget/full_commonuse_widget.cpp b/src/UserInterface/Widget/full_commonuse_widget.cpp index adbce44..61c8da2 100755 --- a/src/UserInterface/Widget/full_commonuse_widget.cpp +++ b/src/UserInterface/Widget/full_commonuse_widget.cpp @@ -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) diff --git a/src/UserInterface/Widget/full_function_widget.cpp b/src/UserInterface/Widget/full_function_widget.cpp index 6e95e13..d1a9f69 100755 --- a/src/UserInterface/Widget/full_function_widget.cpp +++ b/src/UserInterface/Widget/full_function_widget.cpp @@ -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) diff --git a/src/UserInterface/Widget/full_letter_widget.cpp b/src/UserInterface/Widget/full_letter_widget.cpp index 6bf48bb..7ffc770 100755 --- a/src/UserInterface/Widget/full_letter_widget.cpp +++ b/src/UserInterface/Widget/full_letter_widget.cpp @@ -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) diff --git a/src/UserInterface/Widget/full_searchresult_widget.cpp b/src/UserInterface/Widget/full_searchresult_widget.cpp index 344add3..5b54614 100755 --- a/src/UserInterface/Widget/full_searchresult_widget.cpp +++ b/src/UserInterface/Widget/full_searchresult_widget.cpp @@ -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) diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp index 42a5e78..feb225a 100755 --- a/src/UserInterface/mainwindow.cpp +++ b/src/UserInterface/mainwindow.cpp @@ -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) {