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: 37
Joined: Thu, 19 Dec 2013, 02:34
Location: San Diego, CA, US

Image size in slider alerts, PM 28

Unread postby astewart » Sun, 07 Oct 2018, 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: 22272
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: Image size in slider alerts, PM 28

Unread postby Moonchild » Sun, 07 Oct 2018, 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: 37
Joined: Thu, 19 Dec 2013, 02:34
Location: San Diego, CA, US

Re: Image size in slider alerts, PM 28

Unread postby astewart » Sun, 07 Oct 2018, 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 136 times
alert_without_override.png
alert_without_override.png (4.27 KiB) Viewed 136 times

_yuyu_
Fanatic
Fanatic
Posts: 136
Joined: Mon, 02 Mar 2015, 14:18
Location: Moscow

Re: Image size in slider alerts, PM 28

Unread postby _yuyu_ » Sun, 07 Oct 2018, 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 119 times

notification 28.PNG
notification 28.PNG (7.17 KiB) Viewed 117 times

Sorry, I've attached a wrong image, corrected.
Last edited by _yuyu_ on Sun, 07 Oct 2018, 09:02, edited 1 time in total.
Pale Moon 32-bit on Win 7 x64


Return to “Bug reports (Windows)”

Who is online

Users browsing this forum: No registered users and 6 guests