mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 770433 - Update borders and background of alert (toast) notifications on Windows. ui-r=shorlander r=dao
This commit is contained in:
parent
ef09dc0ba4
commit
f74aa35f5f
@ -68,25 +68,33 @@ function onAlertLoad()
|
||||
gOpenTime = Services.prefs.getIntPref("alerts.totalOpenTime");
|
||||
gDisableSlideEffect = Services.prefs.getBoolPref("alerts.disableSlidingEffect");
|
||||
|
||||
var alertBox = document.getElementById("alertBox");
|
||||
// Make sure that the contents are fixed at the window edge facing the
|
||||
// screen's center so that the window looks like "sliding in" and not
|
||||
// like "unfolding". The default packing of "start" only works for
|
||||
// vertical-bottom and horizontal-right positions, so we change it here.
|
||||
if (gOrigin & NS_ALERT_HORIZONTAL)
|
||||
{
|
||||
if (gOrigin & NS_ALERT_LEFT)
|
||||
if (gOrigin & NS_ALERT_LEFT) {
|
||||
document.documentElement.pack = "end";
|
||||
alertBox.setAttribute("origin", "left");
|
||||
} else {
|
||||
alertBox.setAttribute("origin", "right");
|
||||
}
|
||||
|
||||
// Additionally, change the orientation so the packing works as intended
|
||||
document.documentElement.orient = "horizontal";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gOrigin & NS_ALERT_TOP)
|
||||
if (gOrigin & NS_ALERT_TOP) {
|
||||
document.documentElement.pack = "end";
|
||||
alertBox.setAttribute("origin", "top");
|
||||
} else {
|
||||
alertBox.setAttribute("origin", "bottom");
|
||||
}
|
||||
}
|
||||
|
||||
var alertBox = document.getElementById("alertBox");
|
||||
alertBox.orient = (gOrigin & NS_ALERT_HORIZONTAL) ? "vertical" : "horizontal";
|
||||
|
||||
sizeToContent();
|
||||
|
@ -11,21 +11,48 @@
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
.alertBox {
|
||||
border: 2px solid #7B969C;
|
||||
border: 1px solid threedshadow;
|
||||
background-color: -moz-Dialog;
|
||||
min-height: 50px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
@media (-moz-windows-default-theme) {
|
||||
.alertBox {
|
||||
background-image: linear-gradient(to bottom, white 1px, rgba(255,255,255,0) 15px);
|
||||
}
|
||||
}
|
||||
|
||||
.alertBox[origin="top"] {
|
||||
border-top: none;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
.alertBox[origin="right"] {
|
||||
border-right: none;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
|
||||
.alertBox[origin="bottom"] {
|
||||
border-bottom: none;
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
|
||||
.alertBox[origin="left"] {
|
||||
border-left: none;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
|
||||
.alertBox[orient="horizontal"] > .alertImageBox {
|
||||
-moz-margin-start: 4px;
|
||||
-moz-margin-end: 6px;
|
||||
min-height: 46px;
|
||||
-moz-margin-end: 8px;
|
||||
}
|
||||
|
||||
.alertBox[orient="vertical"] > .alertImageBox {
|
||||
margin-top: 6px;
|
||||
margin-bottom: 4px;
|
||||
min-width: 46px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.alertTitle {
|
||||
@ -58,14 +85,6 @@ label {
|
||||
color: #424F63;
|
||||
}
|
||||
|
||||
.alertBox[orient="horizontal"] > .alertTextBox {
|
||||
-moz-padding-end: 10px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.alertBox[orient="vertical"] > .alertTextBox {
|
||||
-moz-padding-start: 5px;
|
||||
-moz-padding-end: 5px;
|
||||
margin-bottom: 8px;
|
||||
-moz-box-align: center;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user