mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 21:37:04 +08:00
update
This commit is contained in:
parent
855305f197
commit
0b17d03f23
@ -22,7 +22,7 @@ FluScrollablePage{
|
||||
|
||||
Item{
|
||||
Layout.fillWidth: true
|
||||
height: 320
|
||||
Layout.preferredHeight: 320
|
||||
Image {
|
||||
id: bg
|
||||
fillMode:Image.PreserveAspectCrop
|
||||
@ -77,6 +77,7 @@ FluScrollablePage{
|
||||
anchors.fill: parent
|
||||
tintColor: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||
target: bg
|
||||
tintOpacity: FluTheme.dark ? 0.8 : 0.9
|
||||
blurRadius : 40
|
||||
targetRect: Qt.rect(list.x-list.contentX+10+(control.width)*index,list.y+10,width,height)
|
||||
}
|
||||
@ -86,14 +87,14 @@ FluScrollablePage{
|
||||
color:{
|
||||
if(FluTheme.dark){
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(1,1,1,0.06)
|
||||
return Qt.rgba(1,1,1,0.03)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0.03)
|
||||
return Qt.rgba(0,0,0,0.0)
|
||||
}else{
|
||||
if(item_mouse.containsMouse){
|
||||
return Qt.rgba(0,0,0,0.09)
|
||||
return Qt.rgba(0,0,0,0.03)
|
||||
}
|
||||
return Qt.rgba(0,0,0,0.06)
|
||||
return Qt.rgba(0,0,0,0.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -135,7 +136,8 @@ FluScrollablePage{
|
||||
id:item_mouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onWheel: (wheel)=>{
|
||||
onWheel:
|
||||
(wheel)=>{
|
||||
if (wheel.angleDelta.y > 0) scrollbar_header.decrease()
|
||||
else scrollbar_header.increase()
|
||||
}
|
||||
@ -249,7 +251,7 @@ FluScrollablePage{
|
||||
|
||||
GridView{
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: contentHeight
|
||||
Layout.preferredHeight: contentHeight
|
||||
cellHeight: 120
|
||||
cellWidth: 320
|
||||
model:ItemsOriginal.getRecentlyAddedData()
|
||||
@ -266,7 +268,7 @@ FluScrollablePage{
|
||||
|
||||
GridView{
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: contentHeight
|
||||
Layout.preferredHeight: contentHeight
|
||||
cellHeight: 120
|
||||
cellWidth: 320
|
||||
interactive: false
|
||||
|
@ -24,7 +24,7 @@ FluScrollablePage{
|
||||
id:com_lable
|
||||
FluText{
|
||||
wrapMode: Text.WrapAnywhere
|
||||
horizontalAlignment: textAlignment
|
||||
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
||||
text: modelData.lable
|
||||
color: FluTheme.primaryColor.dark
|
||||
MouseArea{
|
||||
@ -41,7 +41,7 @@ FluScrollablePage{
|
||||
id:com_text
|
||||
FluText{
|
||||
wrapMode: Text.WrapAnywhere
|
||||
horizontalAlignment: textAlignment
|
||||
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
||||
text: modelData.text
|
||||
font.bold: true
|
||||
MouseArea{
|
||||
|
@ -25,7 +25,7 @@ FluItem {
|
||||
}
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
color: Qt.rgba(255, 255, 255, luminosity)
|
||||
color: Qt.rgba(1, 1, 1, luminosity)
|
||||
}
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
|
@ -66,10 +66,6 @@ Item {
|
||||
}
|
||||
return data
|
||||
}
|
||||
function refreshWindow(){
|
||||
Window.window.height = Window.window.height-1
|
||||
Window.window.height = Window.window.height+1
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
d.displayMode = Qt.binding(function(){
|
||||
@ -713,11 +709,6 @@ Item {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.OutCubic
|
||||
onRunningChanged: {
|
||||
if(!running){
|
||||
d.refreshWindow()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Behavior on x {
|
||||
@ -725,11 +716,6 @@ Item {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.OutCubic
|
||||
onRunningChanged: {
|
||||
if(!running){
|
||||
d.refreshWindow()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
visible: {
|
||||
|
@ -90,7 +90,7 @@ Item{
|
||||
id:com_lable
|
||||
FluText{
|
||||
wrapMode: Text.WrapAnywhere
|
||||
horizontalAlignment: textAlignment
|
||||
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
||||
text: modelData.lable
|
||||
color: FluTheme.primaryColor.dark
|
||||
}
|
||||
@ -98,13 +98,11 @@ Item{
|
||||
|
||||
Component{
|
||||
id:com_text
|
||||
|
||||
FluText{
|
||||
wrapMode: Text.WrapAnywhere
|
||||
horizontalAlignment: textAlignment
|
||||
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
||||
text: modelData.text
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Column{
|
||||
@ -152,7 +150,7 @@ Item{
|
||||
|
||||
Loader{
|
||||
property var modelData: control.model.get(index)
|
||||
property int textAlignment: state === "Right" ? Qt.AlignRight : Qt.AlignLeft
|
||||
property bool isRight: state === "Right"
|
||||
id:loader_lable
|
||||
sourceComponent: {
|
||||
if(!modelData){
|
||||
@ -223,7 +221,7 @@ Item{
|
||||
Loader{
|
||||
id:loader_text
|
||||
property var modelData: control.model.get(index)
|
||||
property int textAlignment: state === "Right" ? Qt.AlignRight : Qt.AlignLeft
|
||||
property bool isRight: state === "Right"
|
||||
state: {
|
||||
if(d.isRight){
|
||||
return "Right"
|
||||
|
@ -58,9 +58,18 @@ Popup{
|
||||
target: d.window
|
||||
function onWidthChanged(){
|
||||
canvas.requestPaint()
|
||||
timer_delay.restart()
|
||||
}
|
||||
function onHeightChanged(){
|
||||
canvas.requestPaint()
|
||||
timer_delay.restart()
|
||||
}
|
||||
}
|
||||
Timer{
|
||||
id:timer_delay
|
||||
interval: 200
|
||||
onTriggered: {
|
||||
canvas.requestPaint()
|
||||
}
|
||||
}
|
||||
Canvas{
|
||||
|
Loading…
Reference in New Issue
Block a user