Skip to content

Commit dd7bf37

Browse files
committed
fix: Mod Etheme colors,fix qmllint problem.
1 parent 24ab57e commit dd7bf37

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Editor/Qml/ESwitch.qml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import QtQuick
22
import QtQuick.Controls
33
import QtQuick.Controls.Basic
4-
import QtQuick.Layouts
54

65

76
Item {
@@ -26,12 +25,12 @@ Item {
2625

2726
signal clicked()
2827

29-
id: 'root'
28+
id: root
3029
implicitWidth: switchWidget.implicitWidth
3130
implicitHeight: switchWidget.implicitHeight
3231

3332
Switch {
34-
id: 'switchWidget'
33+
id: switchWidget
3534
enabled: !root.disabled
3635
checked: root.checked
3736
onClicked: root.clicked()
@@ -41,12 +40,12 @@ Item {
4140
if (disabled) {
4241
return checked ? ETheme.disabledCheckedColor : ETheme.disabledColor;
4342
}
44-
return checked ? ETheme.primaryColor : ETheme.inputBoxColor;
43+
return checked ? ETheme.primaryColor : ETheme.secondaryBgColor;
4544
}
4645

4746
implicitWidth: 40 + 2 * (root.size - 1)
4847
implicitHeight: 24 + 2 * (root.size - 1)
49-
x: parent.leftPadding
48+
x: switchWidget.leftPadding
5049
anchors.verticalCenter: parent.verticalCenter
5150
radius: width / 2
5251
color: getBackgroundColor(switchWidget.checked, root.disabled)

Editor/Qml/ETheme.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ QtObject {
1313
property color disabledColor: Qt.color('#676563')
1414
property color fontColor: Qt.color('#ecf0f1')
1515
property color linkFontColor: Qt.color('#91b9c4')
16-
property color inputBoxColor: Qt.color('#c0c0c0')
16+
property color secondaryBgColor: Qt.color('#8e8e8e')
1717
property color disabledCheckedColor: Qt.color('#c9a9a6')
1818

1919
property FontLoader normalFont: FontLoader { source: Qt.url('Resource/Font/MiSans-Normal.ttf') }

0 commit comments

Comments
 (0)