From e8460c2409b4a404193cd5b2e5287639c58c7b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Wed, 5 Apr 2023 21:42:12 +0800 Subject: [PATCH] update --- example/T_CheckBox.qml | 25 ++++++++++++++---- example/T_Slider.qml | 46 +++++++++++++++++++++++++++------ src/controls/FluTextBoxMenu.qml | 2 +- 3 files changed, 59 insertions(+), 14 deletions(-) diff --git a/example/T_CheckBox.qml b/example/T_CheckBox.qml index 417d232..184eda1 100644 --- a/example/T_CheckBox.qml +++ b/example/T_CheckBox.qml @@ -3,6 +3,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls import FluentUI +import "./component" FluScrollablePage{ @@ -10,14 +11,28 @@ FluScrollablePage{ leftPadding:10 rightPadding:10 bottomPadding:20 + spacing: 0 - FluCheckBox{ + FluArea{ + Layout.fillWidth: true + height: 68 + paddings: 10 Layout.topMargin: 20 + Row{ + spacing: 30 + anchors.verticalCenter: parent.verticalCenter + FluCheckBox{ + } + FluCheckBox{ + text:"Text" + } + } } - - FluCheckBox{ - Layout.topMargin: 20 - text:"Text" + CodeExpander{ + Layout.fillWidth: true + code:'FluCheckBox{ + text:"Text" +}' } } diff --git a/example/T_Slider.qml b/example/T_Slider.qml index fa56cdf..31f22fc 100644 --- a/example/T_Slider.qml +++ b/example/T_Slider.qml @@ -2,6 +2,7 @@ import QtQuick.Layouts import QtQuick.Window import QtQuick.Controls +import "./component" import FluentUI FluScrollablePage{ @@ -10,17 +11,46 @@ FluScrollablePage{ leftPadding:10 rightPadding:10 bottomPadding:20 + spacing: 0 - FluSlider{ + FluArea{ + Layout.fillWidth: true + height: 100 + paddings: 10 Layout.topMargin: 20 - value: 50 - Layout.leftMargin: 10 + FluSlider{ + value: 50 + anchors.verticalCenter: parent.verticalCenter + } } - FluSlider{ - vertical:true + CodeExpander{ + Layout.fillWidth: true + code:'FluSlider{ + value:50 +}' + } + + + FluArea{ + Layout.fillWidth: true + height: 200 + paddings: 10 Layout.topMargin: 20 - Layout.leftMargin: 10 - Layout.bottomMargin: 20 - value: 50 + FluSlider{ + value: 50 + vertical:true + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.verticalCenter: parent.verticalCenter + } } + CodeExpander{ + Layout.fillWidth: true + code:'FluSlider{ + vertical:true + value:50 +}' + } + + } diff --git a/src/controls/FluTextBoxMenu.qml b/src/controls/FluTextBoxMenu.qml index d4920f7..5c6b721 100644 --- a/src/controls/FluTextBoxMenu.qml +++ b/src/controls/FluTextBoxMenu.qml @@ -11,7 +11,7 @@ FluMenu{ focus: false FluMenuItem{ text: cutText - visible: inputItem.text !== "" + visible: inputItem.text !== "" && !inputItem.readOnly onClicked: { inputItem.cut() }