Skip to content

Commit e42cb0d

Browse files
committed
feat(ui): update button appearance by setting ColorSelector inactive state
Set D.ColorSelector.inactived: false on buttons and input fields across update module QML files to ensure consistent visual appearance and prevent unintended inactive styling. log: button appearance by setting ColorSelector inactive state bug: PMS-298841
1 parent 22c5f90 commit e42cb0d

20 files changed

Lines changed: 50 additions & 11 deletions

dcc-network/qml/NetButton.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import QtQuick 2.15
44
import QtQuick.Controls 2.15
55

6+
import org.deepin.dtk 1.0 as D
7+
68
Button {
79
implicitHeight: implicitContentHeight + 6
810
implicitWidth: implicitContentWidth + 10
@@ -11,4 +13,5 @@ Button {
1113
leftPadding: 0
1214
rightPadding: 0
1315
spacing: 0
16+
D.ColorSelector.inactived: false
1417
}

dcc-network/qml/NetFileChooseEdit.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ RowLayout {
3030
}
3131
D.LineEdit {
3232
id: edit
33+
D.ColorSelector.inactived: false
3334
onTextChanged: {
3435
if (!initialized) {
3536
return

dcc-network/qml/NetItemEditor.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ D.ItemDelegate {
1212
Layout.fillWidth: true
1313
backgroundVisible: false
1414
checkable: false
15+
D.ColorSelector.inactived: false
1516
background: DccItemBackground {
1617
separatorVisible: true
1718
}

dcc-network/qml/NetPasswordEdit.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ D.PasswordEdit {
1212
property bool initialized: false
1313
signal textUpdated
1414

15+
D.ColorSelector.inactived: false
1516
placeholderText: qsTr("Required")
1617
echoButtonVisible: newInput
1718
showAlert: dataItem.errorKey === dccObj.name

dcc-network/qml/PageAppProxy.qml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ DccObject {
125125
weight: 20
126126
pageType: DccObject.Editor
127127
page: D.LineEdit {
128+
D.ColorSelector.inactived: false
128129
topInset: 4
129130
bottomInset: 4
130131
validator: RegularExpressionValidator {
@@ -155,6 +156,7 @@ DccObject {
155156
weight: 30
156157
pageType: DccObject.Editor
157158
page: D.LineEdit {
159+
D.ColorSelector.inactived: false
158160
topInset: 4
159161
bottomInset: 4
160162
validator: IntValidator {
@@ -186,6 +188,7 @@ DccObject {
186188
weight: 40
187189
pageType: DccObject.Editor
188190
page: D.LineEdit {
191+
D.ColorSelector.inactived: false
189192
topInset: 4
190193
bottomInset: 4
191194
text: root.config.user
@@ -257,6 +260,7 @@ DccObject {
257260
leftPadding: 0
258261
rightPadding: 0
259262
spacing: 0
263+
D.ColorSelector.inactived: false
260264
text: qsTr("Cancel")
261265
Layout.alignment: Qt.AlignRight
262266
onClicked: {
@@ -279,6 +283,7 @@ DccObject {
279283
leftPadding: 0
280284
rightPadding: 0
281285
spacing: 0
286+
D.ColorSelector.inactived: false
282287
text: qsTr("Save")
283288
Layout.alignment: Qt.AlignRight
284289
onClicked: {

dcc-network/qml/PageDSLSettings.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ DccObject {
138138
Button {
139139
Layout.fillWidth: true
140140
text: qsTr("Cancel")
141+
D.ColorSelector.inactived: false
141142
onClicked: close()
142143
}
143144
Rectangle {
@@ -148,6 +149,7 @@ DccObject {
148149

149150
D.Button {
150151
Layout.fillWidth: true
152+
D.ColorSelector.inactived: false
151153
contentItem: D.IconLabel {
152154
text: qsTr("Delete")
153155
color: "red"

dcc-network/qml/PageHotspot.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ DccObject {
236236
text: qsTr("Name (SSID)")
237237
corners: getCornersForBackground(0, colLayout.children.length)
238238
content: D.LineEdit {
239+
D.ColorSelector.inactived: false
239240
showAlert: ssidAlert
240241
alertDuration: 2000
241242
placeholderText: qsTr("Required")
@@ -327,6 +328,7 @@ DccObject {
327328
Button {
328329
Layout.fillWidth: true
329330
text: qsTr("Cancel")
331+
D.ColorSelector.inactived: false
330332
onClicked: close()
331333
}
332334
Rectangle {
@@ -337,6 +339,7 @@ DccObject {
337339

338340
D.Button {
339341
Layout.fillWidth: true
342+
D.ColorSelector.inactived: false
340343
// contentItem: D.IconLabel {
341344
text: qsTr("Save")
342345
// color: "red"

dcc-network/qml/PageSettings.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ DccObject {
141141
Button {
142142
Layout.fillWidth: true
143143
text: qsTr("Cancel")
144+
D.ColorSelector.inactived: false
144145
onClicked: close()
145146
}
146147
Rectangle {
@@ -151,6 +152,7 @@ DccObject {
151152

152153
D.Button {
153154
Layout.fillWidth: true
155+
D.ColorSelector.inactived: false
154156
contentItem: D.IconLabel {
155157
text: qsTr("Delete")
156158
color: "red"

dcc-network/qml/PageSystemProxy.qml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ DccObject {
136136
pageType: DccObject.Editor
137137
visible: method === NetType.Auto
138138
page: D.LineEdit {
139+
D.ColorSelector.inactived: false
139140
topInset: 4
140141
bottomInset: 4
141142
placeholderText: qsTr("Required")
@@ -236,6 +237,7 @@ DccObject {
236237
pageType: DccObject.Item
237238
page: TextArea {
238239
wrapMode: TextEdit.WordWrap
240+
D.ColorSelector.inactived: false
239241
text: dccObj.config
240242
onTextChanged: {
241243
if (dccObj.config !== text) {
@@ -286,6 +288,7 @@ DccObject {
286288
leftPadding: 0
287289
rightPadding: 0
288290
spacing: 0
291+
D.ColorSelector.inactived: false
289292
text: dccObj.displayName
290293
Layout.alignment: Qt.AlignRight
291294
onClicked: root.resetData()
@@ -306,6 +309,7 @@ DccObject {
306309
leftPadding: 0
307310
rightPadding: 0
308311
spacing: 0
312+
D.ColorSelector.inactived: false
309313
enabled: (method === NetType.Auto && (inputItem & 0xf0)) || (method === NetType.Manual && (inputItem & 0x0f))
310314
text: dccObj.displayName
311315
Layout.alignment: Qt.AlignRight

dcc-network/qml/PageVPN.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ DccObject {
231231
Button {
232232
Layout.fillWidth: true
233233
Layout.margins: 10
234+
D.ColorSelector.inactived: false
234235
text: qsTr("OK")
235236
onClicked: close()
236237
}
@@ -246,6 +247,7 @@ DccObject {
246247
page: NetButton {
247248
text: qsTr("Add VPN")
248249
Layout.alignment: Qt.AlignRight
250+
D.ColorSelector.inactived: false
249251
onClicked: {
250252
dccData.exec(NetManager.ConnectInfo, netItem.id, {})
251253
}

0 commit comments

Comments
 (0)