mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-10 20:52:11 +01:00
3d05256a36
To make it closer to proposed design. * Aligned the background OP logo to the bottom-right corner * Don't upscale the OP logo * Fixed width of community panel * Changed the vertical layout of icons and community panel * Fixed color of community panel titles * Use styled text for next containing &, this fixes rendering but "..." are not displayed
64 lines
1.7 KiB
QML
64 lines
1.7 KiB
QML
// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
|
|
import QtQuick 1.1
|
|
|
|
Item {
|
|
id: container
|
|
width: 100
|
|
height: 62
|
|
|
|
signal clicked(string url)
|
|
|
|
Text {
|
|
id: header
|
|
text: "OpenPilot Websites"
|
|
width: parent.width
|
|
color: "#44515c"
|
|
font {
|
|
pointSize: 14
|
|
weight: Font.Bold
|
|
}
|
|
}
|
|
|
|
ListModel {
|
|
id: sitesModel
|
|
ListElement { title: "OpenPilot Home"; link: "http://www.openpilot.org" }
|
|
ListElement { title: "OpenPilot Wiki"; link: "http://wiki.openpilot.org" }
|
|
ListElement { title: "OpenPilot Store"; link: "http://www.openpilot.org/hardware/get-hardware/" }
|
|
ListElement { title: "OpenPilot Forums"; link: "http://forums.openpilot.org" }
|
|
ListElement { title: "OpenPilot Code Reviews"; link: "http://git.openpilot.org" }
|
|
ListElement { title: "OpenPilot Progress Tracker"; link: "http://progress.openpilot.org" }
|
|
}
|
|
|
|
ListView {
|
|
id: view
|
|
width: parent.width
|
|
anchors { top: header.bottom; topMargin: 14; bottom: parent.bottom }
|
|
model: sitesModel
|
|
spacing: 8
|
|
clip: true
|
|
|
|
delegate: Text {
|
|
text: title
|
|
width: view.width
|
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
|
|
|
font {
|
|
pointSize: 12
|
|
weight: Font.Bold
|
|
}
|
|
|
|
color: mouseArea.containsMouse ? "#224d81" : "black"
|
|
|
|
MouseArea {
|
|
id: mouseArea
|
|
anchors.fill: parent
|
|
hoverEnabled: true
|
|
onClicked: {
|
|
console.log(link)
|
|
container.clicked(link)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|