This commit is contained in:
zhuzichu 2023-09-25 18:10:24 +08:00
parent 7a1776407f
commit 7716ab02a6
14 changed files with 121 additions and 19 deletions

View File

@ -129,6 +129,11 @@ FluObject{
onDropped:{ FluApp.navigate("/pageWindow",{title:title,url:url}) }
onTap:{ navigationView.push(url) }
}
FluPaneItem{
title:"PaneItem Disabled"
disabled: true
icon: FluentIcons.Error
}
}
FluPaneItemExpander{
@ -370,6 +375,12 @@ FluObject{
}
}
FluPaneItemExpander{
title:"PaneItemExpander Disabled"
icon: FluentIcons.Send
disabled: true
}
FluPaneItemSeparator{
spacing:10
size:1

View File

@ -36,7 +36,7 @@ FluScrollablePage{
left: parent.left
}
FluCalendarPicker{
current:Date.fromLocaleString("2013年7月11日 21:17:42")
current:new Date()
onAccepted:{
showSuccess(current.toLocaleString())
}

View File

@ -84,7 +84,7 @@ FluScrollablePage{
text:"找到一份Android外包开发岗位开发了一个Android应用满满成就感前端、服务端、Flutter也都懂一丢丢什么都会什么都不精通钱途无望"
}
ListElement{
lable:"2020-06-01"
lable:"2021-06-01"
text:"由于某个项目紧急临时加入Qt项目组就因为大学学了点C++),本来是想进去打个酱油,到后面竟然成开发主力,坑啊"
}
ListElement{

View File

@ -129,6 +129,11 @@ FluObject{
onDropped:{ FluApp.navigate("/pageWindow",{title:title,url:url}) }
onTap:{ navigationView.push(url) }
}
FluPaneItem{
title:"PaneItem Disabled"
disabled: true
icon: FluentIcons.Error
}
}
FluPaneItemExpander{
@ -370,6 +375,12 @@ FluObject{
}
}
FluPaneItemExpander{
title:"PaneItemExpander Disabled"
icon: FluentIcons.Send
disabled: true
}
FluPaneItemSeparator{
spacing:10
size:1

View File

@ -37,7 +37,7 @@ FluScrollablePage{
left: parent.left
}
FluCalendarPicker{
current:Date.fromLocaleString("2013年7月11日 21:17:42")
current:new Date()
onAccepted:{
showSuccess(current.toLocaleString())
}

View File

@ -85,7 +85,7 @@ FluScrollablePage{
text:"找到一份Android外包开发岗位开发了一个Android应用满满成就感前端、服务端、Flutter也都懂一丢丢什么都会什么都不精通钱途无望"
}
ListElement{
lable:"2020-06-01"
lable:"2021-06-01"
text:"由于某个项目紧急临时加入Qt项目组就因为大学学了点C++),本来是想进去打个酱油,到后面竟然成开发主力,坑啊"
}
ListElement{

View File

@ -164,21 +164,16 @@ Rectangle{
onClicked: closeClickListener()
}
}
function minimizeButton(){
return btn_minimize
}
function maximizeButton(){
return btn_maximize
}
function closeButton(){
return btn_close
}
function darkButton(){
return btn_dark
}
}

View File

@ -30,6 +30,7 @@ Item {
property bool isCompactAndPanel: d.displayMode === FluNavigationViewType.Compact && d.enableNavigationPanel
property bool isCompactAndNotPanel:d.displayMode === FluNavigationViewType.Compact && !d.enableNavigationPanel
property bool isMinimalAndPanel: d.displayMode === FluNavigationViewType.Minimal && d.enableNavigationPanel
property color itemDisableColor: FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1)
onIsCompactAndNotPanelChanged: {
collapseAll()
}
@ -163,6 +164,7 @@ Item {
width: layout_list.width
FluControl{
id:item_control
enabled: !model.disabled
anchors{
top: parent.top
bottom: parent.bottom
@ -272,8 +274,17 @@ Item {
easing.type: Easing.OutCubic
}
}
color: {
if(!item_control.enabled){
return d.itemDisableColor
}
return FluTheme.dark ? "#FFFFFF" : "#000000"
}
}
color: {
if(!item_control.enabled){
return Qt.rgba(0,0,0,0)
}
if(FluTheme.dark){
if((nav_list.currentIndex === _idx)&&type===0){
return Qt.rgba(1,1,1,0.06)
@ -302,6 +313,12 @@ Item {
return 0
}
iconSize: 15
color: {
if(!item_control.enabled){
return d.itemDisableColor
}
return FluTheme.dark ? "#FFFFFF" : "#000000"
}
}
}
Item{
@ -344,6 +361,9 @@ Item {
right: item_icon_expand.left
}
color:{
if(!item_control.enabled){
return d.itemDisableColor
}
if(item_control.pressed){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
@ -414,6 +434,7 @@ Item {
FluControl{
property var modelData: model
id:item_control
enabled: !model.disabled
anchors{
top: parent.top
bottom: parent.bottom
@ -485,6 +506,9 @@ Item {
radius: 4
anchors.fill: parent
color: {
if(!item_control.enabled){
return Qt.rgba(0,0,0,0)
}
if(FluTheme.dark){
if(type===0){
if(nav_list.currentIndex === _idx){
@ -524,6 +548,12 @@ Item {
}
return 0
}
color: {
if(!item_control.enabled){
return d.itemDisableColor
}
return FluTheme.dark ? "#FFFFFF" : "#000000"
}
iconSize: 15
}
}
@ -562,6 +592,9 @@ Item {
}
elide: Text.ElideRight
color:{
if(!item_control.enabled){
return d.itemDisableColor
}
if(item_mouse.pressed){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}

View File

@ -10,6 +10,7 @@ QtObject {
property int order : 0
property int icon
property var url
property bool disabled: false
property Component cusIcon
property Component infoBadge
property bool recentlyAdded: false

View File

@ -7,6 +7,7 @@ FluObject {
property int _idx
property string title
property var icon
property bool disabled: false
property Component cusIcon
property bool isExpand: false
property var parent

View File

@ -13,11 +13,14 @@ Rectangle{
property string closeText : "关闭"
property color textColor: FluTheme.dark ? "#FFFFFF" : "#000000"
property color minimizeNormalColor: Qt.rgba(0,0,0,0)
property color minimizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.1) : Qt.rgba(0,0,0,0.06)
property color minimizeHoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
property color minimizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06)
property color maximizeNormalColor: Qt.rgba(0,0,0,0)
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.03) : Qt.rgba(0,0,0,0.03)
property color maximizePressColor: FluTheme.dark ? Qt.rgba(1,1,1,0.06) : 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 color closePressColor: Qt.rgba(251/255,115/255,115/255,0.8)
property bool showDark: false
property bool showClose: true
property bool showMinimize: true
@ -114,7 +117,12 @@ Rectangle{
radius: 0
visible: !isMac && showMinimize
iconColor: control.textColor
color: hovered ? minimizeHoverColor : minimizeNormalColor
color: {
if(pressed){
return minimizePressColor
}
return hovered ? minimizeHoverColor : minimizeNormalColor
}
onClicked: minClickListener()
}
FluIconButton{
@ -122,7 +130,12 @@ Rectangle{
Layout.preferredWidth: 40
Layout.preferredHeight: 30
iconSource : d.isRestore ? FluentIcons.ChromeRestore : FluentIcons.ChromeMaximize
color: hovered ? maximizeHoverColor : maximizeNormalColor
color: {
if(pressed){
return maximizePressColor
}
return hovered ? maximizeHoverColor : maximizeNormalColor
}
Layout.alignment: Qt.AlignVCenter
visible: d.resizable && !isMac && showMaximize
radius: 0
@ -142,25 +155,26 @@ Rectangle{
radius: 0
iconSize: 10
iconColor: hovered ? Qt.rgba(1,1,1,1) : control.textColor
color:hovered ? closeHoverColor : closeNormalColor
color:{
if(pressed){
return closePressColor
}
return hovered ? closeHoverColor : closeNormalColor
}
onClicked: closeClickListener()
}
}
function minimizeButton(){
return btn_minimize
}
function maximizeButton(){
return btn_maximize
}
function closeButton(){
return btn_close
}
function darkButton(){
return btn_dark
}
}

View File

@ -31,6 +31,7 @@ Item {
property bool isCompactAndPanel: d.displayMode === FluNavigationViewType.Compact && d.enableNavigationPanel
property bool isCompactAndNotPanel:d.displayMode === FluNavigationViewType.Compact && !d.enableNavigationPanel
property bool isMinimalAndPanel: d.displayMode === FluNavigationViewType.Minimal && d.enableNavigationPanel
property color itemDisableColor: FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1)
onIsCompactAndNotPanelChanged: {
collapseAll()
}
@ -164,6 +165,7 @@ Item {
width: layout_list.width
FluControl{
id:item_control
enabled: !model.disabled
anchors{
top: parent.top
bottom: parent.bottom
@ -273,8 +275,17 @@ Item {
easing.type: Easing.OutCubic
}
}
color: {
if(!item_control.enabled){
return d.itemDisableColor
}
return FluTheme.dark ? "#FFFFFF" : "#000000"
}
}
color: {
if(!item_control.enabled){
return Qt.rgba(0,0,0,0)
}
if(FluTheme.dark){
if((nav_list.currentIndex === _idx)&&type===0){
return Qt.rgba(1,1,1,0.06)
@ -303,6 +314,12 @@ Item {
return 0
}
iconSize: 15
color: {
if(!item_control.enabled){
return d.itemDisableColor
}
return FluTheme.dark ? "#FFFFFF" : "#000000"
}
}
}
Item{
@ -345,6 +362,9 @@ Item {
right: item_icon_expand.left
}
color:{
if(!item_control.enabled){
return d.itemDisableColor
}
if(item_control.pressed){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
@ -415,6 +435,7 @@ Item {
FluControl{
property var modelData: model
id:item_control
enabled: !model.disabled
anchors{
top: parent.top
bottom: parent.bottom
@ -486,6 +507,9 @@ Item {
radius: 4
anchors.fill: parent
color: {
if(!item_control.enabled){
return Qt.rgba(0,0,0,0)
}
if(FluTheme.dark){
if(type===0){
if(nav_list.currentIndex === _idx){
@ -525,6 +549,12 @@ Item {
}
return 0
}
color: {
if(!item_control.enabled){
return d.itemDisableColor
}
return FluTheme.dark ? "#FFFFFF" : "#000000"
}
iconSize: 15
}
}
@ -563,6 +593,9 @@ Item {
}
elide: Text.ElideRight
color:{
if(!item_control.enabled){
return d.itemDisableColor
}
if(item_mouse.pressed){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}

View File

@ -2,6 +2,7 @@ import QtQuick
import QtQuick.Controls
import FluentUI
QtObject {
readonly property string key : FluTools.uuid()
property int _idx
@ -10,6 +11,7 @@ QtObject {
property int order : 0
property int icon
property var url
property bool disabled: false
property Component cusIcon
property Component infoBadge
property bool recentlyAdded: false

View File

@ -7,6 +7,7 @@ FluObject {
property int _idx
property string title
property var icon
property bool disabled: false
property Component cusIcon
property bool isExpand: false
property var parent