Port to Kirigami.Icon

Part of https://invent.kde.org/plasma/plasma-workspace/-/issues/82.
This commit is contained in:
Nate Graham 2023-07-30 15:03:00 -06:00
parent b25e7a849b
commit ade934a9d1
7 changed files with 14 additions and 20 deletions

View file

@ -114,12 +114,12 @@ PlasmaCore.Dialog {
Item {
id: arrowsContainer
anchors.fill: parent
PlasmaCore.IconItem {
Kirigami.Icon {
anchors.fill: parent
source: "go-up"
visible: false
}
PlasmaCore.IconItem {
Kirigami.Icon {
anchors.fill: parent
source: "go-down"
visible: {
@ -145,7 +145,7 @@ PlasmaCore.Dialog {
return false;
}
}
PlasmaCore.IconItem {
Kirigami.Icon {
anchors.fill: parent
source: "go-up"
visible: {
@ -171,7 +171,7 @@ PlasmaCore.Dialog {
return false;
}
}
PlasmaCore.IconItem {
Kirigami.Icon {
anchors.fill: parent
source: "go-next"
visible: {
@ -205,7 +205,7 @@ PlasmaCore.Dialog {
return false;
}
}
PlasmaCore.IconItem {
Kirigami.Icon {
anchors.fill: parent
source: "go-previous"
visible: {

View file

@ -4,16 +4,15 @@
SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQuick
import org.kde.plasma.core as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
import org.kde.kwin.decoration
DecorationButton {
id: appMenuButton
buttonType: DecorationOptions.DecorationButtonApplicationMenu
visible: decoration.client.hasApplicationMenu
PlasmaCore.IconItem {
usesPlasmaTheme: false
source: decoration.client.icon
Kirigami.Icon {
anchors.fill: parent
source: decoration.client.icon
}
}

View file

@ -5,15 +5,14 @@
*/
import QtQuick
import org.kde.kwin.decoration
import org.kde.plasma.core as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
DecorationButton {
property bool closeOnDoubleClick: decorationSettings.closeOnDoubleClickOnMenu
id: menuButton
buttonType: DecorationOptions.DecorationButtonMenu
PlasmaCore.IconItem {
Kirigami.Icon {
anchors.fill: parent
usesPlasmaTheme: false
source: decoration.client.icon
}
DecorationOptions {

View file

@ -11,7 +11,6 @@ import org.kde.kirigami 2.20 as Kirigami
import org.kde.kwin as KWinComponents
import org.kde.kwin.private.effects
import org.kde.plasma.components 3.0 as PC3
import org.kde.plasma.core as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
import org.kde.ksvg 1.0 as KSvg
@ -155,12 +154,11 @@ Item {
visible: !thumb.activeHidden
}
PlasmaCore.IconItem {
Kirigami.Icon {
id: icon
width: Kirigami.Units.iconSizes.large
height: Kirigami.Units.iconSizes.large
source: thumb.window.icon
usesPlasmaTheme: false
anchors.horizontalCenter: thumbSource.horizontalCenter
anchors.bottom: thumbSource.bottom
anchors.bottomMargin: -Math.round(height / 4)

View file

@ -8,7 +8,6 @@
import QtQuick
import QtQuick.Layouts
import org.kde.plasma.core as PlasmaCore
import org.kde.kirigami 2.20 as Kirigami
import org.kde.ksvg 1.0 as KSvg
import org.kde.plasma.components 3.0 as PlasmaComponents
@ -39,7 +38,7 @@ Item {
}
spacing: Kirigami.Units.smallSpacing
PlasmaCore.IconItem {
Kirigami.Icon {
id: icon
Layout.preferredWidth: root.effectFrame.iconSize.width
Layout.preferredHeight: root.effectFrame.iconSize.height

View file

@ -22,7 +22,7 @@ PlasmaCore.Dialog {
mainItem: RowLayout {
spacing: Kirigami.Units.smallSpacing
PlasmaCore.IconItem {
Kirigami.Icon {
implicitWidth: Kirigami.Units.iconSizes.medium
implicitHeight: implicitWidth
source: osd.iconName

View file

@ -151,7 +151,7 @@ KWin.TabBoxSwitcher {
wId: windowId
}
PlasmaCore.IconItem {
Kirigami.Icon {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.bottom
anchors.verticalCenterOffset: Math.round(-columnLayout.spacing/2)
@ -159,7 +159,6 @@ KWin.TabBoxSwitcher {
height: thumbnailGridView.iconSize
source: model.icon
usesPlasmaTheme: false
}
PlasmaComponents3.ToolButton {