main
zhuzihcu 2023-06-08 14:23:00 +08:00
parent a37e4e3b9f
commit c25e2362c4
7 changed files with 21 additions and 4 deletions

View File

@ -8,7 +8,6 @@ FluExpander{
id:control
property string code: ""
headerText: "Source"
contentHeight:content.height
focus: false
@ -16,10 +15,12 @@ FluExpander{
FluMultilineTextBox{
id:content
width:parent.width
activeFocusOnTab: false
activeFocusOnPress: false
readOnly: true
text:highlightQmlCode(code)
textFormat: FluMultilineTextBox.RichText
KeyNavigation.priority: KeyNavigation.BeforeItem
enabled: false
background:Rectangle{
radius: 4
color:FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1)

View File

@ -64,8 +64,8 @@ CustomWindow {
negativeText:"最小化"
buttonFlags: FluContentDialog.NeutralButton | FluContentDialog.NegativeButton | FluContentDialog.PositiveButton
onNegativeClicked:{
system_tray.showMessage("友情提示","FluentUI已隐藏至托盘,点击托盘可再次激活窗口");
window.hide()
system_tray.showMessage("友情提示","FluentUI已隐藏至托盘,点击托盘可再次激活窗口");
}
positiveText:"退出"
neutralText:"取消"

View File

@ -6,6 +6,7 @@ import FluentUI
Button {
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 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)
@ -30,6 +31,10 @@ Button {
visible: control.activeFocus
}
}
Accessible.role: Accessible.Button
Accessible.name: control.text
Accessible.description: contentDescription
Accessible.onPressAction: control.clicked()
focusPolicy:Qt.TabFocus
contentItem: RowLayout{
spacing: 4

View File

@ -5,6 +5,7 @@ import QtQuick.Templates as T
T.Button {
id: control
property string contentDescription: ""
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
@ -20,4 +21,8 @@ T.Button {
radius:8
}
}
Accessible.role: Accessible.Button
Accessible.name: control.text
Accessible.description: contentDescription
Accessible.onPressAction: control.clicked()
}

View File

@ -7,6 +7,8 @@ TextField {
id:control
color: textColor
readOnly: true
activeFocusOnTab: false
activeFocusOnPress: false
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
padding: 0
leftPadding: 0

View File

@ -4,7 +4,6 @@ import QtQuick.Controls.Basic
import FluentUI
Button {
property bool disabled: false
property string contentDescription: ""
property color normalColor: {

View File

@ -6,6 +6,7 @@ import FluentUI
Button {
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 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)
@ -19,6 +20,10 @@ Button {
checked = !checked
}
id: control
Accessible.role: Accessible.Button
Accessible.name: control.text
Accessible.description: contentDescription
Accessible.onPressAction: control.clicked()
height: 20
enabled: !disabled
implicitHeight: height