File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 11import QtQuick
22import QtQuick.Controls
33import QtQuick.Controls.Basic
4- import QtQuick.Layouts
54
65
76Item {
@@ -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 )
Original file line number Diff line number Diff 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' ) }
You can’t perform that action at this time.
0 commit comments