mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
homescreens/halcyon: Port from QtGraphicalEffects to MultiEffect
This commit is contained in:
parent
12b9f1df9f
commit
380060b8ec
5 changed files with 37 additions and 64 deletions
|
|
@ -4,7 +4,6 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Qt5Compat.GraphicalEffects
|
|
||||||
|
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.plasma5support 2.0 as P5Support
|
import org.kde.plasma.plasma5support 2.0 as P5Support
|
||||||
|
|
@ -28,15 +27,12 @@ ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
|
||||||
font.weight: Font.Bold // this font weight may switch to regular on distros that don't have a light variant
|
font.weight: Font.Bold // this font weight may switch to regular on distros that don't have a light variant
|
||||||
font.pointSize: 28
|
font.pointSize: 28
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MobileShell.TextDropShadow {}
|
||||||
verticalOffset: 1
|
|
||||||
radius: 4
|
|
||||||
samples: 6
|
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|
@ -50,13 +46,9 @@ ColumnLayout {
|
||||||
styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" // no outline, doesn't matter
|
styleColor: softwareRendering ? ColorScope.backgroundColor : "transparent" // no outline, doesn't matter
|
||||||
|
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MobileShell.TextDropShadow {}
|
||||||
verticalOffset: 1
|
|
||||||
radius: 4
|
|
||||||
samples: 6
|
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
P5Support.DataSource {
|
P5Support.DataSource {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls as Controls
|
import QtQuick.Controls as Controls
|
||||||
import Qt5Compat.GraphicalEffects
|
import QtQuick.Effects
|
||||||
|
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
|
|
@ -235,12 +235,7 @@ Item {
|
||||||
color: "white"
|
color: "white"
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MobileShell.TextDropShadow {}
|
||||||
verticalOffset: 1
|
|
||||||
radius: 4
|
|
||||||
samples: 6
|
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
|
|
@ -254,11 +249,11 @@ Item {
|
||||||
visible: delegate.isFolder
|
visible: delegate.isFolder
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MultiEffect {
|
||||||
verticalOffset: 1
|
shadowEnabled: true
|
||||||
radius: 4
|
shadowVerticalOffset: 1
|
||||||
samples: 6
|
blurMax: 8
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
shadowOpacity: 0.7
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -302,11 +297,11 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MultiEffect {
|
||||||
verticalOffset: 1
|
shadowEnabled: true
|
||||||
radius: 4
|
shadowVerticalOffset: 1
|
||||||
samples: 6
|
blurMax: 16
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
shadowOpacity: 0.5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -348,11 +343,11 @@ Item {
|
||||||
source: modelData.icon
|
source: modelData.icon
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MultiEffect {
|
||||||
verticalOffset: 1
|
shadowEnabled: true
|
||||||
radius: 4
|
shadowVerticalOffset: 1
|
||||||
samples: 3
|
blurMax: 16
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
shadowOpacity: 0.6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import QtQuick
|
||||||
import QtQuick.Controls as QQC2
|
import QtQuick.Controls as QQC2
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQml.Models
|
import QtQml.Models
|
||||||
import Qt5Compat.GraphicalEffects
|
|
||||||
|
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.extras as PlasmaExtras
|
import org.kde.plasma.extras as PlasmaExtras
|
||||||
|
|
@ -272,13 +271,7 @@ MobileShell.GridView {
|
||||||
anchors.rightMargin: root.rightMargin
|
anchors.rightMargin: root.rightMargin
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MobileShell.TextDropShadow {}
|
||||||
verticalOffset: 1
|
|
||||||
radius: 4
|
|
||||||
samples: 6
|
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
|
||||||
cached: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls as QQC2
|
import QtQuick.Controls as QQC2
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Effects
|
||||||
import QtQml.Models
|
import QtQml.Models
|
||||||
import Qt5Compat.GraphicalEffects
|
|
||||||
|
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.extras as PlasmaExtras
|
import org.kde.plasma.extras as PlasmaExtras
|
||||||
|
|
@ -63,13 +63,9 @@ MobileShell.GridView {
|
||||||
|
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
font.pointSize: 18
|
font.pointSize: 18
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MobileShell.TextDropShadow {}
|
||||||
verticalOffset: 1
|
|
||||||
radius: 4
|
|
||||||
samples: 6
|
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
|
||||||
}
|
|
||||||
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (text.includes('\n')) {
|
if (text.includes('\n')) {
|
||||||
|
|
@ -100,13 +96,9 @@ MobileShell.GridView {
|
||||||
|
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
font.pointSize: 18
|
font.pointSize: 18
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MobileShell.TextDropShadow {}
|
||||||
verticalOffset: 1
|
|
||||||
radius: 4
|
|
||||||
samples: 6
|
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -146,11 +138,11 @@ MobileShell.GridView {
|
||||||
source: 'arrow-left'
|
source: 'arrow-left'
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: DropShadow {
|
layer.effect: MultiEffect {
|
||||||
verticalOffset: 1
|
shadowEnabled: true
|
||||||
radius: 4
|
shadowVerticalOffset: 1
|
||||||
samples: 6
|
blurMax: 8
|
||||||
color: Qt.rgba(0, 0, 0, 0.5)
|
shadowOpacity: 0.6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Effects
|
||||||
import QtQuick.Controls as Controls
|
import QtQuick.Controls as Controls
|
||||||
import Qt5Compat.GraphicalEffects
|
|
||||||
|
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
|
|
@ -163,8 +163,9 @@ MouseArea {
|
||||||
// darken effect when hovered/pressed
|
// darken effect when hovered/pressed
|
||||||
layer {
|
layer {
|
||||||
enabled: delegate.pressed
|
enabled: delegate.pressed
|
||||||
effect: ColorOverlay {
|
effect: MultiEffect {
|
||||||
color: Qt.rgba(0, 0, 0, 0.3)
|
colorization: 1.0
|
||||||
|
colorizationColor: Qt.rgba(0, 0, 0, 0.3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue