Image size in slider alerts, PM 28

The place to report Pale Moon specific bugs on the Windows operating system.

Moderator: satrow

astewart
Apollo supporter
Apollo supporter
Posts: 40
Joined: 2013-12-19, 02:34
Location: San Diego, CA, US

Image size in slider alerts, PM 28

Unread post by astewart » 2018-10-07, 04:01

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

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 23243
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Image size in slider alerts, PM 28

Unread post by Moonchild » 2018-10-07, 04:04

Can you include screenshots of both?
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

astewart
Apollo supporter
Apollo supporter
Posts: 40
Joined: 2013-12-19, 02:34
Location: San Diego, CA, US

Re: Image size in slider alerts, PM 28

Unread post by astewart » 2018-10-07, 07:08

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
Attachments
alert_with_override.png
alert_with_override.png (3.36 KiB) Viewed 193 times
alert_without_override.png
alert_without_override.png (4.27 KiB) Viewed 193 times

_yuyu_
Fanatic
Fanatic
Posts: 150
Joined: 2015-03-02, 14:18
Location: Moscow

Re: Image size in slider alerts, PM 28

Unread post by _yuyu_ » 2018-10-07, 08:51

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 176 times
notification 28.PNG
notification 28.PNG (7.17 KiB) Viewed 174 times
Sorry, I've attached a wrong image, corrected.
Last edited by _yuyu_ on 2018-10-07, 09:02, edited 1 time in total.
Pale Moon 32-bit on Win 7 x64

Post Reply