Page 1 of 1

Image size in slider alerts, PM 28

Posted: 2018-10-07, 04:01
by astewart
I made the upgrade from 27 to 28, with 60 addons and 60 custombuttons with no problems, except one small detail I hesitate to even mention :oops:

The image for slider alerts (showAlertNotification) in PM 27 was styled in alert.css as

Code: Select all

#alertImage {
  max-width: 48px;
  max-height: 48px;
  list-style-image: url(chrome://global/skin/alerts/notification-48.png);
}
and the alert box was sized to fit the size of the image and text used.

In PM 28, they are styled in alert-common.css as

Code: Select all

#alertImage {
  width: 80px;
  height: 80px;
  max-width: 80px;
  max-height: 80px;
  object-fit: scale-down;
  margin: 0 7px 7px;
}
and the image size show is always 80px regardless of actual image size, leaving much space around short text. I've only found one complaint about this from two years ago and it was in connection with Thunderbird.

A solution is to add

Code: Select all

#alertImage {
  width: auto !important;
  height: auto !important;
  max-width: 48px !important;
  max-height: 48px !important;
}
to userChrome.css.


Alan

Re: Image size in slider alerts, PM 28

Posted: 2018-10-07, 04:04
by Moonchild
Can you include screenshots of both?

Re: Image size in slider alerts, PM 28

Posted: 2018-10-07, 07:08
by astewart
I didn't state that quite right. The image size is correct, but the space allocated is 80px. I don't have PM 27 any more, but here are PM 28 screenshots of this command

Code: Select all

Components.classes['@mozilla.org/alerts-service;1'].getService(Components.interfaces.nsIAlertsService)
            .showAlertNotification("chrome://global/skin/icons/information-32.png","The Title", "some text");
which uses a 32px image, with and without userChrome.css override. PM27 had more differences - the image was the full left side with a light background, title was top right directly above text bottom right, but that's not important.

Alan

Re: Image size in slider alerts, PM 28

Posted: 2018-10-07, 08:51
by _yuyu_
It seems that the overall styling of the alert box in PM 28 is totally different:
notification 27.PNG
notification 27.PNG (7.75 KiB) Viewed 394 times
notification 28.PNG
notification 28.PNG (7.17 KiB) Viewed 392 times
Sorry, I've attached a wrong image, corrected.