mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-02-11 09:10:01 +08:00
Compare commits
No commits in common. "d13c5a9c2cdfe44564d4e15632dd65baaf3bfcc8" and "8ab0cde2e99936f75f2d554589925d922bf34d09" have entirely different histories.
d13c5a9c2c
...
8ab0cde2e9
@ -902,7 +902,7 @@ Updated content:
|
|||||||
<location filename="qml/page/T_Buttons.qml" line="199"/>
|
<location filename="qml/page/T_Buttons.qml" line="199"/>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="320"/>
|
<location filename="qml/page/T_Buttons.qml" line="320"/>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="368"/>
|
<location filename="qml/page/T_Buttons.qml" line="368"/>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="419"/>
|
<location filename="qml/page/T_Buttons.qml" line="421"/>
|
||||||
<source>Disabled</source>
|
<source>Disabled</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1022,12 +1022,12 @@ Updated content:
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="407"/>
|
<location filename="qml/page/T_Buttons.qml" line="408"/>
|
||||||
<source>Radio Button_2</source>
|
<source>Radio Button_2</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="410"/>
|
<location filename="qml/page/T_Buttons.qml" line="412"/>
|
||||||
<source>Radio Button_3</source>
|
<source>Radio Button_3</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1421,12 +1421,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Icons.qml" line="28"/>
|
<location filename="qml/page/T_Icons.qml" line="51"/>
|
||||||
<source>Disabled</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="61"/>
|
|
||||||
<source>You Copied </source>
|
<source>You Copied </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2190,15 +2185,10 @@ Some contents...</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Text.qml" line="19"/>
|
<location filename="qml/page/T_Text.qml" line="18"/>
|
||||||
<source>This is a text that can be copied</source>
|
<source>This is a text that can be copied</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Text.qml" line="29"/>
|
|
||||||
<source>Disabled</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>T_TextBox</name>
|
<name>T_TextBox</name>
|
||||||
|
@ -929,7 +929,7 @@ Updated content:
|
|||||||
<location filename="qml/page/T_Buttons.qml" line="199"/>
|
<location filename="qml/page/T_Buttons.qml" line="199"/>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="320"/>
|
<location filename="qml/page/T_Buttons.qml" line="320"/>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="368"/>
|
<location filename="qml/page/T_Buttons.qml" line="368"/>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="419"/>
|
<location filename="qml/page/T_Buttons.qml" line="421"/>
|
||||||
<source>Disabled</source>
|
<source>Disabled</source>
|
||||||
<translation type="unfinished">禁用</translation>
|
<translation type="unfinished">禁用</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1049,12 +1049,12 @@ Updated content:
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="407"/>
|
<location filename="qml/page/T_Buttons.qml" line="408"/>
|
||||||
<source>Radio Button_2</source>
|
<source>Radio Button_2</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Buttons.qml" line="410"/>
|
<location filename="qml/page/T_Buttons.qml" line="412"/>
|
||||||
<source>Radio Button_3</source>
|
<source>Radio Button_3</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -1538,17 +1538,12 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
|
|||||||
<source>Please enter a keyword</source>
|
<source>Please enter a keyword</source>
|
||||||
<translation type="unfinished">请输入关键字</translation>
|
<translation type="unfinished">请输入关键字</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Icons.qml" line="28"/>
|
|
||||||
<source>Disabled</source>
|
|
||||||
<translation type="unfinished">禁用</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Search</source>
|
<source>Search</source>
|
||||||
<translation type="obsolete">搜索</translation>
|
<translation type="obsolete">搜索</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Icons.qml" line="61"/>
|
<location filename="qml/page/T_Icons.qml" line="51"/>
|
||||||
<source>You Copied </source>
|
<source>You Copied </source>
|
||||||
<translation type="unfinished">您复制</translation>
|
<translation type="unfinished">您复制</translation>
|
||||||
</message>
|
</message>
|
||||||
@ -2372,15 +2367,10 @@ Some contents...</source>
|
|||||||
<translation type="unfinished">文本</translation>
|
<translation type="unfinished">文本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/page/T_Text.qml" line="19"/>
|
<location filename="qml/page/T_Text.qml" line="18"/>
|
||||||
<source>This is a text that can be copied</source>
|
<source>This is a text that can be copied</source>
|
||||||
<translation type="unfinished">这是一个可以复制的文本</translation>
|
<translation type="unfinished">这是一个可以复制的文本</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location filename="qml/page/T_Text.qml" line="29"/>
|
|
||||||
<source>Disabled</source>
|
|
||||||
<translation type="unfinished">禁用</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>T_TextBox</name>
|
<name>T_TextBox</name>
|
||||||
|
@ -399,14 +399,16 @@ FluScrollablePage{
|
|||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
disabled: radio_button_switch.checked
|
|
||||||
FluRadioButton{
|
FluRadioButton{
|
||||||
|
disabled:radio_button_switch.checked
|
||||||
text: qsTr("Radio Button_1")
|
text: qsTr("Radio Button_1")
|
||||||
}
|
}
|
||||||
FluRadioButton{
|
FluRadioButton{
|
||||||
|
disabled:radio_button_switch.checked
|
||||||
text: qsTr("Radio Button_2")
|
text: qsTr("Radio Button_2")
|
||||||
}
|
}
|
||||||
FluRadioButton{
|
FluRadioButton{
|
||||||
|
disabled:radio_button_switch.checked
|
||||||
text: qsTr("Radio Button_3")
|
text: qsTr("Radio Button_3")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,6 @@ FluContentPage {
|
|||||||
grid_view.model = FluApp.iconData(text_box.text)
|
grid_view.model = FluApp.iconData(text_box.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluToggleSwitch{
|
|
||||||
id: toggle_switch
|
|
||||||
anchors{
|
|
||||||
left: text_box.right
|
|
||||||
verticalCenter: text_box.verticalCenter
|
|
||||||
leftMargin: 10
|
|
||||||
}
|
|
||||||
text: qsTr("Disabled")
|
|
||||||
}
|
|
||||||
GridView{
|
GridView{
|
||||||
id: grid_view
|
id: grid_view
|
||||||
cellWidth: 110
|
cellWidth: 110
|
||||||
@ -54,7 +45,6 @@ FluContentPage {
|
|||||||
horizontalPadding: 0
|
horizontalPadding: 0
|
||||||
bottomPadding: 30
|
bottomPadding: 30
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
disabled: toggle_switch.checked
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var text ="FluentIcons."+modelData.name;
|
var text ="FluentIcons."+modelData.name;
|
||||||
FluTools.clipText(text)
|
FluTools.clipText(text)
|
||||||
@ -67,7 +57,6 @@ FluContentPage {
|
|||||||
text: modelData.name
|
text: modelData.name
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 60
|
anchors.topMargin: 60
|
||||||
enabled: !toggle_switch.checked
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,19 +15,10 @@ FluScrollablePage{
|
|||||||
padding: 10
|
padding: 10
|
||||||
|
|
||||||
FluCopyableText{
|
FluCopyableText{
|
||||||
enabled: !toggle_switch.checked
|
|
||||||
text: qsTr("This is a text that can be copied")
|
text: qsTr("This is a text that can be copied")
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
FluToggleSwitch{
|
|
||||||
id: toggle_switch
|
|
||||||
anchors{
|
|
||||||
right: parent.right
|
|
||||||
verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
text: qsTr("Disabled")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
CodeExpander{
|
CodeExpander{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -19,19 +19,7 @@ Button {
|
|||||||
property color checkedDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
property color checkedDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
||||||
property color disableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1)
|
property color disableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1)
|
||||||
property real size: 18
|
property real size: 18
|
||||||
property color textColor: {
|
property alias textColor: btn_text.textColor
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
property bool textRight: true
|
property bool textRight: true
|
||||||
property real textSpacing: 6
|
property real textSpacing: 6
|
||||||
property bool animationEnabled: FluTheme.animationEnabled
|
property bool animationEnabled: FluTheme.animationEnabled
|
||||||
@ -139,7 +127,6 @@ Button {
|
|||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
font: control.font
|
font: control.font
|
||||||
color: control.textColor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,19 +3,7 @@ import QtQuick.Controls 2.15
|
|||||||
import FluentUI 1.0
|
import FluentUI 1.0
|
||||||
|
|
||||||
TextEdit {
|
TextEdit {
|
||||||
property color textColor: {
|
property color textColor: FluTheme.dark ? FluColors.White : FluColors.Grey220
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
id:control
|
id:control
|
||||||
color: textColor
|
color: textColor
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
@ -5,19 +5,7 @@ import FluentUI 1.0
|
|||||||
Text {
|
Text {
|
||||||
property int iconSource
|
property int iconSource
|
||||||
property int iconSize: 20
|
property int iconSize: 20
|
||||||
property color iconColor: {
|
property color iconColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
id:control
|
id:control
|
||||||
font.family: font_loader.name
|
font.family: font_loader.name
|
||||||
font.pixelSize: iconSize
|
font.pixelSize: iconSize
|
||||||
|
@ -37,19 +37,7 @@ Button {
|
|||||||
return Qt.rgba(0,0,0,1)
|
return Qt.rgba(0,0,0,1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
property color textColor: {
|
property color textColor: FluTheme.fontPrimaryColor
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Accessible.role: Accessible.Button
|
Accessible.role: Accessible.Button
|
||||||
Accessible.name: control.text
|
Accessible.name: control.text
|
||||||
Accessible.description: contentDescription
|
Accessible.description: contentDescription
|
||||||
|
@ -5,9 +5,8 @@ import FluentUI 1.0
|
|||||||
Page {
|
Page {
|
||||||
default property alias content: d.children
|
default property alias content: d.children
|
||||||
property alias currentIndex: nav_list.currentIndex
|
property alias currentIndex: nav_list.currentIndex
|
||||||
property color textHighlightColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black
|
|
||||||
property color textNormalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120
|
property color textNormalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120
|
||||||
property color textHoverColor: FluTheme.dark ? FluColors.Grey80 : FluColors.Grey150
|
property color textHoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black
|
||||||
property int textSpacing: 10
|
property int textSpacing: 10
|
||||||
property int headerSpacing: 20
|
property int headerSpacing: 20
|
||||||
property int headerHeight: 40
|
property int headerHeight: 40
|
||||||
@ -67,13 +66,9 @@ Page {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
font: control.font
|
font: control.font
|
||||||
color: {
|
color: {
|
||||||
if(nav_list.currentIndex === index) {
|
if(item_button.hovered)
|
||||||
return textHighlightColor;
|
return textHoverColor
|
||||||
}
|
return textNormalColor
|
||||||
if (item_button.hovered) {
|
|
||||||
return textHoverColor;
|
|
||||||
}
|
|
||||||
return textNormalColor;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,19 +11,7 @@ Button {
|
|||||||
property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1)
|
property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1)
|
||||||
property color hoverColor: checked ? FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)
|
property color hoverColor: checked ? FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)
|
||||||
property color disableColor: checked ? FluTheme.dark ? Qt.rgba(159/255,159/255,159/255,1) : Qt.rgba(159/255,159/255,159/255,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)
|
property color disableColor: checked ? FluTheme.dark ? Qt.rgba(159/255,159/255,159/255,1) : Qt.rgba(159/255,159/255,159/255,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)
|
||||||
property color textColor: {
|
property alias textColor: btn_text.textColor
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
property real size: 18
|
property real size: 18
|
||||||
property bool textRight: true
|
property bool textRight: true
|
||||||
property real textSpacing: 6
|
property real textSpacing: 6
|
||||||
@ -106,7 +94,6 @@ Button {
|
|||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
font: control.font
|
font: control.font
|
||||||
color: control.textColor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import FluentUI 1.0
|
|||||||
Text {
|
Text {
|
||||||
property color textColor: FluTheme.fontPrimaryColor
|
property color textColor: FluTheme.fontPrimaryColor
|
||||||
id:text
|
id:text
|
||||||
color: enabled ? textColor : (FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1))
|
color: textColor
|
||||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
font: FluTextStyle.Body
|
font: FluTextStyle.Body
|
||||||
}
|
}
|
||||||
|
@ -18,19 +18,7 @@ Button {
|
|||||||
property color dotDisableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(150/255,150/255,150/255,1)
|
property color dotDisableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(150/255,150/255,150/255,1)
|
||||||
property real textSpacing: 6
|
property real textSpacing: 6
|
||||||
property bool textRight: true
|
property bool textRight: true
|
||||||
property color textColor: {
|
property alias textColor: btn_text.textColor
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
property var clickListener : function(){
|
property var clickListener : function(){
|
||||||
checked = !checked
|
checked = !checked
|
||||||
}
|
}
|
||||||
@ -127,7 +115,6 @@ Button {
|
|||||||
text: control.text
|
text: control.text
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
color: control.textColor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,19 +20,7 @@ Button {
|
|||||||
property color checkedDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
property color checkedDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
||||||
property color disableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1)
|
property color disableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1)
|
||||||
property real size: 18
|
property real size: 18
|
||||||
property color textColor: {
|
property alias textColor: btn_text.textColor
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
property bool textRight: true
|
property bool textRight: true
|
||||||
property real textSpacing: 6
|
property real textSpacing: 6
|
||||||
property bool animationEnabled: FluTheme.animationEnabled
|
property bool animationEnabled: FluTheme.animationEnabled
|
||||||
@ -141,7 +129,6 @@ Button {
|
|||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
font: control.font
|
font: control.font
|
||||||
color: control.textColor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,19 +3,7 @@ import QtQuick.Controls
|
|||||||
import FluentUI
|
import FluentUI
|
||||||
|
|
||||||
TextEdit {
|
TextEdit {
|
||||||
property color textColor: {
|
property color textColor: FluTheme.dark ? FluColors.White : FluColors.Grey220
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
id:control
|
id:control
|
||||||
color: textColor
|
color: textColor
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
@ -5,19 +5,7 @@ import FluentUI
|
|||||||
Text {
|
Text {
|
||||||
property int iconSource
|
property int iconSource
|
||||||
property int iconSize: 20
|
property int iconSize: 20
|
||||||
property color iconColor: {
|
property color iconColor: FluTheme.dark ? "#FFFFFF" : "#000000"
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
id:control
|
id:control
|
||||||
font.family: font_loader.name
|
font.family: font_loader.name
|
||||||
font.pixelSize: iconSize
|
font.pixelSize: iconSize
|
||||||
|
@ -38,19 +38,7 @@ Button {
|
|||||||
return Qt.rgba(0,0,0,1)
|
return Qt.rgba(0,0,0,1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
property color textColor: {
|
property color textColor: FluTheme.fontPrimaryColor
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Accessible.role: Accessible.Button
|
Accessible.role: Accessible.Button
|
||||||
Accessible.name: control.text
|
Accessible.name: control.text
|
||||||
Accessible.description: contentDescription
|
Accessible.description: contentDescription
|
||||||
|
@ -6,9 +6,8 @@ import FluentUI
|
|||||||
Page {
|
Page {
|
||||||
default property alias content: d.children
|
default property alias content: d.children
|
||||||
property alias currentIndex: nav_list.currentIndex
|
property alias currentIndex: nav_list.currentIndex
|
||||||
property color textHighlightColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black
|
|
||||||
property color textNormalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120
|
property color textNormalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120
|
||||||
property color textHoverColor: FluTheme.dark ? FluColors.Grey80 : FluColors.Grey150
|
property color textHoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black
|
||||||
property int textSpacing: 10
|
property int textSpacing: 10
|
||||||
property int headerSpacing: 20
|
property int headerSpacing: 20
|
||||||
property int headerHeight: 40
|
property int headerHeight: 40
|
||||||
@ -68,13 +67,9 @@ Page {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
font: control.font
|
font: control.font
|
||||||
color: {
|
color: {
|
||||||
if(nav_list.currentIndex === index) {
|
if(item_button.hovered)
|
||||||
return textHighlightColor;
|
return textHoverColor
|
||||||
}
|
return textNormalColor
|
||||||
if (item_button.hovered) {
|
|
||||||
return textHoverColor;
|
|
||||||
}
|
|
||||||
return textNormalColor;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,19 +12,7 @@ Button {
|
|||||||
property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1)
|
property color normalColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1)
|
||||||
property color hoverColor: checked ? FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)
|
property color hoverColor: checked ? FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(1,1,1,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)
|
||||||
property color disableColor: checked ? FluTheme.dark ? Qt.rgba(159/255,159/255,159/255,1) : Qt.rgba(159/255,159/255,159/255,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)
|
property color disableColor: checked ? FluTheme.dark ? Qt.rgba(159/255,159/255,159/255,1) : Qt.rgba(159/255,159/255,159/255,1) : FluTheme.dark ? Qt.rgba(43/255,43/255,43/255,1) : Qt.rgba(222/255,222/255,222/255,1)
|
||||||
property color textColor: {
|
property alias textColor: btn_text.textColor
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
property real size: 18
|
property real size: 18
|
||||||
property bool textRight: true
|
property bool textRight: true
|
||||||
property real textSpacing: 6
|
property real textSpacing: 6
|
||||||
@ -102,7 +90,6 @@ Button {
|
|||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
font: control.font
|
font: control.font
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
color: control.textColor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import FluentUI
|
|||||||
Text {
|
Text {
|
||||||
property color textColor: FluTheme.fontPrimaryColor
|
property color textColor: FluTheme.fontPrimaryColor
|
||||||
id:text
|
id:text
|
||||||
color: enabled ? textColor : (FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1))
|
color: textColor
|
||||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
font: FluTextStyle.Body
|
font: FluTextStyle.Body
|
||||||
}
|
}
|
||||||
|
@ -19,19 +19,7 @@ Button {
|
|||||||
property color dotDisableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(150/255,150/255,150/255,1)
|
property color dotDisableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(150/255,150/255,150/255,1)
|
||||||
property real textSpacing: 6
|
property real textSpacing: 6
|
||||||
property bool textRight: true
|
property bool textRight: true
|
||||||
property color textColor: {
|
property alias textColor: btn_text.textColor
|
||||||
if(FluTheme.dark){
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(130/255,130/255,130/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(1,1,1,1)
|
|
||||||
}else{
|
|
||||||
if(!enabled){
|
|
||||||
return Qt.rgba(161/255,161/255,161/255,1)
|
|
||||||
}
|
|
||||||
return Qt.rgba(0,0,0,1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
property var clickListener : function(){
|
property var clickListener : function(){
|
||||||
checked = !checked
|
checked = !checked
|
||||||
}
|
}
|
||||||
@ -128,7 +116,6 @@ Button {
|
|||||||
text: control.text
|
text: control.text
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
color: control.textColor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user