OS specific css but common icons?

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.
User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4981
Joined: 2015-12-09, 15:45
Contact:

OS specific css but common icons?

Unread post by moonbat » 2020-06-25, 11:49

I've had complaints about the background color of the toolbar button not displaying properly on the default theme on Windows, which is not verifiable by me since I only have Linux here.
I thought of having separate CSS files for windows and linux by changing the chrome manifest, and putting the icon files in a common subdirectory 'all' - but it doesn't work and the icon is garbled.
This is my chrome.manifest -

Code: Select all

content	pmplayer											content/
skin	pmplayer							 classic/1.0	skin/all
skin	pmplayer-os							 classic/1.0	skin/mac	os=Darwin
skin	pmplayer-os							 classic/1.0	skin/unix	os=Linux
skin	pmplayer-os							 classic/1.0	skin/win	os=WINNT
locale	pmplayer							 en-US			locale/en-US/
overlay chrome://navigator/content/navigator.xul			chrome://pmplayer/content/browserOverlay.xul application={a3210b97-8e8a-4737-9aa0-aa0e607640b9}
overlay chrome://browser/content/browser.xul 				chrome://pmplayer/content/browserOverlay.xul application={8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
overlay chrome://browser/content/browser.xul 				chrome://pmplayer/content/browserOverlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
style 	chrome://global/content/customizeToolbar.xul 		    chrome://pmplayer-os/skin/overlay.css
So from the above, I've put the separate CSS in sudirectories win,mac and unix, and the extension icons are in skin/all. The CSS refers to the icons using a chrome://pmplayer/skin/ prefix, and my XUL files refer to the CSS as chrome://pmplayer-os/skin/overlay.css

This doesn't work and the icon in the toolbar shows all the standard icons mashed together (as it does when it can't find the icons).
Is this(have separate CSS for each OS but have icon files in common under 'all' because they're the same) possible to do, and if so how does one go about it?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4981
Joined: 2015-12-09, 15:45
Contact:

Re: OS specific css but common icons?

Unread post by moonbat » 2020-06-25, 12:39

Fixed it - I didn't have trailing / for the paths under skin/ :oops:
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Lootyhoof
Themeist
Themeist
Posts: 1569
Joined: 2012-02-09, 23:35
Location: United Kingdom

Re: OS specific css but common icons?

Unread post by Lootyhoof » 2020-06-25, 12:49

You might also want to remove the os=Linux from the unix path so that it works for other GTK-based systems too (e.g. Solaris). It will be overridden if on Windows/Mac anyway.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4981
Joined: 2015-12-09, 15:45
Contact:

Re: OS specific css but common icons?

Unread post by moonbat » 2020-06-25, 12:56

Thanks, I'll do that. Barely an hour since I published the update :)
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Locked