Toast: proper scaling + brought back assignation to WlrLayer.Overlay so its above all.
This commit is contained in:
parent
87067f7062
commit
57d912efc8
3 changed files with 18 additions and 10 deletions
|
|
@ -2,8 +2,10 @@ import QtQuick
|
|||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Effects
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
import qs.Services
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -14,7 +16,8 @@ Item {
|
|||
property int duration: 5000 // Auto-hide after 5 seconds, 0 = no auto-hide
|
||||
property bool persistent: false // If true, requires manual dismiss
|
||||
|
||||
property real scaling: 1.0 // Will be set by parent
|
||||
required property ShellScreen screen
|
||||
property real scaling: 1.0
|
||||
|
||||
// Animation properties
|
||||
property real targetY: 0
|
||||
|
|
@ -31,6 +34,9 @@ Item {
|
|||
z: 1000 // High z-index to appear above everything
|
||||
|
||||
function show() {
|
||||
// NToast updates its scaling when showing.
|
||||
scaling = ScalingService.getScreenScale(screen)
|
||||
|
||||
visible = true
|
||||
showAnimation.start()
|
||||
if (duration > 0 && !persistent) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue