Cinnamon: تغيير خاصية margin-from-top-edge-of-screen #notification في السمة لا تعمل

تم إنشاؤها على ١١ مارس ٢٠١٦  ·  3تعليقات  ·  مصدر: linuxmint/cinnamon

أحاول تغيير موضع الإشعارات المنبثقة مثل هنا http://www.webupd8.org/2012/06/how-to-change-notifications-position-in.html . لكن إضافة أو تغيير margin-from-top-edge-of-screen ليس له أي تأثير على الإطلاق. في المقابل ، فإن تغيير margin-from-right-edge-of-screen يعمل بشكل جيد.

أنا أستخدم Linux Mint 17.3 مع سمة Linux Mint وتبدو إشعاراتي بهذا الشكل:

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

هل لديك أي فكرة عن سبب عدم تأثير تغيير margin-from-top-edge-of-screen ؟

التعليق الأكثر فائدة

حسنًا ، هل هناك طريقة لتحريك هذه النافذة المنبثقة بحيث لا تزيد عن تصغير / تكبير / إغلاق الأزرار؟ إنه أمر مزعج حقًا وضع النوافذ المنبثقة في الزاوية العلوية اليمنى من الشاشة ...

//تعديل

حسنًا ، لقد وجدت رمزًا مسؤولاً عن وضع الإخطار ، /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'
                    });

} ،

سيتوقف عن العمل بعد تحديث القرفة حيث سيتم الكتابة فوق هذا الملف.

ال 3 كومينتر

هذا لأن الهامش من الحافة العلوية للشاشة ليس ملكية حقيقية. لا يوجد شيء من هذا القبيل ، لذا فإن القرفة تتجاهله. المنشور الذي أشرت إليه قديم حقًا. من المحتمل أن الأمور تغيرت منذ ذلك الحين.

حسنًا ، هل هناك طريقة لتحريك هذه النافذة المنبثقة بحيث لا تزيد عن تصغير / تكبير / إغلاق الأزرار؟ إنه أمر مزعج حقًا وضع النوافذ المنبثقة في الزاوية العلوية اليمنى من الشاشة ...

//تعديل

حسنًا ، لقد وجدت رمزًا مسؤولاً عن وضع الإخطار ، /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'
                    });

} ،

سيتوقف عن العمل بعد تحديث القرفة حيث سيتم الكتابة فوق هذا الملف.

إغلاق هذا لأن المشكلة الأصلية تتعلق بخاصية غير موجودة أصلاً ولدينا مشكلات أخرى مفتوحة حول القدرة على نقل الإشعارات.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات