diff --git a/src/controls/FluAppBar.qml b/src/controls/FluAppBar.qml index 64d1cf1..9fd26fb 100644 --- a/src/controls/FluAppBar.qml +++ b/src/controls/FluAppBar.qml @@ -19,8 +19,6 @@ Rectangle{ property color maximizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.1) : Qt.rgba(0,0,0,0.06) property color closeNormalColor: Qt.rgba(0,0,0,0) property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1) - - property bool showDark: false property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark diff --git a/src/controls/FluAutoSuggestBox.qml b/src/controls/FluAutoSuggestBox.qml index 32ba2c2..5194cf3 100644 --- a/src/controls/FluAutoSuggestBox.qml +++ b/src/controls/FluAutoSuggestBox.qml @@ -3,20 +3,25 @@ import QtQuick.Controls import FluentUI FluTextBox{ + property var items:[] property string emptyText: "没有找到结果" property int autoSuggestBoxReplacement: FluentIcons.Search signal itemClicked(var data) signal handleClicked + + id:control + width: 300 + + Component.onCompleted: { + loadData() + } + QtObject{ id:d property bool flagVisible: true } - id:control - width: 300 - Component.onCompleted: { - loadData() - } + Popup{ id:control_popup y:control.height diff --git a/src/controls/FluCarousel.qml b/src/controls/FluCarousel.qml index 759fed8..31c946c 100644 --- a/src/controls/FluCarousel.qml +++ b/src/controls/FluCarousel.qml @@ -12,9 +12,11 @@ Item { id:control width: 400 height: 300 + ListModel{ id:content_model } + FluRectangle{ anchors.fill: parent radius: [control.radius,control.radius,control.radius,control.radius] diff --git a/src/controls/FluDatePicker.qml b/src/controls/FluDatePicker.qml index 84be305..b5b1330 100644 --- a/src/controls/FluDatePicker.qml +++ b/src/controls/FluDatePicker.qml @@ -14,7 +14,6 @@ Rectangle { property bool changeFlag: true readonly property var rowData: ["","",""] - id:root color: { if(mouse_area.containsMouse){ diff --git a/src/controls/FluPivot.qml b/src/controls/FluPivot.qml index fc9301d..d18958e 100644 --- a/src/controls/FluPivot.qml +++ b/src/controls/FluPivot.qml @@ -4,13 +4,12 @@ import FluentUI Item { - - id:control default property alias content: d.children property alias currentIndex: nav_list.currentIndex property color normalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120 property color hoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black + id:control width: 400 height: 300 implicitHeight: height diff --git a/src/controls/FluRectangle.qml b/src/controls/FluRectangle.qml index 90728ab..7177e03 100644 --- a/src/controls/FluRectangle.qml +++ b/src/controls/FluRectangle.qml @@ -3,12 +3,14 @@ import QtQuick.Controls import Qt5Compat.GraphicalEffects Item{ - id:control + property var radius:[0,0,0,0] property color color : "#FFFFFF" property bool shadow: true default property alias contentItem: container.data + id:control + FluShadow{ anchors.fill: container radius: control.radius[0] diff --git a/src/controls/FluScrollBar.qml b/src/controls/FluScrollBar.qml index 0a0d5b3..a814b59 100644 --- a/src/controls/FluScrollBar.qml +++ b/src/controls/FluScrollBar.qml @@ -3,13 +3,13 @@ import QtQuick.Controls import FluentUI ScrollBar { - id: control property color handleNormalColor: Qt.rgba(134/255,134/255,134/255,1) property color handleHoverColor: Qt.lighter(handleNormalColor) property color handlePressColor: Qt.darker(handleNormalColor) property bool expand: false + id: control implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, implicitContentWidth + leftPadding + rightPadding) implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, diff --git a/src/controls/FluTabView.qml b/src/controls/FluTabView.qml index 6cdd7ea..ced4b68 100644 --- a/src/controls/FluTabView.qml +++ b/src/controls/FluTabView.qml @@ -5,21 +5,6 @@ import FluentUI Item { - id:control - anchors.fill: { - if(parent) - return parent - return undefined - } - - implicitHeight: height - implicitWidth: width - - MouseArea{ - anchors.fill: parent - preventStealing: true - } - enum TabWidthBehavior { Equal, SizeToContent, @@ -38,6 +23,15 @@ Item { property bool addButtonVisibility: true signal newPressed + id:control + implicitHeight: height + implicitWidth: width + anchors.fill: { + if(parent) + return parent + return undefined + } + QtObject { id: d property int dragIndex: -1 @@ -46,6 +40,11 @@ Item { property int maxEqualWidth: 240 } + MouseArea{ + anchors.fill: parent + preventStealing: true + } + ListModel{ id:tab_model } diff --git a/src/controls/FluTableView.qml b/src/controls/FluTableView.qml index ad74a3c..c2d6e7a 100644 --- a/src/controls/FluTableView.qml +++ b/src/controls/FluTableView.qml @@ -5,7 +5,6 @@ import FluentUI Item { - id:control property var columns : [] property var dataSource : [] property int pageCurrent: 1 @@ -14,6 +13,7 @@ Item { property int itemHeight: 56 signal requestPage(int page,int count) + id:control implicitHeight: layout_coumns.height + layout_table.height MouseArea{ diff --git a/src/controls/FluText.qml b/src/controls/FluText.qml index 4224a18..a6a8bbf 100644 --- a/src/controls/FluText.qml +++ b/src/controls/FluText.qml @@ -3,10 +3,6 @@ import FluentUI Text { - property int fontStyle: FluText.Body - property color textColor: FluTheme.dark ? FluColors.White : FluColors.Grey220 - property int pixelSize : FluTheme.textSize - enum FontStyle { Display, TitleLarge, @@ -17,6 +13,10 @@ Text { Caption } + property int fontStyle: FluText.Body + property color textColor: FluTheme.dark ? FluColors.White : FluColors.Grey220 + property int pixelSize : FluTheme.textSize + id:text color: textColor renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering diff --git a/src/controls/FluTextBoxBackground.qml b/src/controls/FluTextBoxBackground.qml index a8dc03e..6260fc6 100644 --- a/src/controls/FluTextBoxBackground.qml +++ b/src/controls/FluTextBoxBackground.qml @@ -2,10 +2,10 @@ import Qt5Compat.GraphicalEffects Rectangle{ - id:content property Item inputItem + id:content radius: 4 layer.enabled: true color: { diff --git a/src/controls/FluTextBoxMenu.qml b/src/controls/FluTextBoxMenu.qml index 5c6b721..8ff1e31 100644 --- a/src/controls/FluTextBoxMenu.qml +++ b/src/controls/FluTextBoxMenu.qml @@ -1,12 +1,15 @@ import QtQuick +import QtQuick.Controls import FluentUI FluMenu{ + property string cutText : "剪切" property string copyText : "复制" property string pasteText : "粘贴" property string selectAllText : "全选" property var inputItem + id:menu focus: false FluMenuItem{ diff --git a/src/controls/FluTooltip.qml b/src/controls/FluTooltip.qml index f10b3e0..5d189fd 100644 --- a/src/controls/FluTooltip.qml +++ b/src/controls/FluTooltip.qml @@ -3,6 +3,7 @@ import QtQuick.Controls import FluentUI ToolTip { + id:tool_tip contentItem: FluText { diff --git a/src/controls/FluTreeView.qml b/src/controls/FluTreeView.qml index ded9f6e..4542566 100644 --- a/src/controls/FluTreeView.qml +++ b/src/controls/FluTreeView.qml @@ -11,6 +11,7 @@ Item { Single, Multiple } + property int selectionMode: FluTreeView.None property var currentElement property var currentParentElement