Theme question

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: Lootyhoof, FranklinDM

User avatar
blue_dragon
Moongazer
Moongazer
Posts: 14
Joined: 2024-05-02, 09:21
Location: Earth

Theme question

Post by blue_dragon » 2025-06-18, 13:00

Disclaimer: I'm using the official build of Pale Moon on a supported operating system.

Hello, I'm developing a complete theme for Pale Moon and I want to ask if there is any way to force show the *native* title bar even if the menu bar is hidden, either by binding XML or other ways. I see chromemargin of #main-window is set to "0,2,2,2" to hide the native title bar but I can't find a way to override it. I plan to put the appmenu button in an alternative location.

User avatar
blue_dragon
Moongazer
Moongazer
Posts: 14
Joined: 2024-05-02, 09:21
Location: Earth

Re: Theme question

Post by blue_dragon » 2025-06-19, 08:54

OK, I found a way to do it.

In browser.css:

Code: Select all

window#main-window {
    -moz-binding: url("<your bindings xml file>.xml#mainwindow") !important;
}
In windowBindings.xml add a new binding:

Code: Select all

	<binding id="mainwindow">
		<content onresize="if(!self.appbuttonhackrunned) { self.appbuttonhackrunned = true; var appbuttontimer = setInterval(function() { if(self.updateAppButtonDisplay) { clearInterval(appbuttontimer); self.updateAppButtonDisplay = function updateAppButtonDisplay() { document.documentElement.removeAttribute('chromemargin'); document.getElementById('titlebar').hidden = true; }; self.updateAppButtonDisplay(); } }); }">
			<children />
		</content>
	</binding>
But I'd like to do it in a cleaner way.