Compare commits
5 Commits
7a6efa41fb
...
882cc8989f
Author | SHA1 | Date |
---|---|---|
|
882cc8989f | |
|
444cc1aeee | |
|
db0588edcd | |
|
99f6b16aa1 | |
|
65b7737454 |
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"MicroPython.executeButton": [
|
||||
{
|
||||
"text": "▶",
|
||||
"tooltip": "运行",
|
||||
"alignment": "left",
|
||||
"command": "extension.executeFile",
|
||||
"priority": 3.5
|
||||
}
|
||||
],
|
||||
"MicroPython.syncButton": [
|
||||
{
|
||||
"text": "$(sync)",
|
||||
"tooltip": "同步",
|
||||
"alignment": "left",
|
||||
"command": "extension.execute",
|
||||
"priority": 4
|
||||
}
|
||||
]
|
||||
}
|
|
@ -49,26 +49,26 @@ FluScrollablePage{
|
|||
Layout.topMargin: -6
|
||||
code:'FluPivot{
|
||||
anchors.fill: parent
|
||||
FluPivotItem:{
|
||||
text: qsTr("All")
|
||||
FluPivotItem {
|
||||
title: qsTr("All")
|
||||
contentItem: FluText{
|
||||
text: qsTr("All emails go here.")
|
||||
}
|
||||
}
|
||||
FluPivotItem:{
|
||||
text: qsTr("Unread")
|
||||
FluPivotItem {
|
||||
title: qsTr("Unread")
|
||||
contentItem: FluText{
|
||||
text: qsTr("Unread emails go here.")
|
||||
}
|
||||
}
|
||||
FluPivotItem:{
|
||||
text: qsTr("Flagged")
|
||||
FluPivotItem {
|
||||
title: qsTr("Flagged")
|
||||
contentItem: FluText{
|
||||
text: qsTr("Flagged emails go here.")
|
||||
}
|
||||
}
|
||||
FluPivotItem:{
|
||||
text: qsTr("Urgent")
|
||||
FluPivotItem {
|
||||
title: qsTr("Urgent")
|
||||
contentItem: FluText{
|
||||
text: qsTr("Urgent emails go here.")
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ Item {
|
|||
}
|
||||
QtObject{
|
||||
id:d
|
||||
property bool flagXChanged: true
|
||||
property bool flagXChanged: false
|
||||
property bool isAnimEnable: control.autoPlay && list_view.count>3
|
||||
function setData(data){
|
||||
if(!data){
|
||||
|
@ -88,14 +88,17 @@ Item {
|
|||
}
|
||||
}
|
||||
onMovementEnded:{
|
||||
d.flagXChanged = false
|
||||
list_view.highlightMoveDuration = 0
|
||||
currentIndex = list_view.contentX/list_view.width
|
||||
if(currentIndex === 0){
|
||||
currentIndex = list_view.count-2
|
||||
}else if(currentIndex === list_view.count-1){
|
||||
currentIndex = 1
|
||||
}
|
||||
d.flagXChanged = false
|
||||
timer_run.restart()
|
||||
if(d.isAnimEnable){
|
||||
timer_run.restart()
|
||||
}
|
||||
}
|
||||
onMovementStarted: {
|
||||
d.flagXChanged = true
|
||||
|
@ -104,12 +107,12 @@ Item {
|
|||
onContentXChanged: {
|
||||
if(d.flagXChanged){
|
||||
var maxX = Math.min(list_view.width*(currentIndex+1),list_view.count*list_view.width)
|
||||
var minY = Math.max(0,(list_view.width*(currentIndex-1)))
|
||||
var minX = Math.max(0,(list_view.width*(currentIndex-1)))
|
||||
if(contentX>=maxX){
|
||||
contentX = maxX
|
||||
}
|
||||
if(contentX<=minY){
|
||||
contentX = minY
|
||||
if(contentX<=minX){
|
||||
contentX = minX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,13 +14,6 @@ ProgressBar{
|
|||
id:d
|
||||
property real _radius: strokeWidth/2
|
||||
}
|
||||
onIndeterminateChanged:{
|
||||
if(!indeterminate){
|
||||
animator_x.duration = 0
|
||||
rect_progress.x = 0
|
||||
animator_x.duration = control.duration
|
||||
}
|
||||
}
|
||||
background: Rectangle {
|
||||
implicitWidth: 150
|
||||
implicitHeight: control.strokeWidth
|
||||
|
@ -45,6 +38,11 @@ ProgressBar{
|
|||
id: animator_x
|
||||
running: control.indeterminate && control.visible
|
||||
loops: Animation.Infinite
|
||||
onRunningChanged: {
|
||||
if(!running){
|
||||
rect_progress.x = 0
|
||||
}
|
||||
}
|
||||
PropertyAnimation {
|
||||
from: -rect_progress.width
|
||||
to: control.width + rect_progress.width
|
||||
|
|
|
@ -24,7 +24,7 @@ Item {
|
|||
}
|
||||
QtObject{
|
||||
id:d
|
||||
property bool flagXChanged: true
|
||||
property bool flagXChanged: false
|
||||
property bool isAnimEnable: control.autoPlay && list_view.count>3
|
||||
function setData(data){
|
||||
if(!data){
|
||||
|
@ -88,14 +88,17 @@ Item {
|
|||
}
|
||||
}
|
||||
onMovementEnded:{
|
||||
d.flagXChanged = false
|
||||
list_view.highlightMoveDuration = 0
|
||||
currentIndex = list_view.contentX/list_view.width
|
||||
if(currentIndex === 0){
|
||||
currentIndex = list_view.count-2
|
||||
}else if(currentIndex === list_view.count-1){
|
||||
currentIndex = 1
|
||||
}
|
||||
d.flagXChanged = false
|
||||
timer_run.restart()
|
||||
if(d.isAnimEnable){
|
||||
timer_run.restart()
|
||||
}
|
||||
}
|
||||
onMovementStarted: {
|
||||
d.flagXChanged = true
|
||||
|
@ -104,12 +107,12 @@ Item {
|
|||
onContentXChanged: {
|
||||
if(d.flagXChanged){
|
||||
var maxX = Math.min(list_view.width*(currentIndex+1),list_view.count*list_view.width)
|
||||
var minY = Math.max(0,(list_view.width*(currentIndex-1)))
|
||||
var minX = Math.max(0,(list_view.width*(currentIndex-1)))
|
||||
if(contentX>=maxX){
|
||||
contentX = maxX
|
||||
}
|
||||
if(contentX<=minY){
|
||||
contentX = minY
|
||||
if(contentX<=minX){
|
||||
contentX = minX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,13 +15,6 @@ ProgressBar{
|
|||
id:d
|
||||
property real _radius: strokeWidth/2
|
||||
}
|
||||
onIndeterminateChanged:{
|
||||
if(!indeterminate){
|
||||
animator_x.duration = 0
|
||||
rect_progress.x = 0
|
||||
animator_x.duration = control.duration
|
||||
}
|
||||
}
|
||||
background: Rectangle {
|
||||
implicitWidth: 150
|
||||
implicitHeight: control.strokeWidth
|
||||
|
@ -46,6 +39,11 @@ ProgressBar{
|
|||
id: animator_x
|
||||
running: control.indeterminate && control.visible
|
||||
loops: Animation.Infinite
|
||||
onRunningChanged: {
|
||||
if(!running){
|
||||
rect_progress.x = 0
|
||||
}
|
||||
}
|
||||
PropertyAnimation {
|
||||
from: -rect_progress.width
|
||||
to: control.width + rect_progress.width
|
||||
|
|
Loading…
Reference in New Issue