on xenial help sign in
revert to the old design of popup menus
00c4310Lukáš Tinkl
qml/Launcher/LauncherPanel.qml+12−13
@@ -518,7 +518,7 @@ Rectangle {
518 id: quickListShape
518 id: quickListShape
519 objectName: "quickListShape"
519 objectName: "quickListShape"
520 anchors.fill: quickList
520 anchors.fill: quickList
521− opacity: quickList.state === "open" ? 0.96 : 0
521+ opacity: quickList.state === "open" ? 0.8 : 0
522 visible: opacity > 0
522 visible: opacity > 0
523 rotation: root.rotation
523 rotation: root.rotation
524
524
@@ -530,15 +530,15 @@ Rectangle {
530
530
531 Image {
531 Image {
532 anchors {
532 anchors {
533− left: parent.left
533+ right: parent.left
534− leftMargin: (quickList.item.width - units.gu(1)) / 2 - width / 2
534+ rightMargin: -units.dp(4)
535 verticalCenter: parent.verticalCenter
535 verticalCenter: parent.verticalCenter
536− verticalCenterOffset: (parent.height / 2 + units.dp(3)) * (quickList.offset > 0 ? 1 : -1) * (root.inverted ? 1 : -1)
536+ verticalCenterOffset: -quickList.offset * (root.inverted ? 1 : -1)
537 }
537 }
538 height: units.gu(1)
538 height: units.gu(1)
539 width: units.gu(2)
539 width: units.gu(2)
540 source: "graphics/quicklist_tooltip.png"
540 source: "graphics/quicklist_tooltip.png"
541− rotation: (quickList.offset > 0 ? 0 : 180) + (root.inverted ? 0 : 180)
541+ rotation: root.inverted ? 90 : 270
542 }
542 }
543
543
544 InverseMouseArea {
544 InverseMouseArea {
@@ -554,18 +554,18 @@ Rectangle {
554 Rectangle {
554 Rectangle {
555 id: quickList
555 id: quickList
556 objectName: "quickList"
556 objectName: "quickList"
557− color: "#f5f5f5"
557+ color: "#221e1c"
558 // Because we're setting left/right anchors depending on orientation, it will break the
558 // Because we're setting left/right anchors depending on orientation, it will break the
559 // width setting after rotating twice. This makes sure we also re-apply width on rotation
559 // width setting after rotating twice. This makes sure we also re-apply width on rotation
560 width: root.inverted ? units.gu(30) : units.gu(30)
560 width: root.inverted ? units.gu(30) : units.gu(30)
561 height: quickListColumn.height
561 height: quickListColumn.height
562 visible: quickListShape.visible
562 visible: quickListShape.visible
563 anchors {
563 anchors {
564− left: root.inverted ? undefined : parent.left
564+ left: root.inverted ? undefined : parent.right
565− right: root.inverted ? parent.right : undefined
565+ right: root.inverted ? parent.left : undefined
566 margins: units.gu(1)
566 margins: units.gu(1)
567 }
567 }
568− y: itemCenter + offset
568+ y: itemCenter - (height / 2) + offset
569 rotation: root.rotation
569 rotation: root.rotation
570
570
571 property var model
571 property var model
@@ -574,9 +574,8 @@ Rectangle {
574
574
575 // internal
575 // internal
576 property int itemCenter: item ? root.mapFromItem(quickList.item).y + (item.height / 2) : units.gu(1)
576 property int itemCenter: item ? root.mapFromItem(quickList.item).y + (item.height / 2) : units.gu(1)
577− property int offset: itemCenter + (item.height/2) + height + units.gu(1) > parent.height ?
577+ property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
578− -(item.height/2) - height - units.gu(.5) :
579− (item.height/2) + units.gu(.5)
578+ itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0
580
579
581 Column {
580 Column {
582 id: quickListColumn
581 id: quickListColumn
@@ -595,7 +594,7 @@ Rectangle {
595 // FIXME: This is a workaround for the theme not being context sensitive. I.e. the
594 // FIXME: This is a workaround for the theme not being context sensitive. I.e. the
596 // ListItems don't know that they are sitting in a themed Popover where the color
595 // ListItems don't know that they are sitting in a themed Popover where the color
597 // needs to be inverted.
596 // needs to be inverted.
598− __foregroundColor: "black"
597+ __foregroundColor: Theme.palette.selected.backgroundText
599
598
600 onClicked: {
599 onClicked: {
601 if (!model.clickable) {
600 if (!model.clickable) {
tests/qmltests/Launcher/tst_Launcher.qml+1−1
@@ -538,7 +538,7 @@ Item {
538
538
539 // Doing longpress
539 // Doing longpress
540 mousePress(draggedItem);
540 mousePress(draggedItem);
541− tryCompare(quickListShape, "opacity", 0.96);
541+ tryCompare(quickListShape, "opacity", 0.8);
542 mouseRelease(draggedItem);
542 mouseRelease(draggedItem);
543
543
544 verify(quickList.y >= units.gu(1));
544 verify(quickList.y >= units.gu(1));