Cinnamon: ํ…Œ๋งˆ์˜ margin-from-top-edge-of-screen #notification CSS ์†์„ฑ ๋ณ€๊ฒฝ์ด ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2016๋…„ 03์›” 11์ผ  ยท  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 ํ…Œ๋งˆ๋กœ Linux Mint 17.3์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์œผ๋ฉฐ #notifications๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

#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 ๋ณ€๊ฒฝํ•ด๋„ ํšจ๊ณผ๊ฐ€ ์—†๋Š” ์ด์œ ๋ฅผ ์•„์‹ญ๋‹ˆ๊นŒ?

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

์ข‹์•„, ์ตœ์†Œํ™”/์ตœ๋Œ€ํ™”/๋‹ซ๊ธฐ ๋ฒ„ํŠผ์„ ๋„˜์ง€ ์•Š๋„๋ก ์ด ํŒ์—…์„ ์ด๋™ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๊นŒ? ํ™”๋ฉด ์šฐ์ธก์ƒ๋‹จ์— ํŒ์—…์ฐฝ ๋„์šฐ๋Š”๊ฑฐ ์ •๋ง ์งœ์ฆ๋‚˜๋„ค์š”...

//ํŽธ์ง‘ํ•˜๋‹ค

ok ์•Œ๋ฆผ์„ ๋ฐฐ์น˜ํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค. /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 ๋Œ“๊ธ€

ํ™”๋ฉด ์ƒ๋‹จ ๊ฐ€์žฅ์ž๋ฆฌ์—์„œ ์—ฌ๋ฐฑ์ด ์‹ค์ œ ์†์„ฑ์ด ์•„๋‹ˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ๊ฑด ์—†์–ด์„œ ์‹œ๋‚˜๋ชฌ์€ ๊ทธ๋ƒฅ ๋ฌด์‹œํ•ฉ๋‹ˆ๋‹ค. ๋‹น์‹ ์ด ์ง€์ ํ•œ ๊ฒŒ์‹œ๋ฌผ์€ ์ •๋ง ์˜ค๋ž˜๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ ์ดํ›„๋กœ ์ƒํ™ฉ์ด ๋ฐ”๋€Œ์—ˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค.

์ข‹์•„, ์ตœ์†Œํ™”/์ตœ๋Œ€ํ™”/๋‹ซ๊ธฐ ๋ฒ„ํŠผ์„ ๋„˜์ง€ ์•Š๋„๋ก ์ด ํŒ์—…์„ ์ด๋™ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ์Šต๋‹ˆ๊นŒ? ํ™”๋ฉด ์šฐ์ธก์ƒ๋‹จ์— ํŒ์—…์ฐฝ ๋„์šฐ๋Š”๊ฑฐ ์ •๋ง ์งœ์ฆ๋‚˜๋„ค์š”...

//ํŽธ์ง‘ํ•˜๋‹ค

ok ์•Œ๋ฆผ์„ ๋ฐฐ์น˜ํ•˜๋Š” ์ฝ”๋“œ๋ฅผ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค. /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 ๋“ฑ๊ธ‰