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