mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-23 10:05:10 -07:00
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 26 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker / Servatrice (arm) (push) Waiting to run
Build Docker / Servatrice (x86) (push) Waiting to run
Build Docker / Publish multi-platform Servatrice image (push) Blocked by required conditions
* [App] Add onboarding wizard Took 10 minutes Took 3 minutes Took 7 minutes Took 9 minutes Took 2 minutes Took 1 minute Took 7 minutes * Adjust CI Took 14 minutes Took 56 seconds Took 2 seconds Took 3 seconds * Adjust CI again Took 14 minutes Took 2 seconds * Comments and fixes Took 9 seconds Took 1 minute * Rebase. Took 5 minutes Took 50 seconds Took 15 seconds * Comments. Took 7 minutes * CI lol Took 3 minutes * CI again lol Took 4 minutes * Drop some settings, add some new ones. Took 19 minutes * Resize when expanding section Took 4 minutes Took 3 minutes Took 7 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
62 lines
2.8 KiB
QML
62 lines
2.8 KiB
QML
import QtQuick
|
||
|
||
Item {
|
||
id: root
|
||
|
||
ShaderEffect {
|
||
id: effectA
|
||
anchors.fill: parent
|
||
opacity: bannerConfig.frontIsA ? 1.0 : 0.0
|
||
Behavior on opacity { NumberAnimation { duration: 450; easing.type: Easing.InOutCubic } }
|
||
property real iTime: bannerConfig.time
|
||
property real uAspect: bannerConfig.aspect
|
||
property real uMode: bannerConfig.modeA
|
||
property real uSpeed: bannerConfig.speedA
|
||
property real uSeed: bannerConfig.seedA
|
||
property vector4d uColorA: Qt.vector4d(bannerConfig.colorA.r, bannerConfig.colorA.g, bannerConfig.colorA.b, 1.0)
|
||
property vector4d uColorB: Qt.vector4d(bannerConfig.colorB.r, bannerConfig.colorB.g, bannerConfig.colorB.b, 1.0)
|
||
property vector4d uAccent: Qt.vector4d(bannerConfig.accent.r, bannerConfig.accent.g, bannerConfig.accent.b, 1.0)
|
||
property real uLogoGlow: bannerConfig.logoGlow
|
||
fragmentShader: "qrc:/onboarding/shaders/brand_banner.frag.qsb"
|
||
}
|
||
|
||
ShaderEffect {
|
||
id: effectB
|
||
anchors.fill: parent
|
||
opacity: bannerConfig.frontIsA ? 0.0 : 1.0
|
||
Behavior on opacity { NumberAnimation { duration: 450; easing.type: Easing.InOutCubic } }
|
||
property real iTime: bannerConfig.time
|
||
property real uAspect: bannerConfig.aspect
|
||
property real uMode: bannerConfig.modeB
|
||
property real uSpeed: bannerConfig.speedB
|
||
property real uSeed: bannerConfig.seedB
|
||
property vector4d uColorA: Qt.vector4d(bannerConfig.colorA.r, bannerConfig.colorA.g, bannerConfig.colorA.b, 1.0)
|
||
property vector4d uColorB: Qt.vector4d(bannerConfig.colorB.r, bannerConfig.colorB.g, bannerConfig.colorB.b, 1.0)
|
||
property vector4d uAccent: Qt.vector4d(bannerConfig.accent.r, bannerConfig.accent.g, bannerConfig.accent.b, 1.0)
|
||
property real uLogoGlow: bannerConfig.logoGlow
|
||
fragmentShader: "qrc:/onboarding/shaders/brand_banner.frag.qsb"
|
||
}
|
||
|
||
// The hero logo itself — breathes cleanly over a 0.5–1.0 opacity range
|
||
Image {
|
||
id: logo
|
||
anchors.centerIn: parent
|
||
visible: bannerConfig.logoVisible
|
||
source: "qrc:/resources/cockatrice-logo-white.svg"
|
||
width: root.height * 0.6
|
||
height: width * (sourceSize.height > 0 ? sourceSize.height / Math.max(sourceSize.width, 1) : 1)
|
||
fillMode: Image.PreserveAspectFit
|
||
smooth: true
|
||
opacity: 0.5 + 0.5 * bannerConfig.logoGlow
|
||
sourceSize: Qt.size(256, 256)
|
||
|
||
Behavior on opacity { NumberAnimation { duration: 300; easing.type: Easing.InOutSine } }
|
||
|
||
transform: Scale {
|
||
origin.x: logo.width / 2
|
||
origin.y: logo.height / 2
|
||
xScale: 0.94 + 0.06 * bannerConfig.logoGlow
|
||
yScale: 0.94 + 0.06 * bannerConfig.logoGlow
|
||
}
|
||
}
|
||
}
|