messageTray: Adjust the position of the close button

Make this closer to the mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=682253
This commit is contained in:
Jasper St. Pierre 2012-08-20 16:44:28 -04:00
parent d721fc2c17
commit a2e0e0ad06
2 changed files with 14 additions and 4 deletions

View File

@ -615,7 +615,16 @@ StButton.popup-menu-item:insensitive {
} }
.notification-close { .notification-close {
-shell-close-overlap: 14px; /* we start out in the top right of the
* notification, inset.
*
* center is 32px/2 = 17px
*
* adjust left 2px
* adjust down 8px */
-shell-close-overlap-x: 15px;
-shell-close-overlap-y: 12px;
} }
.window-close:rtl { .window-close:rtl {

View File

@ -236,9 +236,10 @@ function makeCloseButton() {
closeButton.connect('style-changed', function() { closeButton.connect('style-changed', function() {
let themeNode = closeButton.get_theme_node(); let themeNode = closeButton.get_theme_node();
let overlap = themeNode.get_length('-shell-close-overlap'); closeButton.translation_x = themeNode.get_length('-shell-close-overlap-x');
closeButton.translation_x = overlap;
closeButton.translation_y = -overlap; // libcroco doesn't support negative units
closeButton.translation_y = -themeNode.get_length('-shell-close-overlap-y');
}); });
return closeButton; return closeButton;