Skip to content

Commit

Permalink
#1 ugly menu
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMure committed Aug 26, 2015
1 parent cc87cce commit 2892e76
Showing 1 changed file with 71 additions and 45 deletions.
116 changes: 71 additions & 45 deletions src/ui/MenuPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,84 @@ import QtQuick 2.0
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.0

Rectangle {
Text {
id: text1
x: 8
y: 8
text: qsTr("Text")
font.pixelSize: 12
}
}

/*ListView {
id: shareList
width: 400
height: 400
spacing: 40
anchors.fill: parent
highlight: Rectangle { color: "lightsteelblue"; radius: 5 }
focus: true
Item {
ListView {
id: shareList
width: 400
height: 400
anchors.rightMargin: 0
anchors.bottomMargin: 0
anchors.leftMargin: 0
anchors.topMargin: 0
spacing: 10
anchors.fill: parent

model: ListModel {
ListElement {
name: "News"
highlight: Rectangle {
color: "lightsteelblue";
radius: 5
anchors.leftMargin: 30
}
ListElement {
name: "Inbox"
}
ListElement {
name: "My shares"
}
}
focus: true

delegate: Item {
height: menuLabel.lineHeight
width: parent.width
MouseArea {
anchors.fill: parent;
onClicked: {
shareList.currentIndex = index;
model: ListModel {
ListElement {
name: "News"
element: 3
filter: "blah"
}
ListElement {
name: "Inbox"
element: 8
filter: "bloh"
}
ListElement {
name: "My shares"
element: 4
filter: "bluh"
}
}

Text {
id: menuLabel
text: ">" + name
//height: 15
anchors.left: parent.left
anchors.leftMargin: 10
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
delegate: Text {
id: menuLabel
text: name
font.pointSize: 15
anchors.left: parent.left
anchors.leftMargin: 30
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter

MouseArea {
anchors.fill: parent;
onClicked: {
// Todo something with filter
}
}

Image {
fillMode: Image.PreserveAspectFit
source: "plus.png"
anchors.left: parent.left
anchors.leftMargin: -30
anchors.top: parent.top
anchors.bottom: parent.bottom
}

Text {
anchors.left: parent.right
anchors.leftMargin: 5
text: element
font.pointSize: 15
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter

Rectangle {
anchors.fill: parent
color: "blue"
radius: 9
z: -1
}
}
}
}
}

}*/

0 comments on commit 2892e76

Please sign in to comment.