diff --git a/share/qtcreator/welcomescreen/develop.qml b/share/qtcreator/welcomescreen/develop.qml index aafa0b2af77fbb5a8efa9dcd6d8c1be5851582a3..f00d42b4d934ae5a8c641575bd69ca859d1fc172 100644 --- a/share/qtcreator/welcomescreen/develop.qml +++ b/share/qtcreator/welcomescreen/develop.qml @@ -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 } } } diff --git a/share/qtcreator/welcomescreen/welcomescreen.qml b/share/qtcreator/welcomescreen/welcomescreen.qml index c6d36368a8ace148111b4663f05f57386ea1872b..ac74e7d1bb1de21d4bcf4101b5bb7f213481a3d1 100644 --- a/share/qtcreator/welcomescreen/welcomescreen.qml +++ b/share/qtcreator/welcomescreen/welcomescreen.qml @@ -98,7 +98,6 @@ Image { anchors.leftMargin: 1 property alias current: root.current model: tabs.model - tabBarWidth: width } } diff --git a/share/qtcreator/welcomescreen/widgets/ExampleBrowser.qml b/share/qtcreator/welcomescreen/widgets/ExampleBrowser.qml index 4b0c1577646c69a72be666b6cf44d608f35ae0e2..923954b5f805ab9203a12e51092cca55d845d148 100644 --- a/share/qtcreator/welcomescreen/widgets/ExampleBrowser.qml +++ b/share/qtcreator/welcomescreen/widgets/ExampleBrowser.qml @@ -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 + } } } } diff --git a/share/qtcreator/welcomescreen/widgets/ExampleDelegate.qml b/share/qtcreator/welcomescreen/widgets/ExampleDelegate.qml index d4ebfd8c648f31a8d29c32dadce6f45bc61e636b..904b6da82273515277839bed8da6e8ae6b0033da 100644 --- a/share/qtcreator/welcomescreen/widgets/ExampleDelegate.qml +++ b/share/qtcreator/welcomescreen/widgets/ExampleDelegate.qml @@ -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 diff --git a/share/qtcreator/welcomescreen/widgets/HeaderItemView.qml b/share/qtcreator/welcomescreen/widgets/HeaderItemView.qml index 306cd8f01de1d3b16ce8cbc757cdbdca04f9ec59..cfd2b48d369c8519decf06cc4a4d08bc65bddf7b 100644 --- a/share/qtcreator/welcomescreen/widgets/HeaderItemView.qml +++ b/share/qtcreator/welcomescreen/widgets/HeaderItemView.qml @@ -59,6 +59,7 @@ Item { anchors.right: parent.right Repeater { + width: parent.width model: root.model delegate: root.delegate } diff --git a/share/qtcreator/welcomescreen/widgets/LinksBar.qml b/share/qtcreator/welcomescreen/widgets/LinksBar.qml index 2d1bfd54de2c09a5b3076fc4b9ca77ee33d05566..ede5c18daeb35e86ef118b7c557b19d9237762f5 100644 --- a/share/qtcreator/welcomescreen/widgets/LinksBar.qml +++ b/share/qtcreator/welcomescreen/widgets/LinksBar.qml @@ -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 diff --git a/share/qtcreator/welcomescreen/widgets/RecentProjects.qml b/share/qtcreator/welcomescreen/widgets/RecentProjects.qml index aa11086c95a8d805d82b9b4698b236de8ec88f2a..82c627f771bcb98c5340433ed8966a2706d526a6 100644 --- a/share/qtcreator/welcomescreen/widgets/RecentProjects.qml +++ b/share/qtcreator/welcomescreen/widgets/RecentProjects.qml @@ -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