Cinnamon: Ändern von margin-from-top-edge-of-screen #notification css-Eigenschaft im Design funktioniert nicht

Erstellt am 11. März 2016  ·  3Kommentare  ·  Quelle: linuxmint/cinnamon

Ich versuche, die Position des Benachrichtigungs-Popups wie hier http://www.webupd8.org/2012/06/how-to-change-notifications-position-in.html zu ändern. Aber das Hinzufügen oder Ändern von margin-from-top-edge-of-screen hat keinerlei Auswirkungen. Im Gegensatz dazu funktioniert das Ändern von margin-from-right-edge-of-screen gut.

Ich verwende Linux Mint 17.3 mit dem Thema Linux Mint und meine #Benachrichtigungen sehen so aus:

#notification {
font-size: 8.5pt;
border-radius: 10px 10px 10px 10px;
border: 2px solid rgba(214,214,214,0.5);
background-gradient-direction: vertical;
background-gradient-start: rgba(66,66,66,0.9);
background-gradient-end: rgba(55,55,55,0.9);
padding: 8px 8px 8px 8px;
spacing-rows: 10px;
spacing-columns: 10px;
margin-from-right-edge-of-screen: 80px;  
margin-from-top-edge-of-screen: 350px;
width: 34em;
color: white;    
/* The px are a temporary fix until get_theme_node() can return raw numbers. */
opacity:255px;
mouseover-opacity:96px
}

Haben Sie eine Idee, warum das Ändern von margin-from-top-edge-of-screen keine Auswirkung hat?

Hilfreichster Kommentar

Ok, gibt es eine Möglichkeit, dieses Popup so zu verschieben, dass es nicht über die Schaltflächen zum Minimieren/Maximieren/Schließen hinausgeht? Es ist wirklich nervig, Popups in der rechten oberen Ecke des Bildschirms zu platzieren ...

//BEARBEITEN

ok, ich habe Code gefunden, der für das Platzieren von Benachrichtigungen verantwortlich ist, /usr/share/cinnamon/js/ui/messageTray.js :

_onNotificationExpanded: function() {
    let expandedY = this._notification.actor.height - this._notificationBin.height;
    // Don't animate the notification to its new position if it has shrunk:
    // there will be a very visible "gap" that breaks the illusion.

    // This isn't really working at the moment, but it was just crashing before
    // if it encountered a critical notification.  expandedY is always 0.  For now
    // just make sure it's not covering the top panel if there is one.

    let monitor = Main.layoutManager.primaryMonitor;
    let panel = Main.panelManager.getPanel(0, false); // We only want the top panel in monitor 0
    let height = 5;
    if (panel)
        height += panel.actor.get_height();
    let newY = monitor.y + height + 50; // ADDED 50 HERE SO POPUP IS NOT OVER WINDOW CONTROLS

    if (this._notificationBin.y < expandedY)
        this._notificationBin.y = expandedY;
    else if (this._notification.y != expandedY)
        this._tween(this._notificationBin, '_notificationState', State.SHOWN,
                    { y: newY,
                      time: ANIMATION_TIME,
                      transition: 'easeOutQuad'
                    });

},

Es wird nach dem Cinnamon-Update nicht mehr funktionieren, da diese Datei überschrieben wird.

Alle 3 Kommentare

Das liegt daran, dass der Rand vom oberen Bildschirmrand keine echte Eigenschaft ist. Es gibt so etwas nicht, also ignoriert Cinnamon es einfach. Der Beitrag, auf den du hinweist, ist wirklich alt. Die Dinge haben sich wahrscheinlich seitdem geändert.

Ok, gibt es eine Möglichkeit, dieses Popup so zu verschieben, dass es nicht über die Schaltflächen zum Minimieren/Maximieren/Schließen hinausgeht? Es ist wirklich nervig, Popups in der rechten oberen Ecke des Bildschirms zu platzieren ...

//BEARBEITEN

ok, ich habe Code gefunden, der für das Platzieren von Benachrichtigungen verantwortlich ist, /usr/share/cinnamon/js/ui/messageTray.js :

_onNotificationExpanded: function() {
    let expandedY = this._notification.actor.height - this._notificationBin.height;
    // Don't animate the notification to its new position if it has shrunk:
    // there will be a very visible "gap" that breaks the illusion.

    // This isn't really working at the moment, but it was just crashing before
    // if it encountered a critical notification.  expandedY is always 0.  For now
    // just make sure it's not covering the top panel if there is one.

    let monitor = Main.layoutManager.primaryMonitor;
    let panel = Main.panelManager.getPanel(0, false); // We only want the top panel in monitor 0
    let height = 5;
    if (panel)
        height += panel.actor.get_height();
    let newY = monitor.y + height + 50; // ADDED 50 HERE SO POPUP IS NOT OVER WINDOW CONTROLS

    if (this._notificationBin.y < expandedY)
        this._notificationBin.y = expandedY;
    else if (this._notification.y != expandedY)
        this._tween(this._notificationBin, '_notificationState', State.SHOWN,
                    { y: newY,
                      time: ANIMATION_TIME,
                      transition: 'easeOutQuad'
                    });

},

Es wird nach dem Cinnamon-Update nicht mehr funktionieren, da diese Datei überschrieben wird.

Wir schließen dies, da es sich beim ursprünglichen Problem um eine Eigenschaft handelt, die nicht einmal existiert, und wir haben andere offene Probleme beim Verschieben von Benachrichtigungen.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen