This commit is contained in:
zhuzichu 2023-04-22 18:18:13 +08:00
parent 9e0050be63
commit e16a8d6b09
14 changed files with 42 additions and 33 deletions

View File

@ -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 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 closeNormalColor: Qt.rgba(0,0,0,0)
property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1) property color closeHoverColor: Qt.rgba(251/255,115/255,115/255,1)
property bool showDark: false property bool showDark: false
property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark property color borerlessColor : FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark

View File

@ -3,20 +3,25 @@ import QtQuick.Controls
import FluentUI import FluentUI
FluTextBox{ FluTextBox{
property var items:[] property var items:[]
property string emptyText: "没有找到结果" property string emptyText: "没有找到结果"
property int autoSuggestBoxReplacement: FluentIcons.Search property int autoSuggestBoxReplacement: FluentIcons.Search
signal itemClicked(var data) signal itemClicked(var data)
signal handleClicked signal handleClicked
id:control
width: 300
Component.onCompleted: {
loadData()
}
QtObject{ QtObject{
id:d id:d
property bool flagVisible: true property bool flagVisible: true
} }
id:control
width: 300
Component.onCompleted: {
loadData()
}
Popup{ Popup{
id:control_popup id:control_popup
y:control.height y:control.height

View File

@ -12,9 +12,11 @@ Item {
id:control id:control
width: 400 width: 400
height: 300 height: 300
ListModel{ ListModel{
id:content_model id:content_model
} }
FluRectangle{ FluRectangle{
anchors.fill: parent anchors.fill: parent
radius: [control.radius,control.radius,control.radius,control.radius] radius: [control.radius,control.radius,control.radius,control.radius]

View File

@ -14,7 +14,6 @@ Rectangle {
property bool changeFlag: true property bool changeFlag: true
readonly property var rowData: ["","",""] readonly property var rowData: ["","",""]
id:root id:root
color: { color: {
if(mouse_area.containsMouse){ if(mouse_area.containsMouse){

View File

@ -4,13 +4,12 @@ import FluentUI
Item { Item {
id:control
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 normalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120 property color normalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120
property color hoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black property color hoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black
id:control
width: 400 width: 400
height: 300 height: 300
implicitHeight: height implicitHeight: height

View File

@ -3,12 +3,14 @@ import QtQuick.Controls
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
Item{ Item{
id:control
property var radius:[0,0,0,0] property var radius:[0,0,0,0]
property color color : "#FFFFFF" property color color : "#FFFFFF"
property bool shadow: true property bool shadow: true
default property alias contentItem: container.data default property alias contentItem: container.data
id:control
FluShadow{ FluShadow{
anchors.fill: container anchors.fill: container
radius: control.radius[0] radius: control.radius[0]

View File

@ -3,13 +3,13 @@ import QtQuick.Controls
import FluentUI import FluentUI
ScrollBar { ScrollBar {
id: control
property color handleNormalColor: Qt.rgba(134/255,134/255,134/255,1) property color handleNormalColor: Qt.rgba(134/255,134/255,134/255,1)
property color handleHoverColor: Qt.lighter(handleNormalColor) property color handleHoverColor: Qt.lighter(handleNormalColor)
property color handlePressColor: Qt.darker(handleNormalColor) property color handlePressColor: Qt.darker(handleNormalColor)
property bool expand: false property bool expand: false
id: control
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,

View File

@ -5,21 +5,6 @@ import FluentUI
Item { Item {
id:control
anchors.fill: {
if(parent)
return parent
return undefined
}
implicitHeight: height
implicitWidth: width
MouseArea{
anchors.fill: parent
preventStealing: true
}
enum TabWidthBehavior { enum TabWidthBehavior {
Equal, Equal,
SizeToContent, SizeToContent,
@ -38,6 +23,15 @@ Item {
property bool addButtonVisibility: true property bool addButtonVisibility: true
signal newPressed signal newPressed
id:control
implicitHeight: height
implicitWidth: width
anchors.fill: {
if(parent)
return parent
return undefined
}
QtObject { QtObject {
id: d id: d
property int dragIndex: -1 property int dragIndex: -1
@ -46,6 +40,11 @@ Item {
property int maxEqualWidth: 240 property int maxEqualWidth: 240
} }
MouseArea{
anchors.fill: parent
preventStealing: true
}
ListModel{ ListModel{
id:tab_model id:tab_model
} }

View File

@ -5,7 +5,6 @@ import FluentUI
Item { Item {
id:control
property var columns : [] property var columns : []
property var dataSource : [] property var dataSource : []
property int pageCurrent: 1 property int pageCurrent: 1
@ -14,6 +13,7 @@ Item {
property int itemHeight: 56 property int itemHeight: 56
signal requestPage(int page,int count) signal requestPage(int page,int count)
id:control
implicitHeight: layout_coumns.height + layout_table.height implicitHeight: layout_coumns.height + layout_table.height
MouseArea{ MouseArea{

View File

@ -3,10 +3,6 @@ import FluentUI
Text { Text {
property int fontStyle: FluText.Body
property color textColor: FluTheme.dark ? FluColors.White : FluColors.Grey220
property int pixelSize : FluTheme.textSize
enum FontStyle { enum FontStyle {
Display, Display,
TitleLarge, TitleLarge,
@ -17,6 +13,10 @@ Text {
Caption Caption
} }
property int fontStyle: FluText.Body
property color textColor: FluTheme.dark ? FluColors.White : FluColors.Grey220
property int pixelSize : FluTheme.textSize
id:text id:text
color: textColor color: textColor
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering

View File

@ -2,10 +2,10 @@
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
Rectangle{ Rectangle{
id:content
property Item inputItem property Item inputItem
id:content
radius: 4 radius: 4
layer.enabled: true layer.enabled: true
color: { color: {

View File

@ -1,12 +1,15 @@
import QtQuick import QtQuick
import QtQuick.Controls
import FluentUI import FluentUI
FluMenu{ FluMenu{
property string cutText : "剪切" property string cutText : "剪切"
property string copyText : "复制" property string copyText : "复制"
property string pasteText : "粘贴" property string pasteText : "粘贴"
property string selectAllText : "全选" property string selectAllText : "全选"
property var inputItem property var inputItem
id:menu id:menu
focus: false focus: false
FluMenuItem{ FluMenuItem{

View File

@ -3,6 +3,7 @@ import QtQuick.Controls
import FluentUI import FluentUI
ToolTip { ToolTip {
id:tool_tip id:tool_tip
contentItem: FluText { contentItem: FluText {

View File

@ -11,6 +11,7 @@ Item {
Single, Single,
Multiple Multiple
} }
property int selectionMode: FluTreeView.None property int selectionMode: FluTreeView.None
property var currentElement property var currentElement
property var currentParentElement property var currentParentElement