Cinnamon: Cambiar la propiedad css de margin-from-top-edge-of-screen #notification en el tema no funciona

Creado en 11 mar. 2016  ·  3Comentarios  ·  Fuente: linuxmint/cinnamon

Estoy tratando de cambiar la posición de la ventana emergente de notificación como aquí http://www.webupd8.org/2012/06/how-to-change-notifications-position-in.html . Pero agregar o cambiar margin-from-top-edge-of-screen no tiene ningún efecto. Por el contrario, cambiar margin-from-right-edge-of-screen funciona bien.

Estoy usando Linux Mint 17.3 con el tema Linux Mint y mis #notificaciones se ven así:

#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
}

¿Alguna idea de por qué cambiar margin-from-top-edge-of-screen no tiene ningún efecto?

Comentario más útil

Bien, ¿hay alguna manera de mover esta ventana emergente para que no se sobrepasen los botones de minimizar / maximizar / cerrar? Es realmente molesto colocar ventanas emergentes en la esquina superior derecha de la pantalla ...

//EDITAR

ok, encontré el código responsable de colocar la notificación, /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'
                    });

},

Dejará de funcionar después de la actualización de Cinnamon, ya que este archivo se sobrescribirá.

Todos 3 comentarios

Eso es porque el margen desde el borde superior de la pantalla no es una propiedad real. No existe tal cosa, así que Cinnamon simplemente la ignora. La publicación que señaló es muy antigua. Es probable que las cosas hayan cambiado desde entonces.

Bien, ¿hay alguna manera de mover esta ventana emergente para que no se sobrepasen los botones de minimizar / maximizar / cerrar? Es realmente molesto colocar ventanas emergentes en la esquina superior derecha de la pantalla ...

//EDITAR

ok, encontré el código responsable de colocar la notificación, /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'
                    });

},

Dejará de funcionar después de la actualización de Cinnamon, ya que este archivo se sobrescribirá.

Cerrando esto ya que el problema original es sobre una propiedad que ni siquiera existe y tenemos otros problemas abiertos sobre la posibilidad de mover notificaciones.

¿Fue útil esta página
0 / 5 - 0 calificaciones