~ken-vandine/gwibber/opacity

« back to all changes in this revision

Viewing changes to qml/StatusUpdateTileDetails.qml

  • Committer: Ken VanDine
  • Date: 2013-03-13 23:09:04 UTC
  • Revision ID: ken.vandine@canonical.com-20130313230904-2eg8d8f4pocv3w9w
Use opacity instead of visible

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
Item {
24
24
    id: details
25
 
    height: visible ? entryArea.height + threadView.height + units.gu(2) : 0
 
25
    height: detailsOpacity > 0 ? entryArea.height + threadView.height + units.gu(2) : 0
26
26
 
27
27
    property alias hasFocus: entryArea.activeFocus
28
28
    onFocusChanged: {
35
35
        id: friends
36
36
        onSendComplete: {
37
37
             if (success) {
38
 
                 activitySpinner.visible = false;
39
 
                 post.visible = false;
 
38
                 activitySpinner.opacity = 0;
40
39
                 entryArea.text = "";
41
40
                 console.log ("Send completed successfully");
42
41
             } else {
43
 
                 activitySpinner.visible = false;
 
42
                 activitySpinner.opacity = 1.0;
44
43
                 console.log ("Send failed: " + errorMessage);
45
44
             }
46
45
         }
63
62
        }
64
63
 
65
64
        onVisibleChanged: {
66
 
            if (details.visible && threadLoader.state != Loader.Ready) {
 
65
            if (detailsOpacity > 0 && threadLoader.state != Loader.Ready) {
67
66
                threadLoader.source = "ThreadLoader.qml";
68
67
            }
69
68
        }
119
118
            text: i18n.tr("Send")
120
119
            onClicked: {
121
120
                console.log ("Reply to " + messageId + " from " + accountId + ": " + entryArea.text);
122
 
                activitySpinner.visible = true
 
121
                activitySpinner.opacity = 1.0
123
122
                friends.sendReplyAsync(accountId, messageId, entryArea.text);
124
123
            }
125
124
        }
127
126
        ActivityIndicator {
128
127
            id: activitySpinner
129
128
            anchors.centerIn: entryArea
130
 
            visible: false
131
 
            running: visible
 
129
            opacity: 0.0
 
130
            running: opacity > 0
132
131
        }
133
132
    }
134
133