Commit 2776145d authored by Daniel Molkentin's avatar Daniel Molkentin Committed by Eike Ziller
Browse files

Fix margins, introduce separator in ExampleView.

Also fix up margin logic in develop tab.

Change-Id: I56d3641f068931237d4cb0638a822ace6fc864ab
Reviewed-on: http://codereview.qt.nokia.com/1418

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 5f65d796
......@@ -42,15 +42,15 @@ Item {
frame: false
Item {
height: Math.max(recentSessions.height, recentProjects.height)
width: root.width-20
width: root.width
Widgets.RecentSessions {
id: recentSessions
width: parent.width / 2
width: parent.width / 2 - 10
}
Widgets.RecentProjects {
id: recentProjects
x: parent.width / 2
width: parent.width / 2
x: parent.width / 2 + 10
width: parent.width - x
}
}
}
......
......@@ -98,7 +98,6 @@ Image {
anchors.leftMargin: 1
property alias current: root.current
model: tabs.model
tabBarWidth: width
}
}
......
......@@ -78,7 +78,7 @@ Item {
}
Components.ScrollArea {
id: scrollArea
anchors.topMargin: lineEditRoot.height
anchors.topMargin: lineEditRoot.height+12
anchors.fill: parent
clip: true
frame: false
......@@ -86,7 +86,10 @@ Item {
Repeater {
id: repeater
model: examplesModel
delegate: ExampleDelegate { width: scrollArea.width-20 }
delegate: ExampleDelegate {
width: scrollArea.width-20;
property int count: repeater.count
}
}
}
}
......
......@@ -34,9 +34,10 @@ import QtQuick 1.0
Rectangle {
id: root
height: 110
height: 130
color: "#00ffffff"
radius: 6
clip: true
Text {
id: title
......@@ -46,8 +47,7 @@ Rectangle {
anchors.topMargin: 10
text: model.name
font.bold: true
font.pixelSize: 16;
font.pixelSize: 16
}
RatingBar { id: rating; anchors.top: parent.top; anchors.topMargin: 10; anchors.right: parent.right; anchors.rightMargin: 10; rating: model.difficulty; visible: model.difficulty !== 0 }
......@@ -66,20 +66,44 @@ Rectangle {
source: model.imageUrl !== "" ? "image://helpimage/" + encodeURI(model.imageUrl) : ""
}
Text {
Item {
id: description
clip: true
anchors.left: image.right
anchors.leftMargin: 10
anchors.right: parent.right
anchors.rightMargin: 10
anchors.leftMargin: image.hideImage ? 0 : 10
anchors.top: rating.bottom
anchors.topMargin: 6
wrapMode: Text.WordWrap
text: model.description
anchors.bottom: bottomRow.top
anchors.bottomMargin: 6
clip: true
Text {
clip: true
anchors.top: parent.top
anchors.right: parent.right
anchors.left: parent.left
wrapMode: Text.WordWrap
text: model.description
}
}
Row {
id: bottomRow
anchors.left: image.right;
anchors.leftMargin: image.hideImage ? 0 : 10
anchors.topMargin: 10
anchors.bottomMargin: 10
anchors.bottom: parent.bottom
spacing: 4
Text { text: qsTr("Tags:"); font.bold: true; }
Text { text: model.tags.join(", "); color: "grey" }
}
Rectangle {
visible: count-1 !== index
height: 1
anchors {left: parent.left; bottom: parent.bottom; right: parent.right }
color: "darkgrey"
}
Text { id: labelText; anchors.top: description.bottom; anchors.topMargin: 10; anchors.left: image.right; text: "Tags: "; font.bold: true; }
Row { id: tagLine; anchors.top: description.bottom; anchors.topMargin: 10; anchors.left: labelText.right; Text { text: model.tags.join(", "); color: "grey" } }
MouseArea {
id: mouseArea
......
......@@ -59,6 +59,7 @@ Item {
anchors.right: parent.right
Repeater {
width: parent.width
model: root.model
delegate: root.delegate
}
......
......@@ -37,22 +37,14 @@ Row {
height: 25
property alias model: tabs.model
property int tabBarWidth
property int tabWidth: Math.floor(tabBar.width/tabs.count)
Repeater {
id: tabs
height: tabBar.height
model: parent.model
delegate:
Item {
width: tabBarWidth / tabs.count
delegate: Item {
height: tabBar.height
Rectangle {
width: parent.width; height: 1
anchors { bottom: parent.bottom; bottomMargin: 1 }
color: "#acb2c2"
}
width: tabs.count-1 === index ? tabWidth : tabWidth + tabBar.width%tabs.count
BorderImage {
id: tabBackground
anchors.fill: parent
......
......@@ -51,7 +51,7 @@ HeaderItemView {
id: nameText
text: displayName
font.bold: true
width: parent.width
anchors.right: parent.right
anchors.top: parent.top
anchors.left: arrowImage.right
anchors.leftMargin: 10
......@@ -61,7 +61,7 @@ HeaderItemView {
text: prettyFilePath
elide: Text.ElideMiddle
color: "grey"
width: parent.width
anchors.right: parent.right
anchors.top: nameText.bottom
anchors.left: arrowImage.right
anchors.leftMargin: 10
......
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