Merge pull request !23 from 何思胜/openkylin/yangtze
This commit is contained in:
nil 2023-10-19 01:43:18 +00:00 committed by Gitee
commit 2f2e3b9d08
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 22 additions and 3 deletions

11
debian/changelog vendored
View File

@ -1,3 +1,14 @@
ukui-system-monitor (3.14.0.0-ok14) yangtze; urgency=medium
* Bug:196554 【系统监视器】使用鼠标右键双击工具栏部分可以扩大缩小系统监视器窗口
196454 系统监视器】【窗口】焦点不在窗口上时不显示tooltips(期望期望与windows保持一致焦点不在所在窗口上时鼠标悬浮可显示tooltips)
I82ZWD 【X】【系统监视器】窗口UI偏小与其他应用显示不统一
* 需求号:无
* 其他改动说明:无
* 其他改动影响域:无
-- hesisheng <hesisheng@kylinos.cn> Wed, 18 Oct 2023 17:53:39 +0800
ukui-system-monitor (3.14.0.0-ok13) yangtze; urgency=medium
* Bug: 【低】【系统监视器】鼠标悬浮"三"按钮上悬浮文案为"菜单"(预期:应当为"选项")

View File

@ -109,6 +109,9 @@ int main(int argc, char *argv[])
registerSignals();
initUkuiLog4qt("ukui-system-monitor");
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QString id = QString("ukui-system-monitor"+QLatin1String(getenv("DISPLAY")));
QtSingleApplication app(id,argc,argv);
if(app.isRunning())

View File

@ -19,6 +19,7 @@ MainWindow::MainWindow(QWidget *parent)
{
this->setObjectName("SystemMonitor");
this->setAttribute(Qt::WA_TranslucentBackground);//背景透明
this->setAttribute(Qt::WA_AlwaysShowToolTips);
this->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
this->setWindowTitle(tr("Kylin System Monitor"));
this->installEventFilter(this);
@ -249,10 +250,14 @@ bool MainWindow::dblOnEdge(QMouseEvent *event)
bool MainWindow::eventFilter(QObject *watched, QEvent *event)
{
if (this == watched) {
if (event->type() == QEvent::MouseButtonDblClick) {
bool res = dblOnEdge(dynamic_cast<QMouseEvent*>(event));
if (res) {
onMaximizeWindow();
QMouseEvent * mouseEvent = static_cast<QMouseEvent *>(event);
if (mouseEvent->button() == Qt::LeftButton ){
bool res = dblOnEdge(dynamic_cast<QMouseEvent*>(event));
if (res) {
onMaximizeWindow();
}
}
}
if (event->type() == QEvent::WindowStateChange) {