Commit 3d8fdcf0 authored by Jens Bache-Wiig's avatar Jens Bache-Wiig Committed by Daniel Molkentin
Browse files

Make use of splitters

Change-Id: I02f0d4af1aedc45914424f68a32d3970bf936806
Reviewed-on: http://codereview.qt.nokia.com/1650

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Molkentin <daniel.molkentin@nokia.com>
parent 08ba8423
......@@ -39,19 +39,21 @@ Item {
Components.ScrollArea {
id: scrollArea
anchors.fill: parent
anchors.margins: -8
frame: false
Item {
height: Math.max(recentSessions.height, recentProjects.height)
width: root.width-20
Widgets.RecentSessions {
id: recentSessions
width: parent.width / 2
}
Widgets.RecentProjects {
id: recentProjects
x: parent.width / 2
width: parent.width / 2
}
Components.SplitterRow: {
height: Math.max(root.height,
Math.max(recentSessions.height,
recentProjects.height))
width: root.width
Widgets.RecentProjects {
id: recentSessions
property bool expanding: true
}
Widgets.RecentSessions {
id: recentProjects
width: 200
}
}
}
}
......
......@@ -42,17 +42,20 @@ Item {
Text {
id: titleText
text: root.header
width: parent.width
font.bold: true
font.pointSize: 14
color: "#555555"
font.pointSize: 16
color: "#777"
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
elide: Text.ElideRight
anchors.topMargin: 10
anchors.leftMargin: 10
}
Column {
id: dataSection
spacing: 10
anchors.topMargin: 10
anchors.top: titleText.bottom
anchors.left: parent.left
......
......@@ -36,40 +36,56 @@ import components 1.0 as Components
HeaderItemView {
header: qsTr("Recently Edited Projects")
model: projectList
delegate: Item {
delegate: Rectangle {
Components.QStyleItem { id: styleItem; cursor: "pointinghandcursor"; anchors.fill: parent }
height: nameText.font.pixelSize*2.5
height: 60
width: dataSection.width
Image{
Rectangle {
height: 1
color: "#eee"
anchors.top: parent.top
width: parent.width
}
color: mousearea.containsMouse ? "#f9f9f9" : "white"
Image {
id: arrowImage;
source: "qrc:welcome/images/list_bullet_arrow.png";
anchors.verticalCenter: parent.verticalCenter;
anchors.left: parent.left
anchors.right: parent.right
anchors.rightMargin: 10
}
Text {
id: nameText
text: displayName
font.bold: true
width: parent.width
anchors.top: parent.top
anchors.left: arrowImage.right
anchors.leftMargin: 10
}
Column {
anchors.verticalCenter: parent.verticalCenter
Text {
id: nameText
text: displayName
font.bold: true
width: parent.width
anchors.left: parent.left
anchors.leftMargin: 10
anchors.rightMargin: 10
anchors.right: arrowImage.left
elide: Text.ElideRight
}
Text {
text: prettyFilePath
elide: Text.ElideMiddle
color: "grey"
width: parent.width
anchors.top: nameText.bottom
anchors.left: arrowImage.right
anchors.leftMargin: 10
Text {
text: prettyFilePath
elide: Text.ElideMiddle
color: "grey"
anchors.left: parent.left
anchors.right: arrowImage.left
anchors.leftMargin: 10
anchors.rightMargin: 10
}
}
Timer { id: timer; interval: 500; onTriggered: styleItem.showToolTip(filePath) }
MouseArea {
id: mousearea
anchors.fill: parent
onClicked: projectWelcomePage.requestProject(filePath)
hoverEnabled: true
......
......@@ -34,13 +34,22 @@ import QtQuick 1.0
import components 1.0 as Components
HeaderItemView {
clip: true
header: qsTr("Recently Used Sessions")
model: sessionList
delegate: Item {
height: arrowImage.height
delegate: Rectangle {
height: 60
width: dataSection.width
Rectangle {
height: 1
color: "#eee"
anchors.top: parent.top
width: parent.width
}
color: mousearea.containsMouse ? "#f9f9f9" : "white"
function fullSessionName()
{
var newSessionName = sessionName
......@@ -63,13 +72,16 @@ HeaderItemView {
font.italic: model.defaultSession
elide: Text.ElideMiddle
anchors.left: arrowImage.right
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 10
elide: Text.ElideRight
}
Timer { id: timer; interval: 500; onTriggered: styleItem.showToolTip(sessionName) }
MouseArea {
id: mouseare
anchors.fill: parent
onClicked: projectWelcomePage.requestSession(sessionName)
hoverEnabled: true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment