mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 10:14:45 +00:00
components: Use consistent documentation
This commit is contained in:
parent
4df3e9703e
commit
c3835b9a3b
9 changed files with 30 additions and 36 deletions
|
|
@ -1,8 +1,5 @@
|
||||||
/*
|
// SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
||||||
* SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
/*
|
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
||||||
* SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtFeedback 5.0
|
import QtFeedback 5.0
|
||||||
|
|
@ -10,6 +8,10 @@ import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
||||||
|
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Singleton object for triggering vibrations in the shell.
|
||||||
|
*/
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
/*
|
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
||||||
* SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtFeedback 5.0
|
import QtFeedback 5.0
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
/*
|
// SPDX-FileCopyrightText: 2022 Yari Polla <skilvingr@gmail.com>
|
||||||
* SPDX-FileCopyrightText: 2022 Yari Polla <skilvingr@gmail.com>
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: LGPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
|
|
||||||
|
|
@ -12,6 +9,7 @@ import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
/**
|
/**
|
||||||
* This is a simple marquee (flowing) label based on PlasmaComponents Label.
|
* This is a simple marquee (flowing) label based on PlasmaComponents Label.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PlasmaComponents.Label {
|
PlasmaComponents.Label {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
/*
|
// SPDX-FileCopyrightText: 2015 Marco Martin <notmart@gmail.com>
|
||||||
* SPDX-FileCopyrightText: 2015 Marco Martin <notmart@gmail.com>
|
// SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
||||||
* SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: LGPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
|
|
@ -19,6 +16,7 @@ import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
||||||
/**
|
/**
|
||||||
* Component that animates an app opening from a location.
|
* Component that animates an app opening from a location.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
MouseArea { // use mousearea to ensure clicks don't go behind
|
MouseArea { // use mousearea to ensure clicks don't go behind
|
||||||
id: root
|
id: root
|
||||||
visible: false
|
visible: false
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
/*
|
// SPDX-FileCopyrightText: 2013 Canonical Ltd. <legal@canonical.com>
|
||||||
* SPDX-FileCopyrightText: 2013 Canonical Ltd. <legal@canonical.com>
|
// SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
||||||
* SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: GPL-3.0-only
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Component that is able to measure velocity based on position change events.
|
||||||
|
*/
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: MobileShell.ExtendedAbstractButton {
|
contentItem: MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
|
|
||||||
// grow/shrink animation
|
// grow/shrink animation
|
||||||
|
|
@ -187,7 +187,7 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
|
|
||||||
// darken effect when hovered/pressed
|
// darken effect when hovered/pressed
|
||||||
layer {
|
layer {
|
||||||
enabled: mouseArea.pressed || mouseArea.hovered
|
enabled: mouseArea.pressed || mouseArea.containsMouse
|
||||||
effect: ColorOverlay {
|
effect: ColorOverlay {
|
||||||
color: Qt.rgba(0, 0, 0, 0.3)
|
color: Qt.rgba(0, 0, 0, 0.3)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import org.kde.kquickcontrolsaddons 2.0
|
||||||
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager
|
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager
|
||||||
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
||||||
|
|
||||||
MobileShell.ExtendedAbstractButton {
|
MouseArea {
|
||||||
id: delegate
|
id: delegate
|
||||||
width: GridView.view.cellWidth
|
width: GridView.view.cellWidth
|
||||||
height: GridView.view.cellHeight
|
height: GridView.view.cellHeight
|
||||||
|
|
@ -129,7 +129,7 @@ MobileShell.ExtendedAbstractButton {
|
||||||
|
|
||||||
// darken effect when hovered/pressed
|
// darken effect when hovered/pressed
|
||||||
layer {
|
layer {
|
||||||
enabled: delegate.pressed || delegate.hovered
|
enabled: delegate.pressed || delegate.containsMouse
|
||||||
effect: ColorOverlay {
|
effect: ColorOverlay {
|
||||||
color: Qt.rgba(0, 0, 0, 0.3)
|
color: Qt.rgba(0, 0, 0, 0.3)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import org.kde.kquickcontrolsaddons 2.0
|
||||||
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager
|
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager
|
||||||
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
import org.kde.plasma.private.mobileshell 1.0 as MobileShell
|
||||||
|
|
||||||
MobileShell.ExtendedAbstractButton {
|
MouseArea {
|
||||||
id: delegate
|
id: delegate
|
||||||
property int reservedSpaceForLabel
|
property int reservedSpaceForLabel
|
||||||
property alias iconItem: icon
|
property alias iconItem: icon
|
||||||
|
|
@ -45,7 +45,7 @@ MobileShell.ExtendedAbstractButton {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.hovered ? Qt.rgba(255, 255, 255, 0.05) : "transparent")
|
color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent")
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation { duration: PlasmaCore.Units.shortDuration }
|
ColorAnimation { duration: PlasmaCore.Units.shortDuration }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue