Port: Ported to qt6 part 2. Removed qt5-graphicaleffects. Replaced gaussian blur effect and removed drop shadow effect.

This commit is contained in:
Keyitdev
2024-09-11 16:08:29 +02:00
parent 48ea0a7927
commit 3ff1700f92
6 changed files with 14 additions and 49 deletions
-10
View File
@@ -6,7 +6,6 @@
import QtQuick 2.15 import QtQuick 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import Qt5Compat.GraphicalEffects
Column { Column {
id: inputContainer id: inputContainer
@@ -153,15 +152,6 @@ Column {
radius: config.RoundCorners / 2 radius: config.RoundCorners / 2
color: root.palette.window color: root.palette.window
layer.enabled: true layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 10 * config.InterfaceShadowSize
radius: 20 * config.InterfaceShadowSize
samples: 41 * config.InterfaceShadowSize
cached: true
color: Qt.hsla(0,0,0,config.InterfaceShadowOpacity)
}
} }
enter: Transition { enter: Transition {
-10
View File
@@ -5,7 +5,6 @@
import QtQuick 2.15 import QtQuick 2.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import Qt5Compat.GraphicalEffects
Item { Item {
id: sessionButton id: sessionButton
@@ -109,15 +108,6 @@ Item {
radius: config.RoundCorners / 2 radius: config.RoundCorners / 2
color: config.BackgroundColor color: config.BackgroundColor
layer.enabled: true layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 0
radius: 20 * config.InterfaceShadowSize
samples: 41 * config.InterfaceShadowSize
cached: true
color: Qt.hsla(0,0,0,config.InterfaceShadowOpacity)
}
} }
enter: Transition { enter: Transition {
-10
View File
@@ -5,7 +5,6 @@
import QtQuick 2.15 import QtQuick 2.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import Qt5Compat.GraphicalEffects
Item { Item {
id: usernameField id: usernameField
@@ -89,15 +88,6 @@ Item {
radius: 10 radius: 10
color: root.palette.window color: root.palette.window
layer.enabled: true layer.enabled: true
layer.effect: DropShadow {
transparentBorder: true
horizontalOffset: 0
verticalOffset: 0
radius: 100
samples: 201
cached: true
color: "#88000000"
}
} }
enter: Transition { enter: Transition {
+7 -5
View File
@@ -6,7 +6,8 @@
import QtQuick 2.15 import QtQuick 2.15
import QtQuick.Layouts 1.15 import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15 import QtQuick.Controls 2.15
import Qt5Compat.GraphicalEffects import QtQuick.Effects
import "Components" import "Components"
Pane { Pane {
@@ -240,15 +241,16 @@ Pane {
visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false
} }
GaussianBlur { MultiEffect {
id: blur id: blur
height: parent.height height: parent.height
width: config.FullBlur == "true" ? parent.width : form.width width: config.FullBlur == "true" ? parent.width : form.width
source: config.FullBlur == "true" ? backgroundImage : blurMask source: config.FullBlur == "true" ? backgroundImage : blurMask
radius: config.BlurRadius blurEnabled: true
samples: config.BlurRadius * 2 + 1 autoPaddingEnabled: false
cached: true blur: config.Blur == "" ? 2.0 : config.Blur
blurMax: config.BlurMax == "" ? 48 : config.BlurMax
anchors.centerIn: config.FullBlur == "true" ? parent : form anchors.centerIn: config.FullBlur == "true" ? parent : form
visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false
} }
+1 -3
View File
@@ -18,10 +18,8 @@ Here are some examples:
### Dependencies ### Dependencies
```sh ```sh
qt6-5compat qt6-declarative qt6-svg sddm qt6-declarative qt6-svg sddm
``` ```
> qt6-declarative replaces qt6-quickcontrols2
> https://archlinux.org/packages/extra/x86_64/qt6-declarative/
### Install ### Install
+6 -11
View File
@@ -16,14 +16,15 @@ ScreenHeight="1080"
## [Blur Settings] ## [Blur Settings]
## https://doc.qt.io/qt-6/qml-qtquick-effects-multieffect.html
FullBlur="false" FullBlur="false"
## If you use FullBlur I recommend setting BlurMax to 64 and Blur to 1.0.
PartialBlur="true" PartialBlur="true"
## Enable or disable the blur effect; if HaveFormBackground is set to true then PartialBlur will trigger the BackgroundColor of the form element to be partially transparent and blend with the blur. ## Enable or disable the blur effect; if HaveFormBackground is set to true then PartialBlur will trigger the BackgroundColor of the form element to be partially transparent and blend with the blur.
BlurMax=""
BlurRadius="80" ## Default: 48. Meaningful range of this value is from 2 (subtle blur) to 64 (high blur). Higher values still work (up to 144 when Blur is set to 1.0), it is heavily connected with Blur.
## Set the strength of the blur effect. Anything above 100 is pretty strong and might slow down the rendering time. 0 is like setting false for any blur. Blur=""
## Default: 2.0. Meaningful range of this value is from 0.0 to 3.0. It is heavily connected with Blur.
## [Design Customizations] ## [Design Customizations]
@@ -62,12 +63,6 @@ IconColor="#ffffff"
OverrideLoginButtonTextColor="" OverrideLoginButtonTextColor=""
## The text of the login button may become difficult to read depending on your color choices. Use this option to set it independently for legibility. ## The text of the login button may become difficult to read depending on your color choices. Use this option to set it independently for legibility.
InterfaceShadowSize="6"
## Integer used as multiplier. Size of the shadow behind the user and session selection background. Decrease or increase if it looks bad on your background. Initial render can be slow no values above 5-7.
InterfaceShadowOpacity="0.6"
## Double between 0 and 1. Alpha channel of the shadow behind the user and session selection background. Decrease or increase if it looks bad on your background.
RoundCorners="20" RoundCorners="20"
## Integer in pixels. Radius of the input fields and the login button. Empty for square. Can cause bad antialiasing of the fields. ## Integer in pixels. Radius of the input fields and the login button. Empty for square. Can cause bad antialiasing of the fields.