[Merge] lp:~thomas-voss/trust-store/fix-1504022 into lp:trust-store/15.04

Matthew Paul Thomas mpt at canonical.com
Sun Nov 29 13:30:47 UTC 2015


Review: Needs Fixing design

A couple of nitpicks, but the screenshot looks good otherwise.

Diff comments:

> 
> === modified file 'src/core/trust/mir/prompt_main.qml'
> --- src/core/trust/mir/prompt_main.qml	2014-11-06 10:38:33 +0000
> +++ src/core/trust/mir/prompt_main.qml	2015-11-27 12:59:33 +0000
> @@ -15,40 +15,76 @@
>   */
>  
>  import QtQuick 2.0
> -import Ubuntu.Components 1.1
> -import Ubuntu.Components.Popups 1.0
> -
> -Rectangle {
> -    width: units.gu(40)
> -    height: units.gu(71)
> -    color: "transparent"
> -
> -    property var dialogTitle: title
> -    property var dialogDescription: description
> +import Ubuntu.Components 1.3
> +import Ubuntu.Components.Popups 1.3
> +
> +Item {
> +
> +    property var appIcon: icon
> +    property var appName: name
> +    property var appId: id
> +    property var serviceDescription: description
>  
>      signal quit(int code)
>  
> -    Component.onCompleted: dialog.show();
> -
> -    Dialog {
> +    Component {
>          id: dialog
> -
> -        title: dialogTitle
> -        text: dialogDescription
> -        fadingAnimation: PropertyAnimation { duration: 0 }
> -
> -        Button {
> -            objectName: "deny"
> -            text: i18n.tr("Deny")
> -            color: UbuntuColors.red
> -            onClicked: quit(1)
> -        }
> -
> -        Button {
> -            objectName: "allow"
> -            text: i18n.tr("Allow")
> -            color: UbuntuColors.green
> -            onClicked: quit(0)
> +        Dialog {
> +            id: dialogue
> +            Column {
> +                spacing: units.gu(0.5)
> +                UbuntuShape {
> +                    anchors.horizontalCenter: parent.horizontalCenter
> +                    id: iconShape
> +                    radius: "medium"
> +                    aspect: UbuntuShape.Flat
> +                    anchors.margins: units.gu(1)
> +                    sourceFillMode: UbuntuShape.PreserveAspectCrop
> +                    source: Image {
> +                        id: icon
> +                        sourceSize.width: iconShape.width
> +                        sourceSize.height: iconShape.height
> +                        source: appIcon
> +                    }
> +                }
> +                Label {
> +                    anchors.horizontalCenter: parent.horizontalCenter
> +                    text: appName
> +                    horizontalAlignment: Text.AlignHCenter
> +                    width: parent.width
> +                    elide: Text.ElideRight
> +                    wrapMode: Text.Wrap
> +                    maximumLineCount: 2
> +                }
> +                Label {
> +                    anchors.horizontalCenter: parent.horizontalCenter
> +                    text: appId
> +                    color: UbuntuColors.lightGrey
> +                    fontSize: "small"
> +                    width: parent.width
> +                    horizontalAlignment: Text.AlignHCenter
> +                    elide: Text.ElideMiddle
> +                    maximumLineCount: 1
> +                }
> +            }
> +            Label {
> +                anchors.horizontalCenter: parent.horizontalCenter
> +                text: serviceDescription
> +                horizontalAlignment: Text.AlignHCenter
> +                width: parent.width
> +                wrapMode: Text.Wrap
> +            }
> +            Button {
> +                text: i18n.tr("Allow")
> +                color: UbuntuColors.green
> +                onClicked: quit(0)
> +            }
> +            Button {
> +                text: i18n.tr("Don't Allow")

Real apostrophe ’ please. :-)

> +                color: UbuntuColors.orange

Buttons should never be orange; negative buttons should be red.
<https://design.ubuntu.com/apps/building-blocks/buttons>

More importantly though, the currently decreed draft guideline is that a view can have one positive-styled button, and one negative-styled button, but not both at once. Where there are both positive and negative buttons, only the more important one should be styled: so here, "Allow" should be positive but "Don’t Allow" should be neutral.

> +                onClicked: quit(1)
> +            }           
>          }
>      }
> +    Component.onCompleted: PopupUtils.open(dialog)
>  }


-- 
https://code.launchpad.net/~thomas-voss/trust-store/fix-1504022/+merge/278418
Your team Ubuntu Phablet Team is subscribed to branch lp:trust-store/15.04.



More information about the Ubuntu-reviews mailing list