mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 02:04:45 +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
|
property MouseArea mouseArea
|
||||||
readonly property bool pressed: mouseArea.pressed && mouseArea.activeButton == button
|
readonly property bool pressed: mouseArea.pressed && mouseArea.activeButton == button
|
||||||
property alias iconSource: icon.source
|
property alias iconSource: icon.source
|
||||||
|
property alias colorGroup: icon.colorGroup
|
||||||
signal clicked()
|
signal clicked()
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -64,7 +65,10 @@ Item {
|
||||||
}
|
}
|
||||||
PlasmaCore.IconItem {
|
PlasmaCore.IconItem {
|
||||||
id: icon
|
id: icon
|
||||||
anchors.fill: parent
|
anchors {
|
||||||
|
fill: parent
|
||||||
|
margins: parent.height * 0.25
|
||||||
|
}
|
||||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||||
//enabled: button.enabled && button.clickable
|
//enabled: button.enabled && button.clickable
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,17 +169,6 @@ PlasmaCore.ColorScope {
|
||||||
|
|
||||||
visible: plasmoid.configuration.PanelButtonsVisible
|
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 {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
|
|
@ -211,18 +200,8 @@ PlasmaCore.ColorScope {
|
||||||
plasmoid.nativeInterface.showDesktop = false;
|
plasmoid.nativeInterface.showDesktop = false;
|
||||||
taskSwitcher.visible ? taskSwitcher.hide() : taskSwitcher.show();
|
taskSwitcher.visible ? taskSwitcher.hide() : taskSwitcher.show();
|
||||||
}
|
}
|
||||||
PlasmaCore.SvgItem {
|
iconSource: "mobile-task-switcher"
|
||||||
anchors.centerIn: parent
|
colorGroup: root.showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||||
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 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
|
@ -243,18 +222,8 @@ PlasmaCore.ColorScope {
|
||||||
MobileShell.HomeScreenControls.resetHomeScreenPosition();
|
MobileShell.HomeScreenControls.resetHomeScreenPosition();
|
||||||
plasmoid.nativeInterface.allMinimizedChanged();
|
plasmoid.nativeInterface.allMinimizedChanged();
|
||||||
}
|
}
|
||||||
PlasmaCore.SvgItem {
|
iconSource: "start-here-kde"
|
||||||
anchors.centerIn: parent
|
colorGroup: root.showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||||
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 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
|
|
@ -284,18 +253,8 @@ PlasmaCore.ColorScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PlasmaCore.SvgItem {
|
iconSource: TaskPanel.KWinVirtualKeyboard.active ? "go-down" : "mobile-close-app"
|
||||||
anchors.centerIn: parent
|
colorGroup: root.showingApp ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup
|
||||||
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 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue