Misc fixes in QML.

work/plasma6
Lana Black 3 weeks ago
parent e4c02456c8
commit 45b34a824b

@ -11,6 +11,7 @@ import Qt5Compat.GraphicalEffects
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
@ -383,7 +384,7 @@ Item{
} }
} }
sourceComponent: PlasmaComponents.Highlight { sourceComponent: PlasmaExtras.Highlight {
id: visualIndicatorRectangle id: visualIndicatorRectangle
opacity: 0 opacity: 0

@ -8,6 +8,7 @@ import QtQuick 2.1
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
@ -20,14 +21,14 @@ Window{
property string space:" : " property string space:" : "
PlasmaExtras.ScrollArea { PlasmaComponents.ScrollView {
id: scrollArea id: scrollView
anchors.fill: parent anchors.fill: parent
verticalScrollBarPolicy: Qt.ScrollBarAsNeeded //verticalScrollBarPolicy: Qt.ScrollBarAsNeeded
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff //horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
flickableItem.flickableDirection: Flickable.VerticalFlick //flickableItem.flickableDirection: Flickable.VerticalFlick
Grid{ Grid{
id:mainGrid id:mainGrid

@ -8,6 +8,7 @@ import QtQuick 2.7
import QtQuick.Layouts 1.0 import QtQuick.Layouts 1.0
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
@ -303,7 +304,7 @@ MouseArea {
opacity: 0.35 opacity: 0.35
} }
PlasmaCore.IconItem { Kirigami.Icon {
source: "transform-move" source: "transform-move"
width: Math.min(144, root.metrics.iconSize) width: Math.min(144, root.metrics.iconSize)
height: width height: width
@ -443,10 +444,11 @@ MouseArea {
PlasmaComponents.ToolButton { PlasmaComponents.ToolButton {
id: configureButton id: configureButton
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
iconSource: "configure" icon.name: "configure"
tooltip: i18n("Configure applet") // XXX: Tooltips are gone now? Investigate.
// tooltip: i18n("Configure applet")
onClicked: { onClicked: {
tooltip.visible = false; // tooltip.visible = false;
currentApplet.applet.action("configure").trigger(); currentApplet.applet.action("configure").trigger();
} }
} }
@ -465,8 +467,8 @@ MouseArea {
PlasmaComponents.ToolButton{ PlasmaComponents.ToolButton{
id: colorizingButton id: colorizingButton
checkable: true checkable: true
iconSource: "color-picker" icon.name: "color-picker"
tooltip: i18n("Enable painting for this applet") // tooltip: i18n("Enable painting for this applet")
onClicked: { onClicked: {
fastLayoutManager.setOption(currentApplet.applet.id, "userBlocksColorizing", !checked); fastLayoutManager.setOption(currentApplet.applet.id, "userBlocksColorizing", !checked);
@ -476,8 +478,8 @@ MouseArea {
PlasmaComponents.ToolButton{ PlasmaComponents.ToolButton{
id: lockButton id: lockButton
checkable: true checkable: true
iconSource: checked ? "lock" : "unlock" icon.name: checked ? "lock" : "unlock"
tooltip: i18n("Disable parabolic effect for this applet") // tooltip: i18n("Disable parabolic effect for this applet")
onClicked: { onClicked: {
fastLayoutManager.setOption(currentApplet.applet.id, "lockZoom", checked); fastLayoutManager.setOption(currentApplet.applet.id, "lockZoom", checked);
@ -487,10 +489,10 @@ MouseArea {
PlasmaComponents.ToolButton { PlasmaComponents.ToolButton {
id: closeButton id: closeButton
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
iconSource: "delete" icon.name: "delete"
tooltip: i18n("Remove applet") // tooltip: i18n("Remove applet")
onClicked: { onClicked: {
tooltip.visible = false; // tooltip.visible = false;
if(currentApplet && currentApplet.applet) if(currentApplet && currentApplet.applet)
currentApplet.applet.action("remove").trigger(); currentApplet.applet.action("remove").trigger();
} }

@ -9,6 +9,7 @@ import QtQuick.Layouts 1.1
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
@ -29,7 +30,7 @@ import "layouts" as Layouts
import "./background" as Background import "./background" as Background
import "./debugger" as Debugger import "./debugger" as Debugger
Item { ContainmentItem {
id: root id: root
objectName: "containmentViewLayout" objectName: "containmentViewLayout"
@ -744,9 +745,9 @@ Item {
///////////////END components ///////////////END components
PlasmaCore.ColorScope{ //Kirigami.ColorSet{
id: colorScopePalette // id: colorScopePalette
} //}
LatteContainment.LayoutManager{ LatteContainment.LayoutManager{
id:fastLayoutManager id:fastLayoutManager

@ -6,6 +6,7 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Templates 2.0 as T import QtQuick.Templates 2.0 as T
import org.kde.ksvg 1.0 as KSvg import org.kde.ksvg 1.0 as KSvg
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import "private" as Private import "private" as Private
@ -33,7 +34,7 @@ T.Slider {
KSvg.Svg { KSvg.Svg {
id: grooveSvg id: grooveSvg
imagePath: "widgets/slider" imagePath: "widgets/slider"
colorGroup: PlasmaCore.ColorScope.colorGroup colorGroup: Kirigami.Theme.colorSet
} }
KSvg.FrameSvgItem { KSvg.FrameSvgItem {

@ -6,6 +6,7 @@
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls.Styles 1.2 as QtQuickControlStyle import QtQuick.Controls.Styles 1.2 as QtQuickControlStyle
import QtQuick.Controls 1.2 import QtQuick.Controls 1.2
import org.kde.kirigami 2.20 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
QtQuickControlStyle.SwitchStyle { QtQuickControlStyle.SwitchStyle {
@ -15,7 +16,7 @@ QtQuickControlStyle.SwitchStyle {
PlasmaCore.Svg { PlasmaCore.Svg {
id: switchSvg id: switchSvg
imagePath: "widgets/switch" imagePath: "widgets/switch"
colorGroup: PlasmaCore.ColorScope.colorGroup colorGroup: Kirigami.Theme.colorSet
} }
property bool themeHasSwitch: false property bool themeHasSwitch: false
@ -91,7 +92,7 @@ QtQuickControlStyle.SwitchStyle {
imagePath: "widgets/slider" imagePath: "widgets/slider"
prefix: "groove" prefix: "groove"
opacity: control.checked ? 0 : 1 opacity: control.checked ? 0 : 1
colorGroup: PlasmaCore.ColorScope.colorGroup colorGroup: Kirigami.Theme.colorSet
visible: opacity > 0 visible: opacity > 0
Behavior on opacity { Behavior on opacity {
@ -105,7 +106,7 @@ QtQuickControlStyle.SwitchStyle {
imagePath: "widgets/slider" imagePath: "widgets/slider"
prefix: "groove-highlight" prefix: "groove-highlight"
opacity: control.checked ? 1 : 0 opacity: control.checked ? 1 : 0
colorGroup: PlasmaCore.ColorScope.colorGroup colorGroup: Kirigami.Theme.colorSet
visible: opacity > 0 visible: opacity > 0
Behavior on opacity { Behavior on opacity {
@ -125,7 +126,7 @@ QtQuickControlStyle.SwitchStyle {
imagePath: "widgets/switch" imagePath: "widgets/switch"
prefix: "groove" prefix: "groove"
opacity: control.checked ? 0 : 1 opacity: control.checked ? 0 : 1
colorGroup: PlasmaCore.ColorScope.colorGroup colorGroup: Kirigami.Theme.colorSet
visible: opacity > 0 visible: opacity > 0
Component.onCompleted: styleRoot.themeHasSwitch = fromCurrentTheme; Component.onCompleted: styleRoot.themeHasSwitch = fromCurrentTheme;
@ -142,7 +143,7 @@ QtQuickControlStyle.SwitchStyle {
imagePath: "widgets/switch" imagePath: "widgets/switch"
prefix: "groove-highlight" prefix: "groove-highlight"
opacity: control.checked ? 1 : 0 opacity: control.checked ? 1 : 0
colorGroup: PlasmaCore.ColorScope.colorGroup colorGroup: Kirigami.Theme.colorSet
visible: opacity > 0 visible: opacity > 0
Behavior on opacity { Behavior on opacity {

@ -276,9 +276,9 @@ PlasmoidItem {
} }
///// /////
PlasmaCore.ColorScope{ //Kirigami.ColorSet {
id: colorScopePalette // id: colorScopePalette
} //}
///UPDATE ///UPDATE
function updateListViewParent() { function updateListViewParent() {

@ -16,12 +16,11 @@ import org.kde.draganddrop 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons
import org.kde.taskmanager 0.1 as TaskManager import org.kde.taskmanager 0.1 as TaskManager
PlasmaExtras.ScrollArea { PlasmaComponents.ScrollView {
id: mainToolTip id: mainToolTip
property Item parentTask: null property Item parentTask: null
property var rootIndex: [] property var rootIndex: []

@ -12,6 +12,7 @@ import QtQuick.Layouts 1.1
import Qt5Compat.GraphicalEffects import Qt5Compat.GraphicalEffects
import QtQml.Models 2.2 import QtQml.Models 2.2
import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
@ -89,7 +90,7 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
// launcher icon // launcher icon
PlasmaCore.IconItem { Kirigami.Icon {
Layout.preferredWidth: units.iconSizes.medium Layout.preferredWidth: units.iconSizes.medium
Layout.preferredHeight: units.iconSizes.medium Layout.preferredHeight: units.iconSizes.medium
source: icon source: icon

@ -385,7 +385,7 @@ Loader {
border.color: dialog.borderColor border.color: dialog.borderColor
} }
PlasmaExtras.ScrollArea { PlasmaComponents.ScrollView {
id: scrollArea id: scrollArea
anchors.fill: parent anchors.fill: parent

Loading…
Cancel
Save