Created
October 13, 2016 11:31
-
-
Save martonmiklos/5de1ac4cb15b281514fda37ca9186ba3 to your computer and use it in GitHub Desktop.
ProfileStatusIndicator.qml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GNU nano 2.2.6 File: /usr/share/lipstick-jolla-home-qt5/statusarea/ProfileStatusIndicator.qml | |
/**************************************************************************** | |
** | |
** Copyright (C) 2013 Jolla Ltd. | |
** Contact: Vesa Halttunen <[email protected]> | |
** | |
****************************************************************************/ | |
import QtQuick 2.0 | |
import org.freedesktop.contextkit 1.0 | |
Image { | |
id: profileStatusIndicator | |
property bool enabled: true | |
source: profileNameContextProperty.value == "silent" ? "image://theme/icon-status-silent" + iconSuffix : "" | |
width: source != "" ? implicitWidth : 0 | |
height: source != "" ? implicitHeight : 0 | |
ContextProperty { | |
id: profileNameContextProperty | |
key: "Profile.Name" | |
} | |
onEnabledChanged: { | |
if (enabled) { | |
profileNameContextProperty.subscribe() | |
} else { | |
profileNameContextProperty.unsubscribe() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment