This commit is contained in:
zhuzichu 2023-06-25 19:01:22 +08:00
parent cd577c5599
commit e1096b8e22
5 changed files with 14 additions and 3 deletions

View File

@ -5,7 +5,8 @@ import QtQuick.Layouts
import FluentUI import FluentUI
Window { Window {
id:app id: app
flags: Qt.SplashScreen
Component.onCompleted: { Component.onCompleted: {
FluApp.init(app) FluApp.init(app)
FluTheme.darkMode = FluDarkMode.System FluTheme.darkMode = FluDarkMode.System

View File

@ -134,6 +134,7 @@ CustomWindow {
FluRemoteLoader{ FluRemoteLoader{
id:loader id:loader
lazy: true
anchors.fill: parent anchors.fill: parent
// source: "http://localhost:9000/RemoteComponent.qml" // source: "http://localhost:9000/RemoteComponent.qml"
source: "https://zhu-zichu.gitee.io/RemoteComponent.qml" source: "https://zhu-zichu.gitee.io/RemoteComponent.qml"

View File

@ -44,6 +44,7 @@ ComboBox {
bottomPadding: 6 - control.padding bottomPadding: 6 - control.padding
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
selectionColor: FluTheme.primaryColor.lightest selectionColor: FluTheme.primaryColor.lightest
selectedTextColor: control.palette.highlightedText
text: control.editable ? control.editText : control.displayText text: control.editable ? control.editText : control.displayText
enabled: control.editable enabled: control.editable
autoScroll: control.editable autoScroll: control.editable
@ -57,12 +58,14 @@ ComboBox {
leftInset:1 leftInset:1
topInset:1 topInset:1
bottomInset:1 bottomInset:1
focus: true
rightInset:1 rightInset:1
background: FluTextBoxBackground{ background: FluTextBoxBackground{
border.width: 0 border.width: 0
inputItem: contentItem inputItem: contentItem
} }
Component.onCompleted: {
focus = true
}
} }
background: Rectangle { background: Rectangle {

View File

@ -14,6 +14,7 @@ TextEdit {
leftPadding: 0 leftPadding: 0
rightPadding: 0 rightPadding: 0
topPadding: 0 topPadding: 0
selectedTextColor: FluColors.Grey220
bottomPadding: 0 bottomPadding: 0
selectionColor: FluTheme.primaryColor.lightest selectionColor: FluTheme.primaryColor.lightest
font:FluTextStyle.Body font:FluTextStyle.Body

View File

@ -4,15 +4,20 @@ import FluentUI
FluStatusView { FluStatusView {
property url source: "" property url source: ""
property bool lazy: false
color:"transparent" color:"transparent"
id:control id:control
onErrorClicked: { onErrorClicked: {
reload() reload()
} }
Component.onCompleted: {
if(!lazy){
loader.source = control.source
}
}
Loader{ Loader{
id:loader id:loader
anchors.fill: parent anchors.fill: parent
source: control.source
asynchronous: true asynchronous: true
onStatusChanged: { onStatusChanged: {
if(status === Loader.Error){ if(status === Loader.Error){