Skip to content

Commit

Permalink
Add buttons container
Browse files Browse the repository at this point in the history
  • Loading branch information
Iktwo committed Aug 15, 2015
1 parent eb19917 commit c160a16
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions src/qml/IntroView.qml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.2

FocusScope {
property alias currentIndex: listView.currentIndex
property alias model: listView.model
property alias progress: animationController.progress
property alias enabled: listView.enabled
property alias delegate: listView.delegate
property alias view: listView
property alias buttonsContainerHeight: buttonsContainer.height
property alias rectangleDividerHeight: rectangleDivider.height
property alias dragging: listView.dragging

readonly property double xPosition: (listView.contentX / listView.width)
readonly property bool movingLeft: listView.movingLeft

onXPositionChanged: {
if (currentIndex < 0)
Expand Down Expand Up @@ -65,9 +71,13 @@ FocusScope {

property bool movingLeft

/// TODO: may have to use flickStarted this to limit moving more than a page
anchors {
top: parent.top
bottom: buttonsContainer.top
left: parent.left
right: parent.right
}

anchors.fill: parent
model: model
orientation: ListView.Horizontal

Expand Down Expand Up @@ -100,6 +110,31 @@ FocusScope {
}
}

Item {
id: buttonsContainer

anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}

height: 57

Rectangle {
id: rectangleDivider

anchors {
left: parent.left
right: parent.right
}

height: 1

color: "#44ffffff"
}
}

AnimationController {
id: animationController

Expand Down

0 comments on commit c160a16

Please sign in to comment.