Image size in slider alerts, PM 28

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
astewart
Moonbather
Moonbather
Posts: 53
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: 35477
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Image size in slider alerts, PM 28

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

Can you include screenshots of both?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

astewart
Moonbather
Moonbather
Posts: 53
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 405 times
alert_without_override.png
alert_without_override.png (4.27 KiB) Viewed 405 times

_yuyu_
Lunatic
Lunatic
Posts: 253
Joined: 2015-03-02, 14:18

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 388 times
notification 28.PNG
notification 28.PNG (7.17 KiB) Viewed 386 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

Locked