update
parent
f8d717f41b
commit
2084b5afa3
|
@ -186,6 +186,10 @@ FluObject{
|
|||
}
|
||||
FluPaneItem{
|
||||
title:"TableView"
|
||||
image:"qrc:/res/image/control/DataGrid.png"
|
||||
recentlyAdded:true
|
||||
order:4
|
||||
desc:"The TableView control provides a flexible way to display a collection of data in rows and columns"
|
||||
onTap:{
|
||||
navigationView.push("qrc:/T_TableView.qml")
|
||||
}
|
||||
|
|
|
@ -43,11 +43,17 @@ FluControl {
|
|||
if(disabled){
|
||||
return Qt.rgba(131/255,131/255,131/255,1)
|
||||
}
|
||||
if(pressed){
|
||||
return Qt.rgba(162/255,162/255,162/255,1)
|
||||
}
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}else{
|
||||
if(disabled){
|
||||
return Qt.rgba(160/255,160/255,160/255,1)
|
||||
}
|
||||
if(pressed){
|
||||
return Qt.rgba(96/255,96/255,96/255,1)
|
||||
}
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,10 +12,13 @@ FluControl {
|
|||
property color borderSelectedColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||
property color borderHoverColor: FluTheme.dark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1)
|
||||
property color borderDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
||||
property color borderPressedColor: FluTheme.dark ? Qt.rgba(90/255,90/255,90/255,1) : Qt.rgba(191/255,191/255,191/255,1)
|
||||
|
||||
property color normalColor: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
||||
property color selectedColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||
property color hoverColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
||||
property color selectedHoverColor: FluTheme.dark ? Qt.darker(selectedColor,1.1) : Qt.lighter(selectedColor,1.1)
|
||||
property color hoverColor: FluTheme.dark ? Qt.rgba(72/255,72/255,72/255,1) : Qt.rgba(236/255,236/255,236/255,1)
|
||||
property color selectedHoverColor: FluTheme.dark ? Qt.darker(selectedColor,1.15) : Qt.lighter(selectedColor,1.15)
|
||||
property color selectedPreesedColor: FluTheme.dark ? Qt.darker(selectedColor,1.3) : Qt.lighter(selectedColor,1.3)
|
||||
property color selectedDisableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
||||
property color disableColor: FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(253/255,253/255,253/255,1)
|
||||
|
||||
|
@ -52,6 +55,9 @@ FluControl {
|
|||
if(selected){
|
||||
return borderSelectedColor
|
||||
}
|
||||
if(pressed){
|
||||
return borderPressedColor
|
||||
}
|
||||
if(hovered){
|
||||
return borderHoverColor
|
||||
}
|
||||
|
@ -63,6 +69,9 @@ FluControl {
|
|||
if(disabled){
|
||||
return selectedDisableColor
|
||||
}
|
||||
if(pressed){
|
||||
return selectedPreesedColor
|
||||
}
|
||||
if(hovered){
|
||||
return selectedHoverColor
|
||||
}
|
||||
|
|
|
@ -58,11 +58,17 @@ FluControl {
|
|||
if(disabled){
|
||||
return Qt.rgba(131/255,131/255,131/255,1)
|
||||
}
|
||||
if(pressed){
|
||||
return Qt.rgba(162/255,162/255,162/255,1)
|
||||
}
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}else{
|
||||
if(disabled){
|
||||
return Qt.rgba(160/255,160/255,160/255,1)
|
||||
}
|
||||
if(pressed){
|
||||
return Qt.rgba(96/255,96/255,96/255,1)
|
||||
}
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ FluControl {
|
|||
property color normalColor: FluTheme.dark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||
property color hoverColor: FluTheme.dark ? Qt.darker(normalColor,1.1) : Qt.lighter(normalColor,1.1)
|
||||
property color disableColor: FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
||||
property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.2) : Qt.lighter(normalColor,1.2)
|
||||
|
||||
id: control
|
||||
enabled: !disabled
|
||||
|
@ -27,6 +28,9 @@ FluControl {
|
|||
if(disabled){
|
||||
return disableColor
|
||||
}
|
||||
if(pressed){
|
||||
return pressedColor
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,12 +9,16 @@ FluControl {
|
|||
property bool disabled: false
|
||||
property int radius:4
|
||||
property color hoverColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(0,0,0,0.03)
|
||||
property color pressedColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(0,0,0,0.06)
|
||||
property color normalColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
|
||||
property color disableColor: FluTheme.dark ? Qt.rgba(0,0,0,0) : Qt.rgba(0,0,0,0)
|
||||
property color color: {
|
||||
if(disabled){
|
||||
return disableColor
|
||||
}
|
||||
if(pressed){
|
||||
return pressedColor
|
||||
}
|
||||
return hovered ? hoverColor : normalColor
|
||||
}
|
||||
property color iconColor: {
|
||||
|
|
|
@ -150,20 +150,20 @@ Item {
|
|||
}
|
||||
color: {
|
||||
if(FluTheme.dark){
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(1,1,1,0.03)
|
||||
}
|
||||
if((nav_list.currentIndex === position)&&type===0){
|
||||
return Qt.rgba(1,1,1,0.06)
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(1,1,1,0.03)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0)
|
||||
}else{
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(0,0,0,0.03)
|
||||
}
|
||||
if(nav_list.currentIndex === position&&type===0){
|
||||
return Qt.rgba(0,0,0,0.06)
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(0,0,0,0.03)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0)
|
||||
}
|
||||
}
|
||||
|
@ -193,6 +193,12 @@ Item {
|
|||
verticalCenter: parent.verticalCenter
|
||||
left:item_icon.right
|
||||
}
|
||||
color:{
|
||||
if(item_mouse.pressed){
|
||||
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
|
||||
}
|
||||
return FluTheme.dark ? FluColors.White : FluColors.Grey220
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -249,20 +255,20 @@ Item {
|
|||
}
|
||||
color: {
|
||||
if(FluTheme.dark){
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(1,1,1,0.03)
|
||||
}
|
||||
if((nav_list.currentIndex === position)&&type===0){
|
||||
return Qt.rgba(1,1,1,0.06)
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(1,1,1,0.03)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0)
|
||||
}else{
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(0,0,0,0.03)
|
||||
}
|
||||
if(nav_list.currentIndex === position&&type===0){
|
||||
return Qt.rgba(0,0,0,0.06)
|
||||
}
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(0,0,0,0.03)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0)
|
||||
}
|
||||
}
|
||||
|
@ -288,6 +294,12 @@ Item {
|
|||
FluText{
|
||||
id:item_title
|
||||
text:model.title
|
||||
color:{
|
||||
if(item_mouse.pressed){
|
||||
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
|
||||
}
|
||||
return FluTheme.dark ? FluColors.White : FluColors.Grey220
|
||||
}
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
left:item_icon.right
|
||||
|
|
|
@ -27,7 +27,7 @@ Item {
|
|||
|
||||
FluToggleButton{
|
||||
visible: control.pageCount>1
|
||||
enabled: control.pageCurrent>1
|
||||
disabled: control.pageCurrent<=1
|
||||
text:"<上一页"
|
||||
onClicked: {
|
||||
control.calcNewPage(control.pageCurrent-1);
|
||||
|
@ -87,7 +87,7 @@ Item {
|
|||
}
|
||||
FluToggleButton{
|
||||
visible: control.pageCount>1
|
||||
enabled: control.pageCurrent<control.pageCount
|
||||
disabled: control.pageCurrent>=control.pageCount
|
||||
text:"下一页>"
|
||||
onClicked: {
|
||||
control.calcNewPage(control.pageCurrent+1);
|
||||
|
|
|
@ -4,7 +4,7 @@ import FluentUI
|
|||
Text {
|
||||
|
||||
property int fontStyle: FluText.Body
|
||||
property color textColor: FluTheme.dark ? "#FFFFFF" : "#1A1A1A"
|
||||
property color textColor: FluTheme.dark ? FluColors.White : FluColors.Grey220
|
||||
property int pixelSize : FluTheme.textSize
|
||||
|
||||
enum FontStyle {
|
||||
|
|
|
@ -28,6 +28,8 @@ FluControl {
|
|||
}
|
||||
}
|
||||
|
||||
property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.2) : Qt.lighter(normalColor,1.2)
|
||||
|
||||
id: control
|
||||
enabled: !disabled
|
||||
topPadding:5
|
||||
|
@ -48,6 +50,11 @@ FluControl {
|
|||
if(disabled){
|
||||
return disableColor
|
||||
}
|
||||
if(selected){
|
||||
if(pressed){
|
||||
return pressedColor
|
||||
}
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
}
|
||||
|
@ -70,11 +77,21 @@ FluControl {
|
|||
if(disabled){
|
||||
return Qt.rgba(131/255,131/255,131/255,1)
|
||||
}
|
||||
if(!selected){
|
||||
if(pressed){
|
||||
return Qt.rgba(162/255,162/255,162/255,1)
|
||||
}
|
||||
}
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}else{
|
||||
if(disabled){
|
||||
return Qt.rgba(160/255,160/255,160/255,1)
|
||||
}
|
||||
if(!selected){
|
||||
if(pressed){
|
||||
return Qt.rgba(96/255,96/255,96/255,1)
|
||||
}
|
||||
}
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue