diff --git a/KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml b/KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml index 87da7be00739196eebd4a3f3ea2ed24810fa7875..aa510daf45a7dde1df68a19108f340f651e267e7 100644 --- a/KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml +++ b/KelvinDashboardGUI/DapUiQmlWidgetLastActions.qml @@ -17,6 +17,20 @@ Rectangle { bottom: parent.bottom } + MouseArea { + anchors.fill: parent + hoverEnabled: true + propagateComposedEvents: true + + onEntered: { + buttonListScroll.visible = true; + } + + onExited: { + buttonListScroll.visible = false; + } + } + Rectangle { id: dapHeader width: parent.width @@ -141,5 +155,66 @@ Rectangle { } } + Item { + id: buttonListScroll + + property bool listDown: true + + width: 36 * pt + height: width + anchors.right: dapListView.right + anchors.bottom: dapListView.bottom + anchors.bottomMargin: 10 * pt + anchors.topMargin: 10 * pt + anchors.rightMargin: 10 * pt + visible: false + + Image { + id: imageButton + anchors.fill: parent + fillMode: Image.PreserveAspectFit + source: "qrc:/Resources/Icons/ic_scroll-down.png" + } + + MouseArea { + anchors.fill: parent + hoverEnabled: true + + + onEntered: { + if(buttonListScroll.listDown) + imageButton.source = "qrc:/Resources/Icons/ic_scroll-down_hover.png"; + else + imageButton.source = "qrc:/Resources/Icons/ic_scroll-up_hover.png"; + } + + onExited: { + if(buttonListScroll.listDown) + imageButton.source = "qrc:/Resources/Icons/ic_scroll-down.png"; + else + imageButton.source = "qrc:/Resources/Icons/ic_scroll-up.png"; + } + + onPressed: { + // TODO: scroll list + + + buttonListScroll.listDown = !buttonListScroll.listDown; + if(buttonListScroll.listDown) { + buttonListScroll.anchors.top = undefined; + buttonListScroll.anchors.bottom = dapListView.bottom; + } + else { + buttonListScroll.anchors.bottom = undefined; + buttonListScroll.anchors.top = dapListView.top; + } + + exited(); + } + } + } + } + + } diff --git a/KelvinDashboardGUI/Resources/Icons/ic_scroll-down.png b/KelvinDashboardGUI/Resources/Icons/ic_scroll-down.png new file mode 100644 index 0000000000000000000000000000000000000000..d818c8143a6559934f39f7dff38f40f45286023d Binary files /dev/null and b/KelvinDashboardGUI/Resources/Icons/ic_scroll-down.png differ diff --git a/KelvinDashboardGUI/Resources/Icons/ic_scroll-down_hover.png b/KelvinDashboardGUI/Resources/Icons/ic_scroll-down_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..aa00573edda7f485f7616a97337b101fd4ad6844 Binary files /dev/null and b/KelvinDashboardGUI/Resources/Icons/ic_scroll-down_hover.png differ diff --git a/KelvinDashboardGUI/Resources/Icons/ic_scroll-up.png b/KelvinDashboardGUI/Resources/Icons/ic_scroll-up.png new file mode 100644 index 0000000000000000000000000000000000000000..e0ace3f8ac7d1cf8f0b2c264d58682bc68fed2f4 Binary files /dev/null and b/KelvinDashboardGUI/Resources/Icons/ic_scroll-up.png differ diff --git a/KelvinDashboardGUI/Resources/Icons/ic_scroll-up_hover.png b/KelvinDashboardGUI/Resources/Icons/ic_scroll-up_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..8c698e0bd164cd4efac4da44d0103201411a26ca Binary files /dev/null and b/KelvinDashboardGUI/Resources/Icons/ic_scroll-up_hover.png differ diff --git a/KelvinDashboardGUI/qml.qrc b/KelvinDashboardGUI/qml.qrc index ab19a46678cc4e811126b07a6163783ff9d25cf7..d2a6a7c7f76b723c006daa31bc81115b83dc2a99 100755 --- a/KelvinDashboardGUI/qml.qrc +++ b/KelvinDashboardGUI/qml.qrc @@ -30,5 +30,9 @@ <file>DapUiQmlScreenHistory.qml</file> <file>Resources/Icons/defaul_icon.png</file> <file>DapUiQmlWidgetLastActions.qml</file> + <file>Resources/Icons/ic_scroll-down.png</file> + <file>Resources/Icons/ic_scroll-down_hover.png</file> + <file>Resources/Icons/ic_scroll-up.png</file> + <file>Resources/Icons/ic_scroll-up_hover.png</file> </qresource> </RCC>