Closed Dimas-sc closed 10 years ago
Oh, I see, this is chrome://browser/skin/browser.css
.tabbrowser-tab {
pointer-events: none;
}
.tab-background-middle,
.tabs-newtab-button,
.tab-close-button {
pointer-events: auto;
}
trick for tabs (and "curves" of tabs isn't accessible). And this can't be easily used for toolbarbutton because image inside button isn't accessible. And (as I understand) accessibility may be changed only using custom binding, like following:
.tabs-newtab-button {
pointer-events: none;
-moz-binding: url("override.xml#toolbarbutton");
}
.tabs-newtab-button > .toolbarbutton-icon {
pointer-events: auto;
padding: 5px 12px;
}
with
<?xml version="1.0"?>
<bindings id="toolbarbuttonBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="toolbarbutton" display="xul:hbox" role="xul:toolbarbutton"
extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton" />
</bindings>
But only one extension may override binding. So, this will break all extensions, that wants to use similar trick. :(
But only one extension may override binding. So, this will break all extensions, that wants to use similar trick. :(
I used generated binding that extends current one, but this may break anyway (e.g. if you disable another restartless extension with similar trick). Also I had to handle left-click manually (but this shouldn't create any problems from user side).
Also added two hidden preferences:
And for added user styles (Stylish) and extensions like Classic Theme Restorer Private Tab styles aren't updated automatically (and you should re-enable extension).
Test version: private_tab-0.1.7.1pre2-fx-sm.xpi (source source).
It works perfectly now!
If you need some advanced testing tell me. Do you think we could create a Firefox bug for a better / no-conflict fix?
Thx!
Do you think we could create a Firefox bug for a better / no-conflict fix?
May be, but how many extensions have buttons after last tab? I know only about Tab Mix Plus, but with only some GUI settings for New Tab button placement.
Also I corrected code to better resize button's icon, now should work better with other themes/extensions (e.g. with Tree Style Tab). Test version re-uploaded, link still the same.
Agree, solved! :D
http://i.imgur.com/ffgPrLt.png
As you can see in the capture, putting the "New Private Tab" button next to the core "New Tab" button isn't accurate and when you want to click the core button the "New Private Tab" button is activated instead.