summaryrefslogtreecommitdiffstats
path: root/qml
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2018-12-09 15:47:27 +0100
committerPapoteur <papoteur@mageia.org>2018-12-17 10:19:29 +0100
commit238e1b0431265352ae10125fb3298ef6f7b84c29 (patch)
treefef205e1e386ae6bc620b2221c8f74eb358fe102 /qml
parent618702d35d0384db47185162ab1cb211cce45d02 (diff)
downloadmageiawelcome-238e1b0431265352ae10125fb3298ef6f7b84c29.tar
mageiawelcome-238e1b0431265352ae10125fb3298ef6f7b84c29.tar.gz
mageiawelcome-238e1b0431265352ae10125fb3298ef6f7b84c29.tar.bz2
mageiawelcome-238e1b0431265352ae10125fb3298ef6f7b84c29.tar.xz
mageiawelcome-238e1b0431265352ae10125fb3298ef6f7b84c29.zip
Manage highlighting in applications categories list
Add launch button
Diffstat (limited to 'qml')
-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)
}
}
}