소스 검색

fix(gui): do not show waiting tasks

runhey 3 년 전
부모
커밋
18d2358fe9
2개의 변경된 파일과 29개의 추가작업 그리고 52개의 파일을 삭제
  1. 1 3
      module/config/config.py
  2. 28 49
      module/gui/qml/Component/Overview.qml

+ 1 - 3
module/config/config.py

@@ -329,10 +329,8 @@ class Config(ConfigState, ConfigManual, ConfigWatcher, ConfigMenu):
 if __name__ == '__main__':
 if __name__ == '__main__':
     config = Config(config_name='oas1')
     config = Config(config_name='oas1')
     config.update_scheduler()
     config.update_scheduler()
-    print(config.pending_task)
     print(config.waiting_task)
     print(config.waiting_task)
-    config.update_scheduler()
-    print(config.pending_task)
+
     # print(config.get_next())
     # print(config.get_next())
 
 
 
 

+ 28 - 49
module/gui/qml/Component/Overview.qml

@@ -175,41 +175,6 @@ Item {
                     }
                     }
                 }
                 }
             }
             }
-
-//            ColumnLayout{
-//                width: parent.width
-//                spacing: 8
-//                FluText{
-//                    text: 'Pending'
-//                    Layout.leftMargin: 16
-//                    Layout.topMargin: 6
-//                    font: FluTextStyle.Subtitle
-//                }
-//                Rectangle{
-//                    // 这个是一条横线
-//                    width: schedulerRunning.width - 20
-//                    height: 2
-//                    Layout.alignment: Qt.AlignHCenter
-//                    color: FluTheme.dark ? Qt.rgba(64/255, 68/255, 75/255, 1) : Qt.rgba(234/255, 236/255, 239/255, 1)
-//                    radius: 2
-//                }
-//                ListView{
-//                    id: pendingListView
-//                    Layout.alignment: Qt.AlignHCenter
-//                    width: 225
-//                    height: 200
-//                    spacing: 8
-//                    model: ListModel{
-//                        id: pendingListModel
-//                    }
-//                    delegate: Component{
-//                        Taskmini{
-//                            name: model.name
-//                            nextRun: model.next_run
-//                        }
-//                    }
-//                }
-//            }
         }
         }
         FluArea{
         FluArea{
             id: schedulerWaiting
             id: schedulerWaiting
@@ -219,28 +184,42 @@ Item {
             anchors.bottomMargin: 0
             anchors.bottomMargin: 0
             width: parent.width                  
             width: parent.width                  
 
 
-            ColumnLayout{
-                width: parent.width
-                spacing: 8
-                FluText{
-                    Layout.fillHeight: false
-                    text: 'Waiting'
-                    Layout.leftMargin: 16
-                    Layout.topMargin: 6
-                    font: FluTextStyle.Subtitle
+//            ColumnLayout{
+//                width: parent.width
+//                spacing: 8
+            FluText{
+                id: waitingText
+                anchors{
+                    top: parent.top
+                    topMargin: 6
+
                 }
                 }
+                width: parent.width
+                text: 'Waiting'
+                leftPadding: 16
+                font: FluTextStyle.Subtitle
+            }
                 Rectangle{
                 Rectangle{
-                    Layout.fillHeight: false
+                    id: lineWaiting
+                    anchors{
+                        top: waitingText.bottom
+                        topMargin: 8
+                        horizontalCenter: parent.horizontalCenter
+                    }
                     width: schedulerPending.width - 20
                     width: schedulerPending.width - 20
                     height: 2
                     height: 2
-                    Layout.alignment: Qt.AlignHCenter
                     color: FluTheme.dark ? Qt.rgba(64/255, 68/255, 75/255, 1) : Qt.rgba(234/255, 236/255, 239/255, 1)
                     color: FluTheme.dark ? Qt.rgba(64/255, 68/255, 75/255, 1) : Qt.rgba(234/255, 236/255, 239/255, 1)
                     radius: 2
                     radius: 2
                 }
                 }
                 ListView{
                 ListView{
                     id: waitingListView
                     id: waitingListView
-                    Layout.fillHeight: true
-                    Layout.alignment: Qt.AlignHCenter
+                    anchors{
+                        top: lineWaiting.bottom
+                        topMargin: 8
+                        bottom: parent.bottom
+                        bottomMargin: 8
+                        horizontalCenter: parent.horizontalCenter
+                    }
                     width: 225
                     width: 225
                     clip: true
                     clip: true
                     spacing: 8
                     spacing: 8
@@ -257,7 +236,7 @@ Item {
                         }
                         }
                     }
                     }
                 }
                 }
-            }
+//            }
         }
         }
     }
     }