~ci-train-bot/ubuntu-settings-components/ubuntu-settings-components-ubuntu-zesty-2202

« back to all changes in this revision

Viewing changes to plugins/Ubuntu/Settings/Menus/PlaybackItemMenu.qml

  • Committer: Bileto Bot
  • Date: 2016-11-16 18:52:43 UTC
  • mfrom: (146.4.57 touch+pointer-styles)
  • Revision ID: ci-train-bot@canonical.com-20161116185243-o399ryjh002umz1a
* Menus: add Pointer and Touch styles to be used depending on the user
  interaction with components
  Menu items now have a new Style property that defines some common properties
  such as shared colors and sizes that change depending on the UX journey. I'm
  only defining Pointer and TouchStyles for now, but they can be easily
  overridden in case.
  Removed some deprecated properties and adapted colors and sizes to new
  style.
* Bump package version as there's a new API for various components

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    signal previous()
34
34
 
35
35
    highlightWhenPressed: false
36
 
    implicitHeight: layout.height + (divider.visible ? divider.height : 0)
 
36
    menuHeight: layout.height
37
37
 
38
 
    SlotsLayout {
 
38
    StyledSlotsLayout {
39
39
        id: layout
40
40
        objectName: "playbackMenuLayout"
 
41
        style: menuStyle
41
42
 
42
43
        Row {
43
44
            anchors.centerIn: parent
44
 
            spacing: units.gu(3)
 
45
            spacing: units.gu(pointerMode ? 2 : 2.5)
45
46
 
46
47
            PlaybackButton {
47
48
                objectName: "previousButton"
48
49
                iconName: "media-skip-backward"
49
50
                enabled: canGoPrevious
 
51
                anchors.verticalCenter: parent.verticalCenter
50
52
                onClicked: menu.previous()
51
53
            }
52
54
 
54
56
                objectName: "playButton"
55
57
                iconName: playing ? "media-playback-pause" : "media-playback-start"
56
58
                enabled: canPlay
 
59
                size: menuStyle.avatarSize
 
60
                anchors.verticalCenter: parent.verticalCenter
57
61
                onClicked: menu.play(!playing)
58
62
            }
59
63
 
61
65
                objectName: "nextButton"
62
66
                iconName: "media-skip-forward"
63
67
                enabled: canGoNext
 
68
                anchors.verticalCenter: parent.verticalCenter
64
69
                onClicked: menu.next()
65
70
            }
66
71
        }