mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2024-08-15 00:43:43 +00:00
Very early KDE 6 release.
This commit is contained in:
parent
7cc4ccabbc
commit
686046d4f7
6272 changed files with 140920 additions and 529657 deletions
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
SPDX-FileCopyrightText: 2013-2017 Jan Grulich <jgrulich@redhat.com>
|
||||
|
||||
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||
*/
|
||||
|
||||
import QtQuick 2.2
|
||||
|
||||
import org.kde.kirigami 2.20 as Kirigami
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
required property bool airplaneModeAvailable
|
||||
required property string iconName
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
acceptedButtons: airplaneModeAvailable ? Qt.LeftButton | Qt.MiddleButton : Qt.LeftButton
|
||||
|
||||
property bool wasExpanded
|
||||
|
||||
onPressed: wasExpanded = mainWindow.expanded
|
||||
onClicked: mouse => {
|
||||
if (airplaneModeAvailable && mouse.button === Qt.MiddleButton) {
|
||||
mainWindow.planeModeSwitchAction.trigger();
|
||||
} else {
|
||||
mainWindow.expanded = !wasExpanded;
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.Icon {
|
||||
id: connectionIcon
|
||||
|
||||
anchors.fill: parent
|
||||
source: root.iconName
|
||||
active: parent.containsMouse
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue