introduce LatteComponents to be consumed globally

--this is needed in order for indicators plugins in
the future to provide the same UI elements with the
rest of LatteView Settings windows
pull/5/head
Michail Vourlakos 6 years ago
parent 706ba661a2
commit ca80a7932f

@ -66,6 +66,7 @@ include(WriteBasicConfigVersionFile)
include(Definitions.cmake)
add_subdirectory(declarativeimports)
add_subdirectory(liblatte2)
add_subdirectory(kwin_scripts)
add_subdirectory(app)

@ -21,6 +21,7 @@ import QtQuick 2.1
import QtGraphicalEffects 1.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
Loader{
id: appletNumberLoader
@ -94,7 +95,7 @@ Loader{
}
}
Latte.BadgeText {
LatteComponents.BadgeText {
id: appletNumber
anchors.centerIn: parent

@ -25,6 +25,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
import "../applet" as Applet
@ -56,7 +57,7 @@ Item{
readonly property real appliedOpacity: imageTiler.opacity
readonly property real maxOpacity: root.inConfigureAppletsMode ? 1 : plasmoid.configuration.editBackgroundOpacity
Latte.ExternalShadow{
LatteComponents.ExternalShadow{
id: editExternalShadow
width: root.isHorizontal ? imageTiler.width : root.editShadow
height: root.isHorizontal ? root.editShadow : imageTiler.height

@ -0,0 +1,2 @@
install(DIRECTORY components/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte/components)

@ -0,0 +1,5 @@
module org.kde.latte.components
BadgeText 1.0 BadgeText.qml
ExternalShadow 1.0 ExternalShadow.qml
GlowPoint 1.0 GlowPoint.qml

@ -27,6 +27,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
import "../code/ColorizerTools.js" as ColorizerTools
@ -86,7 +87,7 @@ Item{
id: flowItem
flow: plasmoid.formFactor === PlasmaCore.Types.Vertical ? Flow.TopToBottom : Flow.LeftToRight
Latte.GlowPoint{
LatteComponents.GlowPoint{
id:firstPoint
opacity: {
if (options.isTask) {
@ -210,7 +211,7 @@ Item{
height: secondPoint.visible ? 0.5*indicatorRoot.size : 0
}
Latte.GlowPoint{
LatteComponents.GlowPoint{
id:secondPoint
width: visible ? indicatorRoot.size : 0
height: width

@ -1,9 +1,6 @@
module org.kde.latte
plugin latte2plugin
GlowPoint 0.2 GlowPoint.qml
BadgeText 0.2 BadgeText.qml
ExternalShadow 0.2 ExternalShadow.qml
LatteIndicator 0.2 indicators/LatteIndicator.qml
PlasmaIndicator 0.2 indicators/PlasmaIndicator.qml
UnityIndicator 0.2 indicators/UnityIndicator.qml

@ -23,6 +23,7 @@ import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
Item {
id: background
@ -55,7 +56,7 @@ Item {
}
]
Latte.BadgeText {
LatteComponents.BadgeText {
id: progressCircle
anchors.centerIn: parent
border.color: root.minimizedDotColor

@ -21,6 +21,7 @@ import QtQuick 2.7
import QtGraphicalEffects 1.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
Loader{
id: shorcutBadge
@ -55,7 +56,7 @@ Loader{
}
}
Latte.BadgeText {
LatteComponents.BadgeText {
id: taskNumber
anchors.centerIn: parent
minimumWidth: 0.4 * (wrapper.mScale * root.iconSize)

@ -23,8 +23,10 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
Latte.ExternalShadow{
LatteComponents.ExternalShadow{
id: editExternalShadow
states: [

Loading…
Cancel
Save