summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-12-09 15:47:27 +0100
committerPapoteur <papoteur@mageia.org>2018-12-15 15:46:34 +0100
commita70cf65c5d589734f2b2b651577a25264302cd64 (patch)
tree982b86078516335879892e0074cfe45aa5d0b841
parent34323be449588f595d1acaad5d56869a91353ad6 (diff)
downloadmageiawelcome-a70cf65c5d589734f2b2b651577a25264302cd64.tar
mageiawelcome-a70cf65c5d589734f2b2b651577a25264302cd64.tar.gz
mageiawelcome-a70cf65c5d589734f2b2b651577a25264302cd64.tar.bz2
mageiawelcome-a70cf65c5d589734f2b2b651577a25264302cd64.tar.xz
mageiawelcome-a70cf65c5d589734f2b2b651577a25264302cd64.zip
Manage highlighting in applications categories list
Add launch button
-rw-r--r--qml/mw-ui.qml32
1 files changed, 24 insertions, 8 deletions
diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml
index 9985b41..bbbdf5e 100644
--- a/qml/mw-ui.qml
+++ b/qml/mw-ui.qml
@@ -455,10 +455,10 @@ It is highly recommended that you update your system regularly. An Update icon w
Component { //The hightlight
id: catHighlight
Rectangle {
- width: 200
+ width: 190
height: 25
anchors.horizontalCenter: parent.horizontalCenter
- color: "#8f9193"
+ color: "#2397D4"
y: categoriesList.currentItem.y;
}
}
@@ -466,9 +466,9 @@ It is highly recommended that you update your system regularly. An Update icon w
ListView {
id:categoriesList
anchors {left: parent.left;margins: 5}
- width: 200
- //highlight: catHighlight
- //highlightFollowsCurrentItem: false
+ width: 190
+ highlight: catHighlight
+ highlightFollowsCurrentItem: false
focus: true
model: [{'name': qsTr("Featured"), 'group': "featured"},
{'name': qsTr("Games"),'group': "games"},
@@ -484,12 +484,14 @@ It is highly recommended that you update your system regularly. An Update icon w
width: parent.width
height: 25
color:"transparent"
- Label {text: modelData.name ;}
+ Label {id: catLabel;text: modelData.name ;
+ color: categoriesList.currentIndex === index ? "white" : "black"}
MouseArea {
anchors.centerIn: parent
width: parent.width
height: 25
onClicked: {
+ categoriesList.currentIndex = index
appListDM.items.remove(0,appListDM.count );
var rowCount = appList.count;
for( var i = 0;i < rowCount;i++ )
@@ -587,8 +589,22 @@ It is highly recommended that you update your system regularly. An Update icon w
}
}
}
- Component { id: dummy; Label {text: " "}}
- sourceComponent: (installable === "True") ? button : dummy
+ Component { id: launcher;
+ Button {
+ objectName: "launch"
+ onClicked: {
+ launch.command([command,])}
+ style: ButtonStyle {
+ label: Label {
+ text: qsTr("Launch");
+ }
+ }
+ }
+ }
+ Component { id: dummy;Label {text: " ";
+ }
+ }
+ sourceComponent: (installable === "True") ? button : (command === "" ? dummy : launcher)
}
}
}