diff --git a/layouts/components/BrowserView/ContentView.qml b/layouts/components/BrowserView/ContentView.qml index 453e2dd..4cbf86d 100644 --- a/layouts/components/BrowserView/ContentView.qml +++ b/layouts/components/BrowserView/ContentView.qml @@ -1,6 +1,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls 1.4 +import QtQuick.Controls 2.15 import Ikinuki.Client 1.0 @@ -27,58 +28,56 @@ StackLayout { width: 40 } Column { - Row { - Item { - height: parent.height - width: 16 - } - Column { - spacing: 20 - Item { - height: 20 - width: parent.width - } - Text { - text: elementColumn.children[ySelect].provider.getShow(xSelect).title - font.pointSize: 30 - color: "#cdd7d9" - } - Text { - text: elementColumn.children[ySelect].provider.getShow(xSelect).year - font.pointSize: 15 - color: "#99afb4" - } - Text { - text: elementColumn.children[ySelect].provider.getShow(xSelect).description - font.pointSize: 13 - color: "#cdd7d9" - width: tabView.parent.width * 0.6 - wrapMode: Text.WordWrap - maximumLineCount: 4 - elide: Text.ElideRight - } - } - } - Item { - height: 40 + height: tabView.height + width: tabView.width - 40 + ShowDetails { + z: 1.2 + height: parent.height * 0.25 width: parent.width + title: elementColumn.children[ySelect].provider.getShow(xSelect).title + year: elementColumn.children[ySelect].provider.getShow(xSelect).year + description: elementColumn.children[ySelect].provider.getShow(xSelect).description } - Column { - id: elementColumn - spacing: 20 - Element { - title: "In Progress" - provider: modelData - repeaterModel: modelData.inProgress - elemSelected: viewSelected && (0 == ySelect) - xIndex: xSelect + ScrollView { + z: 1.0 + height: parent.height * 0.75 + width: parent.width + contentWidth: 2000 + contentHeight: 2000 + ScrollBar.horizontal.position: xSelect * 0.135 + ScrollBar.vertical.position: ySelect * 0.22 + Behavior on ScrollBar.horizontal.position { + NumberAnimation { + duration: 200 + easing.type: Easing.Linear + } } - Element { - title: "Recently Added" - provider: modelData - repeaterModel: modelData.recentlyAdded - elemSelected: viewSelected && (1 == ySelect) - xIndex: xSelect + Behavior on ScrollBar.vertical.position { + NumberAnimation { + duration: 200 + easing.type: Easing.Linear + } + } + Flickable{ + clip: true + Column { + id: elementColumn + spacing: 20 + Element { + title: "In Progress" + provider: modelData + repeaterModel: modelData.inProgress + elemSelected: viewSelected && (0 == ySelect) + xIndex: xSelect + } + Element { + title: "Recently Added" + provider: modelData + repeaterModel: modelData.recentlyAdded + elemSelected: viewSelected && (1 == ySelect) + xIndex: xSelect + } + } } } } diff --git a/layouts/components/BrowserView/ContentView/Element.qml b/layouts/components/BrowserView/ContentView/Element.qml index 1e59cd3..4ee0efd 100644 --- a/layouts/components/BrowserView/ContentView/Element.qml +++ b/layouts/components/BrowserView/ContentView/Element.qml @@ -15,7 +15,13 @@ Column { Row { Item { height: parent.height - width: 16 + width: 16 + (xIndex * 270) + Behavior on width { + NumberAnimation { + duration: 200 + easing.type: Easing.Linear + } + } } Text { text: title diff --git a/layouts/components/BrowserView/ContentView/ShowDetails.qml b/layouts/components/BrowserView/ContentView/ShowDetails.qml new file mode 100644 index 0000000..ba4fc09 --- /dev/null +++ b/layouts/components/BrowserView/ContentView/ShowDetails.qml @@ -0,0 +1,40 @@ +import QtQuick 2.12 + +Row { + id: root + property string title + property int year + property string description + Item { + height: parent.height + width: 16 + } + Column { + height: parent.height + width: parent.width - 16 + spacing: 20 + Item { + height: 20 + width: parent.width + } + Text { + text: title + font.pointSize: 30 + color: "#cdd7d9" + } + Text { + text: year + font.pointSize: 15 + color: "#99afb4" + } + Text { + text: description + font.pointSize: 13 + color: "#cdd7d9" + width: parent.width * 0.6 + wrapMode: Text.WordWrap + maximumLineCount: 4 + elide: Text.ElideRight + } + } +}