mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Toast: proper scaling + brought back assignation to WlrLayer.Overlay so its above all.
This commit is contained in:
+7
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user