mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 21:37:04 +08:00
update
This commit is contained in:
parent
a37e4e3b9f
commit
c25e2362c4
@ -8,7 +8,6 @@ FluExpander{
|
|||||||
|
|
||||||
id:control
|
id:control
|
||||||
property string code: ""
|
property string code: ""
|
||||||
|
|
||||||
headerText: "Source"
|
headerText: "Source"
|
||||||
contentHeight:content.height
|
contentHeight:content.height
|
||||||
focus: false
|
focus: false
|
||||||
@ -16,10 +15,12 @@ FluExpander{
|
|||||||
FluMultilineTextBox{
|
FluMultilineTextBox{
|
||||||
id:content
|
id:content
|
||||||
width:parent.width
|
width:parent.width
|
||||||
|
activeFocusOnTab: false
|
||||||
|
activeFocusOnPress: false
|
||||||
|
readOnly: true
|
||||||
text:highlightQmlCode(code)
|
text:highlightQmlCode(code)
|
||||||
textFormat: FluMultilineTextBox.RichText
|
textFormat: FluMultilineTextBox.RichText
|
||||||
KeyNavigation.priority: KeyNavigation.BeforeItem
|
KeyNavigation.priority: KeyNavigation.BeforeItem
|
||||||
enabled: false
|
|
||||||
background:Rectangle{
|
background:Rectangle{
|
||||||
radius: 4
|
radius: 4
|
||||||
color:FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
color:FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
||||||
|
@ -64,8 +64,8 @@ CustomWindow {
|
|||||||
negativeText:"最小化"
|
negativeText:"最小化"
|
||||||
buttonFlags: FluContentDialog.NeutralButton | FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
|
buttonFlags: FluContentDialog.NeutralButton | FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
|
||||||
onNegativeClicked:{
|
onNegativeClicked:{
|
||||||
system_tray.showMessage("友情提示","FluentUI已隐藏至托盘,点击托盘可再次激活窗口");
|
|
||||||
window.hide()
|
window.hide()
|
||||||
|
system_tray.showMessage("友情提示","FluentUI已隐藏至托盘,点击托盘可再次激活窗口");
|
||||||
}
|
}
|
||||||
positiveText:"退出"
|
positiveText:"退出"
|
||||||
neutralText:"取消"
|
neutralText:"取消"
|
||||||
|
@ -6,6 +6,7 @@ import FluentUI
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
property bool disabled: false
|
property bool disabled: false
|
||||||
|
property string contentDescription: ""
|
||||||
property color borderNormalColor: FluTheme.dark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1)
|
property color borderNormalColor: FluTheme.dark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1)
|
||||||
property color bordercheckedColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
property color bordercheckedColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||||
property color borderHoverColor: FluTheme.dark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1)
|
property color borderHoverColor: FluTheme.dark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1)
|
||||||
@ -30,6 +31,10 @@ Button {
|
|||||||
visible: control.activeFocus
|
visible: control.activeFocus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Accessible.role: Accessible.Button
|
||||||
|
Accessible.name: control.text
|
||||||
|
Accessible.description: contentDescription
|
||||||
|
Accessible.onPressAction: control.clicked()
|
||||||
focusPolicy:Qt.TabFocus
|
focusPolicy:Qt.TabFocus
|
||||||
contentItem: RowLayout{
|
contentItem: RowLayout{
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
@ -5,6 +5,7 @@ import QtQuick.Templates as T
|
|||||||
|
|
||||||
T.Button {
|
T.Button {
|
||||||
id: control
|
id: control
|
||||||
|
property string contentDescription: ""
|
||||||
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
||||||
implicitContentWidth + leftPadding + rightPadding)
|
implicitContentWidth + leftPadding + rightPadding)
|
||||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||||
@ -20,4 +21,8 @@ T.Button {
|
|||||||
radius:8
|
radius:8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Accessible.role: Accessible.Button
|
||||||
|
Accessible.name: control.text
|
||||||
|
Accessible.description: contentDescription
|
||||||
|
Accessible.onPressAction: control.clicked()
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,8 @@ TextField {
|
|||||||
id:control
|
id:control
|
||||||
color: textColor
|
color: textColor
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
activeFocusOnTab: false
|
||||||
|
activeFocusOnPress: false
|
||||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
padding: 0
|
padding: 0
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
|
@ -4,7 +4,6 @@ import QtQuick.Controls.Basic
|
|||||||
import FluentUI
|
import FluentUI
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
|
||||||
property bool disabled: false
|
property bool disabled: false
|
||||||
property string contentDescription: ""
|
property string contentDescription: ""
|
||||||
property color normalColor: {
|
property color normalColor: {
|
||||||
|
@ -6,6 +6,7 @@ import FluentUI
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
property bool disabled: false
|
property bool disabled: false
|
||||||
|
property string contentDescription: ""
|
||||||
property color disableColor: checked ? FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(159/255,159/255,159/255,1) :FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(240/255,240/255,240/255,1)
|
property color disableColor: checked ? FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(159/255,159/255,159/255,1) :FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(240/255,240/255,240/255,1)
|
||||||
property color checkColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
property color checkColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||||
property color hoverColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(240/255,240/255,240/255,1)
|
property color hoverColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(240/255,240/255,240/255,1)
|
||||||
@ -19,6 +20,10 @@ Button {
|
|||||||
checked = !checked
|
checked = !checked
|
||||||
}
|
}
|
||||||
id: control
|
id: control
|
||||||
|
Accessible.role: Accessible.Button
|
||||||
|
Accessible.name: control.text
|
||||||
|
Accessible.description: contentDescription
|
||||||
|
Accessible.onPressAction: control.clicked()
|
||||||
height: 20
|
height: 20
|
||||||
enabled: !disabled
|
enabled: !disabled
|
||||||
implicitHeight: height
|
implicitHeight: height
|
||||||
|
Loading…
Reference in New Issue
Block a user