publish Abilities qml library

--add AppletRequirements in Abilities
qml library
pull/15/head
Michail Vourlakos 5 years ago
parent 6833a9b5cb
commit 810dd5a1b4

@ -51,7 +51,7 @@ Item{
readonly property bool atEdgeForcingFittsLaw: !isSeparator && !parabolicEffectMarginsEnabled && atScreenEdge
readonly property int subtrackedMargins: {
if (atEdgeForcingFittsLaw && ((firstAppletInContainer && rightSpacer) || (lastAppletInContainer && !rightSpacer ))) {
return (wrapperAlias.requires.edgeLengthMarginsDisabled ? root.lengthExtMargin + appletItem.lengthAppletIntMargin : root.lengthExtMargin);
return (wrapperAlias.edgeLengthMarginsDisabled ? root.lengthExtMargin + appletItem.lengthAppletIntMargin : root.lengthExtMargin);
}
return 0;

@ -23,59 +23,6 @@ import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
Item{
// NAME: latteSideColoringEnabled
// TYPE: bool
// USAGE: writable through actions.setProperty
// EXPLANATION: when is FALSE, Latte is not painting/colorizing this applet
// in any case. In such case the applet can use 'palette'
// in order to access the color palette used at all cases from Latte
// USE CASE: when Latte is transparent and applets colors need to be adjusted in order
// to look consistent with the underlying desktop background OR the applet
// is not using monochromatic icons but rather colorful ones.
// @since: 0.9
// NAME: latteIconOverlayEnabled
// TYPE: bool
// USAGE: writable through actions.setProperty
// EXPLANATION: when is FALSE, Latte is not overlaying any icons above
// the applet or alters the applet visual in any sense.
// That means that the applet is responsible to provide a coherent
// parabolic effect experience.
// @since: 0.9
// NAME: activeIndicatorEnabled
// TYPE: bool
// USAGE: writable through actions.setProperty
// EXPLANATION: when is TRUE, Latte can show its own Active Indicator
// when needed. For FALSE, the Latte Active Indicator is not drawn
// or used for that applet.
// @since: 0.9
// NAME: lengthMarginsEnabled
// TYPE: bool
// USAGE: writable through actions.setProperty
// EXPLANATION: when is TRUE, all length margins are drawn including
// indicator padding and applets distance. For FALSE, length margins
// are not drawn at all.
// @since: 0.9
// NAME: parabolicEffectEnabled
// TYPE: bool
// USAGE: writable through actions.setProperty
// EXPLANATION: when is TRUE, Latte can use Parabolic Effect in order
// to draw that applet. For FALSE, this applet is considered locked
// and can not be zoomed.
// @since: 0.9
// NAME: windowsTrackingEnabled
// TYPE: bool
// USAGE: writable through actions.setProperty
// EXPLANATION: when is TRUE, Latte is informed that this applet requests
// windows tracking. For FALSE, this applet is not requesting
// windows tracking.
// @since: 0.9
function setProperty(appletId, parameter, value) {
if (parameter === "latteSideColoringEnabled") {
mainCommunicator.requires.latteSideColoringEnabled = value;

@ -19,6 +19,8 @@
import QtQuick 2.7
import org.kde.latte.abilities 0.1 as Abilities
import "../../../code/AppletIdentifier.js" as AppletIdentifier
Item{
@ -50,15 +52,7 @@ Item{
//! END OF PROPERTIES
//! BEGIN OF PUBLIC PROPERTIES SET THROUGH LATTEBRIDGE.ACTIONS
readonly property Item requires: Item {
property bool latteSideColoringEnabled: true
property bool latteIconOverlayEnabled: true
property bool activeIndicatorEnabled: true
property bool lengthMarginsEnabled: true
property bool windowsTrackingEnabled: false
property bool parabolicEffectLocked: false
property bool screenEdgeMarginSupported: false
}
readonly property Item requires: Abilities.AppletRequirements{}
//! END OF PUBLIC PROPERTIES SET THROUGH LATTEBRIDGE.ACTIONS

@ -1,4 +1,5 @@
add_subdirectory(core)
install(DIRECTORY abilities/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte/abilities)
install(DIRECTORY components/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte/components)

@ -0,0 +1,74 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.0
Item{
property bool activeIndicatorEnabled: true
property bool latteSideColoringEnabled: true
property bool latteIconOverlayEnabled: true
property bool lengthMarginsEnabled: true
property bool parabolicEffectLocked: false
property bool screenEdgeMarginSupported: false
property bool windowsTrackingEnabled: false
// NAME: activeIndicatorEnabled
// EXPLANATION: when is TRUE, Latte can show its own Active Indicator
// when needed. For FALSE, the Latte Active Indicator is not drawn
// or used for that applet.
// SINCE: 0.9
// NAME: latteSideColoringEnabled
// EXPLANATION: when is FALSE, Latte is not painting/colorizing this applet
// in any case. In such case the applet can use 'palette'
// in order to access the color palette used at all cases from Latte
// USE CASE: when Latte is transparent and applets colors need to be adjusted in order
// to look consistent with the underlying desktop background OR the applet
// is not using monochromatic icons but rather colorful ones.
// SINCE: 0.9
// NAME: latteIconOverlayEnabled
// EXPLANATION: when is FALSE, Latte is not overlaying any icons above
// the applet or alters the applet visual in any sense.
// That means that the applet is responsible to provide a coherent
// parabolic effect experience.
// SINCE: 0.9
// NAME: lengthMarginsEnabled
// EXPLANATION: when is TRUE, all length margins are drawn including
// indicator padding and applets distance. For FALSE, length margins
// are not drawn at all.
// SINCE: 0.9
// NAME: parabolicEffectLocked
// EXPLANATION: For TRUE, this applet is considered locked
// and can not be zoomed.
// SINCE: 0.9
// NAME: screenEdgeMarginSupported
// EXPLANATION: For TRUE, this applet can handle the screen edge margin on
// its own and Latte should not take any special actions to help it
// work properly.
// SINCE: 0.10
// NAME: windowsTrackingEnabled
// EXPLANATION: when is TRUE, Latte is informed that applet requests
// windows tracking functionality.
// SINCE: 0.9
}

@ -0,0 +1,3 @@
module org.kde.latte.abilities
AppletRequirements 0.1 AppletRequirements.qml

@ -27,7 +27,6 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
ColumnLayout {

@ -25,7 +25,6 @@ import org.kde.plasma.plasmoid 2.0
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
ColumnLayout {

@ -21,8 +21,6 @@ import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
PlasmaCore.FrameSvgItem {
id: frame
property string basePrefix: "normal"

@ -22,8 +22,6 @@ import QtQuick 2.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
Item {
anchors.fill: parent

@ -21,7 +21,6 @@ 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
LatteComponents.IndicatorItem {

@ -21,8 +21,6 @@ import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
PlasmaCore.FrameSvgItem { id: frame
property string basePrefix: "normal"

@ -21,7 +21,6 @@ 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
LatteComponents.IndicatorItem {

Loading…
Cancel
Save