~mterry/+junk/u8

« back to all changes in this revision

Viewing changes to qml/Components/WindowControlButtons.qml

  • Committer: Michael Zanetti
  • Date: 2016-11-30 13:28:07 UTC
  • mfrom: (2704 unity8)
  • mto: This revision was merged to the branch mainline in revision 2739.
  • Revision ID: michael.zanetti@canonical.com-20161130132807-c314dqdxenzwy69c
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
Row {
21
21
    id: root
22
 
    spacing: overlayShown ? units.gu(2) : units.gu(1)
 
22
    spacing: overlayShown ? units.gu(2) : windowIsMaximized ? 0 : units.gu(1)
23
23
    Behavior on spacing {
24
24
        UbuntuNumberAnimation {}
25
25
    }
26
26
 
27
27
    // to be set from outside
28
 
    property Item target
29
28
    property bool active: false
30
29
    property bool windowIsMaximized: false
31
30
    property bool closeButtonShown: true
49
48
 
50
49
        Rectangle {
51
50
            anchors.fill: parent
 
51
            anchors.margins: windowIsMaximized ? units.dp(3) : 0
52
52
            radius: height / 2
53
53
            color: theme.palette.normal.negative
54
54
            visible: parent.containsMouse && !overlayShown
55
55
        }
56
56
        Icon {
57
57
            anchors.fill: parent
58
 
            anchors.margins: units.dp(3)
 
58
            anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
59
59
            source: "graphics/window-close.svg"
60
60
            color: root.active ? "white" : UbuntuColors.slate
61
61
        }
71
71
 
72
72
        Rectangle {
73
73
            anchors.fill: parent
 
74
            anchors.margins: windowIsMaximized ? units.dp(3) : 0
74
75
            radius: height / 2
75
76
            color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
76
77
            visible: parent.containsMouse && !overlayShown
77
78
        }
78
79
        Icon {
79
80
            anchors.fill: parent
80
 
            anchors.margins: units.dp(3)
 
81
            anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
81
82
            source: "graphics/window-minimize.svg"
82
83
            color: root.active ? "white" : UbuntuColors.slate
83
84
        }
103
104
 
104
105
        Rectangle {
105
106
            anchors.fill: parent
 
107
            anchors.margins: windowIsMaximized ? units.dp(3) : 0
106
108
            radius: height / 2
107
109
            color: root.active ? UbuntuColors.graphite : UbuntuColors.ash
108
110
            visible: parent.containsMouse && !overlayShown
109
111
        }
110
112
        Icon {
111
113
            anchors.fill: parent
112
 
            anchors.margins: units.dp(3)
 
114
            anchors.margins: windowIsMaximized ? units.dp(6) : units.dp(3)
113
115
            source: root.windowIsMaximized ? "graphics/window-window.svg" : "graphics/window-maximize.svg"
114
116
            color: root.active ? "white" : UbuntuColors.slate
115
117
        }