~ubuntu-branches/ubuntu/quantal/kde-workspace/quantal

« back to all changes in this revision

Viewing changes to kwin/clients/aurorae/src/qml/AuroraeButtonGroup.qml

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-07-26 17:32:34 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120726173234-bsn4gwllpbcwu2r4
Tags: 4:4.9.0-0ubuntu1
* Use direct build-depends versions rather than kde-sc-dev-latest
* Remove patches/kubuntu_revert_1554ba408633397066d31c3d565c217b5a385fb8.diff fixed upstream
* Remove debian/patches/kubuntu_fix_batterymonitor_panel_minsize.diff fix upstream
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    }
38
38
    id: group
39
39
    property string buttons
40
 
    states: [
41
 
        State { name: "normal" },
42
 
        State { name: "maximized" }
43
 
    ]
44
40
 
45
 
    Component.onCompleted: {
46
 
        group.state = decoration.maximized ? "maximized" : "normal";
47
 
    }
48
41
    Row {
49
42
        id: groupRow
50
43
        spacing: auroraeTheme.buttonSpacing * auroraeTheme.buttonSizeFactor
51
44
    }
52
 
    Connections {
53
 
        target: decoration
54
 
        onMaximizedChanged: group.state = decoration.maximized ? "maximized" : "normal"
55
 
    }
56
45
    onButtonsChanged: {
57
46
        for (i = 0; i < groupRow.children.length; i++) {
58
47
            groupRow.children[i].destroy();
59
48
        }
60
49
        createButtons();
61
50
    }
 
51
    anchors {
 
52
        top: parent.top
 
53
        topMargin: (decoration.maximized ? auroraeTheme.titleEdgeTopMaximized : auroraeTheme.titleEdgeTop) + root.paddingTop + auroraeTheme.buttonMarginTop
 
54
    }
 
55
    Behavior on anchors.topMargin {
 
56
        NumberAnimation {
 
57
            duration: auroraeTheme.animationTime
 
58
        }
 
59
    }
62
60
}