mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-03 20:58:25 +03:00
KSvg stuff.
This commit is contained in:
parent
1532c846fe
commit
e4c02456c8
@ -11,6 +11,7 @@ import Qt5Compat.GraphicalEffects
|
||||
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||
import org.kde.kquickcontrolsaddons 2.0
|
||||
@ -34,11 +35,11 @@ BackgroundProperties{
|
||||
|
||||
isShown: (solidBackground.opacity > 0) || (overlayedBackground.backgroundOpacity > 0)
|
||||
|
||||
hasAllBorders: solidBackground.enabledBorders === PlasmaCore.FrameSvg.AllBorders
|
||||
hasLeftBorder: hasAllBorders || ((solidBackground.enabledBorders & PlasmaCore.FrameSvg.LeftBorder) > 0)
|
||||
hasRightBorder: hasAllBorders || ((solidBackground.enabledBorders & PlasmaCore.FrameSvg.RightBorder) > 0)
|
||||
hasTopBorder: hasAllBorders || ((solidBackground.enabledBorders & PlasmaCore.FrameSvg.TopBorder) > 0)
|
||||
hasBottomBorder: hasAllBorders || ((solidBackground.enabledBorders & PlasmaCore.FrameSvg.BottomBorder) > 0)
|
||||
hasAllBorders: solidBackground.enabledBorders === KSvg.FrameSvg.AllBorders
|
||||
hasLeftBorder: hasAllBorders || ((solidBackground.enabledBorders & KSvg.FrameSvg.LeftBorder) > 0)
|
||||
hasRightBorder: hasAllBorders || ((solidBackground.enabledBorders & KSvg.FrameSvg.RightBorder) > 0)
|
||||
hasTopBorder: hasAllBorders || ((solidBackground.enabledBorders & KSvg.FrameSvg.TopBorder) > 0)
|
||||
hasBottomBorder: hasAllBorders || ((solidBackground.enabledBorders & KSvg.FrameSvg.BottomBorder) > 0)
|
||||
|
||||
shadows.left: hasLeftBorder && root.behaveAsDockWithMask ? (customShadowIsEnabled ? customShadow : shadowsSvgItem.margins.left) : 0
|
||||
shadows.right: hasRightBorder && root.behaveAsDockWithMask ? (customShadowIsEnabled ? customShadow : shadowsSvgItem.margins.right) : 0
|
||||
@ -322,11 +323,11 @@ BackgroundProperties{
|
||||
//! Layer 1: Shadows that are drawn around the background but always inside the View window (these are internal drawn shadows).
|
||||
//! When the container has chosen external shadows (these are shadows that are drawn out of the View window from the compositor)
|
||||
//! in such case the internal drawn shadows are NOT drawn at all.
|
||||
PlasmaCore.FrameSvgItem{
|
||||
KSvg.FrameSvgItem{
|
||||
id: shadowsSvgItem
|
||||
width: root.isVertical ? background.thickness + totals.shadowsThickness : totals.visualLength
|
||||
height: root.isVertical ? totals.visualLength : background.thickness + totals.shadowsThickness
|
||||
enabledBorders: latteView && latteView.effects ? latteView.effects.enabledBorders : PlasmaCore.FrameSvg.NoBorder
|
||||
enabledBorders: latteView && latteView.effects ? latteView.effects.enabledBorders : KSvg.FrameSvg.NoBorder
|
||||
imagePath: "widgets/panel-background"
|
||||
prefix: "shadow"
|
||||
opacity: hideShadow || !root.useThemePanel || (root.forceTransparentPanel && !root.forcePanelForBusyBackground) ? 0 : 1
|
||||
@ -382,7 +383,7 @@ BackgroundProperties{
|
||||
//! the original background when to special settings and options exist from the user. It is also
|
||||
//! doing one very important job which is to calculate the Effects Rectangle which is used from
|
||||
//! the compositor to provide blurriness and from Mask calculations to provide the View Local Geometry
|
||||
PlasmaCore.FrameSvgItem{
|
||||
KSvg.FrameSvgItem{
|
||||
id: solidBackground
|
||||
anchors.leftMargin: shadows.left
|
||||
anchors.rightMargin: shadows.right
|
||||
@ -504,7 +505,7 @@ BackgroundProperties{
|
||||
adjustPrefix();
|
||||
}
|
||||
|
||||
enabledBorders: latteView && latteView.effects ? latteView.effects.enabledBorders : PlasmaCore.FrameSvg.NoBorder
|
||||
enabledBorders: latteView && latteView.effects ? latteView.effects.enabledBorders : KSvg.FrameSvg.NoBorder
|
||||
|
||||
Behavior on opacity{
|
||||
enabled: LatteCore.WindowSystem.compositingActive && !solidBackground.paintInstantly
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Templates 2.0 as T
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import "private" as Private
|
||||
|
||||
@ -29,13 +30,13 @@ T.Slider {
|
||||
readonly property bool minimumInternalValueIsSet: (minimumInternalValue!==from && minimumInternalValue !== -10000)
|
||||
property int minimumInternalValue: -10000
|
||||
|
||||
PlasmaCore.Svg {
|
||||
KSvg.Svg {
|
||||
id: grooveSvg
|
||||
imagePath: "widgets/slider"
|
||||
colorGroup: PlasmaCore.ColorScope.colorGroup
|
||||
}
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
KSvg.FrameSvgItem {
|
||||
id: minimumValueGroove
|
||||
imagePath: "widgets/slider"
|
||||
prefix: "groove-highlight"
|
||||
@ -81,7 +82,7 @@ T.Slider {
|
||||
shadowElement: parent.horizontal ? "horizontal-slider-shadow" : "vertical-slider-shadow"
|
||||
state: control.activeFocus ? "focus" : (control.hovered ? "hover" : "shadow")
|
||||
}
|
||||
PlasmaCore.SvgItem {
|
||||
KSvg.SvgItem {
|
||||
id: firstHandle
|
||||
anchors.fill: parent
|
||||
svg: grooveSvg
|
||||
@ -89,7 +90,7 @@ T.Slider {
|
||||
}
|
||||
}
|
||||
|
||||
background: PlasmaCore.FrameSvgItem {
|
||||
background: KSvg.FrameSvgItem {
|
||||
imagePath: "widgets/slider"
|
||||
prefix: "groove"
|
||||
readonly property bool horizontal: control.orientation === Qt.Horizontal
|
||||
@ -100,7 +101,7 @@ T.Slider {
|
||||
anchors.centerIn: parent
|
||||
scale: horizontal && control.mirrored ? -1 : 1
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
KSvg.FrameSvgItem {
|
||||
id: grooveHighlight
|
||||
imagePath: "widgets/slider"
|
||||
prefix: "groove-highlight"
|
||||
|
@ -6,6 +6,7 @@
|
||||
import QtQuick 2.6
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Templates 2.2 as T
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
T.ToolTip {
|
||||
@ -31,8 +32,8 @@ T.ToolTip {
|
||||
color: PlasmaCore.ColorScope.textColor
|
||||
}
|
||||
|
||||
background: PlasmaCore.FrameSvgItem {
|
||||
background: KSvg.FrameSvgItem {
|
||||
imagePath: "widgets/background"
|
||||
enabledBorders: PlasmaCore.FrameSvg.AllBorders
|
||||
enabledBorders: KSvg.FrameSvg.AllBorders
|
||||
}
|
||||
}
|
||||
|
@ -5,11 +5,12 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.1
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
//for Settings
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.kirigami 2.2 as Kirigami
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
KSvg.FrameSvgItem {
|
||||
id: background
|
||||
|
||||
property bool separatorVisible: false
|
||||
@ -18,7 +19,7 @@ PlasmaCore.FrameSvgItem {
|
||||
|
||||
visible: control.ListView.view ? control.ListView.view.highlight === null : true
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
KSvg.FrameSvgItem {
|
||||
imagePath: "widgets/listitem"
|
||||
visible: !Kirigami.Settings.isMobile
|
||||
prefix: "hover"
|
||||
@ -27,8 +28,8 @@ PlasmaCore.FrameSvgItem {
|
||||
Behavior on opacity { NumberAnimation { duration: units.longDuration } }
|
||||
}
|
||||
|
||||
PlasmaCore.SvgItem {
|
||||
svg: PlasmaCore.Svg {imagePath: "widgets/listitem"}
|
||||
KSvg.SvgItem {
|
||||
svg: KSvg.Svg {imagePath: "widgets/listitem"}
|
||||
elementId: "separator"
|
||||
anchors {
|
||||
left: parent.left
|
||||
|
@ -5,10 +5,11 @@
|
||||
|
||||
import QtQuick 2.0
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
KSvg.FrameSvgItem {
|
||||
id: frame
|
||||
imagePath: "widgets/tabbar"
|
||||
opacity: indicator.isActive ? 1 : 0
|
||||
|
@ -5,10 +5,11 @@
|
||||
|
||||
import QtQuick 2.0
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
KSvg.FrameSvgItem {
|
||||
id: frame
|
||||
property string basePrefix: "normal"
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
import QtQuick 2.0
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
import org.kde.latte.components 1.0 as LatteComponents
|
||||
@ -84,7 +85,7 @@ LatteComponents.IndicatorItem {
|
||||
width: parent.width * (Math.min(indicator.progress, 100) / 100)
|
||||
clip: true
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
KSvg.FrameSvgItem {
|
||||
id: progressFrame
|
||||
width: background.width
|
||||
height: background.height
|
||||
|
@ -5,9 +5,11 @@
|
||||
|
||||
import QtQuick 2.0
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
PlasmaCore.FrameSvgItem { id: frame
|
||||
KSvg.FrameSvgItem {
|
||||
id: frame
|
||||
property string basePrefix: "normal"
|
||||
|
||||
imagePath: "widgets/tabbar"
|
||||
|
@ -9,6 +9,7 @@ import QtQuick.Layouts
|
||||
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
@ -834,7 +835,7 @@ PlasmoidItem {
|
||||
|
||||
|
||||
/// the current theme's panel
|
||||
PlasmaCore.FrameSvgItem{
|
||||
KSvg.FrameSvgItem{
|
||||
id: shadowsSvgItem
|
||||
|
||||
anchors.bottom: (root.location === PlasmaCore.Types.BottomEdge) ? belower.bottom : undefined
|
||||
@ -864,7 +865,7 @@ PlasmoidItem {
|
||||
}
|
||||
|
||||
|
||||
PlasmaCore.FrameSvgItem{
|
||||
KSvg.FrameSvgItem{
|
||||
anchors.margins: belower.width-1
|
||||
anchors.fill:parent
|
||||
imagePath: plasmoid.configuration.transparentPanel ? "translucent/widgets/panel-background" :
|
||||
|
@ -8,6 +8,7 @@ import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.0
|
||||
import Qt5Compat.GraphicalEffects
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||
import org.kde.kquickcontrolsaddons 2.0
|
||||
@ -103,7 +104,7 @@ PlasmaCore.ToolTipArea {
|
||||
fullRepresentation.anchors.fill = fullRepresentation.parent;
|
||||
}
|
||||
|
||||
/* PlasmaCore.FrameSvgItem {
|
||||
/* KSvg.FrameSvgItem {
|
||||
id: expandedItem
|
||||
anchors.fill: parent
|
||||
imagePath: "widgets/tabbar"
|
||||
|
@ -11,6 +11,7 @@ import QtQuick.Layouts 1.3
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
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 PlasmaComponents3
|
||||
@ -119,7 +120,7 @@ Loader {
|
||||
userScaleHeight = universalSettings.screenHeightScale(latteView.positioner.currentScreenName);
|
||||
}
|
||||
|
||||
PlasmaCore.FrameSvgItem{
|
||||
KSvg.FrameSvgItem{
|
||||
id: backgroundFrameSvgItem
|
||||
anchors.fill: parent
|
||||
imagePath: "dialogs/background"
|
||||
|
@ -10,6 +10,7 @@ import QtQuick.Layouts 1.3
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import QtQuick.Window 2.2
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
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
|
||||
@ -36,7 +37,7 @@ Loader {
|
||||
|
||||
property bool panelIsVertical: plasmoid.formFactor === PlasmaCore.Types.Vertical
|
||||
|
||||
PlasmaCore.FrameSvgItem{
|
||||
KSvg.FrameSvgItem{
|
||||
id: backgroundFrameSvgItem
|
||||
anchors.fill: parent
|
||||
imagePath: "dialogs/background"
|
||||
|
@ -7,9 +7,10 @@
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
KSvg.FrameSvgItem {
|
||||
id: root
|
||||
|
||||
imagePath: containment && containment.backgroundHints === PlasmaCore.Types.NoBackground ? "" : "widgets/panel-background"
|
||||
|
@ -8,6 +8,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.5 as QQC2
|
||||
|
||||
import org.kde.ksvg 1.0 as KSvg
|
||||
import org.kde.plasma.components 3.0 as PC2 // for DialogStatus, ModelCOntextMenu, and Highlight
|
||||
import org.kde.plasma.components 3.0 as PC3
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
@ -110,7 +111,7 @@ PC3.Page {
|
||||
onTriggered: addCurrentApplet()
|
||||
}
|
||||
|
||||
PlasmaCore.FrameSvgItem{
|
||||
KSvg.FrameSvgItem{
|
||||
id: backgroundFrameSvgItem
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: -headerMargin
|
||||
|
Loading…
x
Reference in New Issue
Block a user