From 022312a6ec1b774ae296f59b0f53bcca2493167a Mon Sep 17 00:00:00 2001 From: leibn123 Date: Thu, 2 Apr 2026 10:53:36 +0800 Subject: [PATCH 1/2] fix: Modify the background transparency of the account creation screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.修改添加新用户界面的背景透明度问题 PMS: BUG-316577 --- .../qml/CreateAccountDialog.qml | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/src/plugin-accounts/qml/CreateAccountDialog.qml b/src/plugin-accounts/qml/CreateAccountDialog.qml index f8adcd708d..9341bb3ab2 100644 --- a/src/plugin-accounts/qml/CreateAccountDialog.qml +++ b/src/plugin-accounts/qml/CreateAccountDialog.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // SPDX-License-Identifier: GPL-3.0-or-later import QtQuick 2.15 @@ -22,9 +22,41 @@ D.DialogWindow { icon: "preferences-system" modality: Qt.WindowModal title: qsTr("Create a new account") - + color: "transparent" signal accepted() + header: D.DialogTitleBar { + icon.name: dialog.icon + } + + Rectangle { + // 覆盖整个窗口,包括 DialogWindow 的边距 + x: -DS.Style.dialogWindow.contentHMargin + y: -DS.Style.dialogWindow.titleBarHeight + width: dialog.width + DS.Style.dialogWindow.contentHMargin * 2 + height: dialog.height + DS.Style.dialogWindow.titleBarHeight + color: "transparent" + parent: dialog.contentItem + z: -1 + D.StyledBehindWindowBlur { + anchors.fill: parent + blendColor: { + if (valid) { + return DS.Style.control.selectColor( + dialog ? dialog.palette.window : undefined, + Qt.rgba(1, 1, 1, 0.8), + Qt.rgba(0.06, 0.06, 0.06, 0.8) + ) + } + return DS.Style.control.selectColor( + undefined, + DS.Style.behindWindowBlur.lightNoBlurColor, + DS.Style.behindWindowBlur.darkNoBlurColor + ) + } + } + } + ColumnLayout { id: mainLayout width: dialog.width - 20 From dc6c53d19236451ce5a47b4bdcd507aa0274e75a Mon Sep 17 00:00:00 2001 From: leibn123 Date: Mon, 13 Apr 2026 14:21:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20Fix=20secondary=20screen=20highlight?= =?UTF-8?q?=20display=20anomaly=20in=2090=C2=B0=20and=20270=C2=B0=20rotati?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.修改副屏旋转90度和270度的高亮显示异常问题 PMS: BUG-355449 --- src/plugin-display/qml/DisplayMain.qml | 40 ++++++++++++++++++++------ src/plugin-display/qml/ScreenItem.qml | 29 ++++++++++--------- src/plugin-display/qml/ScreenTab.qml | 6 +++- 3 files changed, 52 insertions(+), 23 deletions(-) diff --git a/src/plugin-display/qml/DisplayMain.qml b/src/plugin-display/qml/DisplayMain.qml index a1693b89c8..e0aa905602 100644 --- a/src/plugin-display/qml/DisplayMain.qml +++ b/src/plugin-display/qml/DisplayMain.qml @@ -11,7 +11,13 @@ import org.deepin.dcc 1.0 DccObject { id: root property var screen: dccData.virtualScreens[0] + property string lastScreenName: "" property var activeDialogs: [] + Component.onCompleted: { + if (screen && screen.name) { + lastScreenName = screen.name + } + } property var scaleModelConst: [{ "text": qsTr("100%"), "value": 1.0 @@ -94,13 +100,19 @@ DccObject { return model.length - 1 } function getQtScreen(screen) { - for (var s of Qt.application.screens) { - if (s.virtualX === screen.x && s.virtualY === screen.y && (Math.abs(s.width * s.devicePixelRatio - screen.currentResolution.width) < 1) && (Math.abs(s.height * s.devicePixelRatio - screen.currentResolution.height) < 1)) { - return s - } + for (var s of Qt.application.screens) { + var isRotated = (screen.rotate === 2 || screen.rotate === 8) + var targetW = isRotated ? screen.currentResolution.height : screen.currentResolution.width + var targetH = isRotated ? screen.currentResolution.width : screen.currentResolution.height + + if (s.virtualX === screen.x && s.virtualY === screen.y + && Math.abs(s.width * s.devicePixelRatio - targetW) < 1 + && Math.abs(s.height * s.devicePixelRatio - targetH) < 1) { + return s } - return null } + return null +} function getControlCenterScreen() { var mainWindow = DccApp.mainWindow() if (mainWindow && mainWindow.screen) { @@ -133,8 +145,18 @@ DccObject { Connections { target: dccData function onVirtualScreensChanged() { - if (!dccData.virtualScreens.includes(screen)) { - screen = dccData.virtualScreens[0] + var found = false + if (lastScreenName !== "") { + for (var i = 0; i < dccData.virtualScreens.length; i++) { + if (dccData.virtualScreens[i].name === lastScreenName) { + root.screen = dccData.virtualScreens[i] + found = true + break + } + } + } + if (!found) { + root.screen = dccData.virtualScreens[0] } closeInvalidDialogs() } @@ -222,10 +244,10 @@ DccObject { delegate: ScreenItem { z: selected ? 2 : 1 screen: model.modelData + selected: root.screen === screen && screen.rotate !== undefined translationX: monitorsGround.translationX translationY: monitorsGround.translationY scale: monitorsGround.scale - selected: root.screen === screen onPressed: monitorRepeater.pressedItem(this) onPositionChanged: monitorRepeater.positionChangedItem(this) onReleased: monitorRepeater.releasedItem(this) @@ -243,6 +265,7 @@ DccObject { function pressedItem(item) { hasMove = false root.screen = item.screen + root.lastScreenName = item.screen.name if (dccData.isX11) { indicator.createObject(this, { "screen": getQtScreen(item.screen) @@ -535,6 +558,7 @@ DccObject { onScreenClicked: function (screen) { if (screen && screen !== root.screen) { root.screen = screen + root.lastScreenName = screen.name // 用户主动选择时更新 lastScreenName if (dccData.isX11) { indicator.createObject(this, { "screen": getQtScreen(root.screen) diff --git a/src/plugin-display/qml/ScreenItem.qml b/src/plugin-display/qml/ScreenItem.qml index 970609c651..e6b9344e1e 100644 --- a/src/plugin-display/qml/ScreenItem.qml +++ b/src/plugin-display/qml/ScreenItem.qml @@ -105,21 +105,22 @@ Item { sourceSize: Qt.size(root.homeIconSize, root.homeIconSize) } Loader { - x: offset - y: offset - z: 2 - width: root.width - offset - height: root.height - offset - active: root.selected - sourceComponent: Rectangle { - anchors.fill: parent - radius: root.radius + 1 - color: "transparent" - border.color: this.palette.highlight - border.width: 2 - smooth: true - } + x: offset + y: offset + z: 2 + width: root.width - offset + height: root.height - offset + active: root.selected + visible: root.selected + sourceComponent: Rectangle { + anchors.fill: parent + radius: root.radius + 1 + color: "transparent" + border.color: this.palette.highlight + border.width: 2 + smooth: true } +} MouseArea { z: 2 anchors.fill: parent diff --git a/src/plugin-display/qml/ScreenTab.qml b/src/plugin-display/qml/ScreenTab.qml index dabc270527..b154f57903 100644 --- a/src/plugin-display/qml/ScreenTab.qml +++ b/src/plugin-display/qml/ScreenTab.qml @@ -17,7 +17,11 @@ Item { Repeater { id: repeater delegate: Rectangle { - property bool isSelect: model.modelData === screen + property bool isSelect: { + var modelName = model.modelData ? model.modelData.name : "null" + var screenName = screen ? screen.name : "null" + return model.modelData && screen ? model.modelData.name === screen.name : false + } property alias hovered: mouseArea.containsMouse implicitWidth: nameLabel.implicitWidth + 20 implicitHeight: 30