on xenial help sign in
make the titleInfo react to mouse clicks too
69d50d2Michael Zanetti
qml/Stages/DesktopStage.qml+33−15
@@ -400,27 +400,45 @@ Rectangle {
400 }
400 }
401 }
401 }
402
402
403− ColumnLayout {
403+ MouseArea {
404 id: tileInfo
404 id: tileInfo
405− width: units.gu(30)
406 anchors { left: parent.left; top: decoratedWindow.bottom; topMargin: units.gu(5) }
405 anchors { left: parent.left; top: decoratedWindow.bottom; topMargin: units.gu(5) }
406+ width: units.gu(30)
407+ height: titleInfoColumn.height
407 visible: false
408 visible: false
408− spacing: units.gu(1)
409+ hoverEnabled: true
409
410
410− UbuntuShape {
411+ onContainsMouseChanged: {
411− Layout.preferredHeight: Math.min(units.gu(6), root.height * .05)
412+ if (containsMouse) {
412− Layout.preferredWidth: height * 8 / 7.6
413+ appRepeater.highlightedIndex = index
413− image: Image {
414− anchors.fill: parent
415− source: model.icon
416 }
414 }
417 }
415 }
416+
417+ onClicked: {
418+ appDelegate.focus = true
419+ root.state = ""
420+ }
421+
422+ ColumnLayout {
423+ id: titleInfoColumn
424+ anchors { left: parent.left; top: parent.top; right: parent.right }
425+ spacing: units.gu(1)
426+
427+ UbuntuShape {
428+ Layout.preferredHeight: Math.min(units.gu(6), root.height * .05)
429+ Layout.preferredWidth: height * 8 / 7.6
430+ image: Image {
431+ anchors.fill: parent
432+ source: model.icon
433+ }
434+ }
418− Label {
435+ Label {
419− Layout.fillWidth: true
436+ Layout.fillWidth: true
420− Layout.preferredHeight: units.gu(6)
437+ Layout.preferredHeight: units.gu(6)
421− text: model.name
438+ text: model.name
422− wrapMode: Text.WordWrap
439+ wrapMode: Text.WordWrap
423− maximumLineCount: 2
440+ maximumLineCount: 2
441+ }
424 }
442 }
425 }
443 }
426 }
444 }