mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Port to use IconItem again
This commit is contained in:
parent
31fceb18f8
commit
13f21bf23b
2 changed files with 11 additions and 48 deletions
|
|
@ -20,6 +20,7 @@ Item {
|
|||
property MouseArea mouseArea
|
||||
readonly property bool pressed: mouseArea.pressed && mouseArea.activeButton == button
|
||||
property alias iconSource: icon.source
|
||||
property alias colorGroup: icon.colorGroup
|
||||
signal clicked()
|
||||
|
||||
Rectangle {
|
||||
|
|
@ -64,7 +65,10 @@ Item {
|
|||
}
|
||||
PlasmaCore.IconItem {
|
||||
id: icon
|
||||
anchors.fill: parent
|
||||
anchors {
|
||||
fill: parent
|
||||
margins: parent.height * 0.25
|
||||
}
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
//enabled: button.enabled && button.clickable
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,17 +169,6 @@ PlasmaCore.ColorScope {
|
|||
|
||||
visible: plasmoid.configuration.PanelButtonsVisible
|
||||
|
||||
PlasmaCore.Svg {
|
||||
id: panelSvg
|
||||
imagePath: "icons/mobile"
|
||||
colorGroup: root.showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||
}
|
||||
PlasmaCore.Svg {
|
||||
id: startSvg
|
||||
imagePath: "icons/start"
|
||||
colorGroup: root.showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
gradient: Gradient {
|
||||
|
|
@ -211,18 +200,8 @@ PlasmaCore.ColorScope {
|
|||
plasmoid.nativeInterface.showDesktop = false;
|
||||
taskSwitcher.visible ? taskSwitcher.hide() : taskSwitcher.show();
|
||||
}
|
||||
PlasmaCore.SvgItem {
|
||||
anchors.centerIn: parent
|
||||
implicitHeight: 0.75 * parent.height * 0.6 // 0.75 sizing adjustment fix needed
|
||||
implicitWidth: implicitHeight
|
||||
opacity: parent.enabled ? 1 : 0.5
|
||||
svg: panelSvg
|
||||
elementId: "mobile-task-switcher"
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: units.shortDuration }
|
||||
}
|
||||
}
|
||||
iconSource: "mobile-task-switcher"
|
||||
colorGroup: root.showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||
}
|
||||
|
||||
Button {
|
||||
|
|
@ -243,18 +222,8 @@ PlasmaCore.ColorScope {
|
|||
MobileShell.HomeScreenControls.resetHomeScreenPosition();
|
||||
plasmoid.nativeInterface.allMinimizedChanged();
|
||||
}
|
||||
PlasmaCore.SvgItem {
|
||||
anchors.centerIn: parent
|
||||
implicitHeight: parent.height * 0.6
|
||||
implicitWidth: implicitHeight
|
||||
opacity: parent.enabled ? 1 : 0.5
|
||||
svg: startSvg
|
||||
elementId: "16-16-start-here-kde"
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: units.shortDuration }
|
||||
}
|
||||
}
|
||||
iconSource: "start-here-kde"
|
||||
colorGroup: root.showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||
}
|
||||
|
||||
Button {
|
||||
|
|
@ -284,18 +253,8 @@ PlasmaCore.ColorScope {
|
|||
}
|
||||
}
|
||||
|
||||
PlasmaCore.SvgItem {
|
||||
anchors.centerIn: parent
|
||||
implicitHeight: 0.75 * parent.height * 0.6 // 0.75 sizing adjustment fix needed
|
||||
implicitWidth: implicitHeight
|
||||
opacity: parent.enabled ? 1 : 0.5
|
||||
svg: panelSvg
|
||||
elementId: TaskPanel.KWinVirtualKeyboard.active ? "go-down" : "mobile-close-app"
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: units.shortDuration }
|
||||
}
|
||||
}
|
||||
iconSource: TaskPanel.KWinVirtualKeyboard.active ? "go-down" : "mobile-close-app"
|
||||
colorGroup: root.showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue