aminomancer / uc.css.js

A dark indigo CSS theme for Firefox and a large collection of privileged scripts to add new buttons, menus, and behaviors and eliminate nuisances. The theme is similar to other userChrome stylesheets, but it's intended for use with an autoconfig loader like fx-autoconfig, since it uses JavaScript to implement its more functional features.
Other
329 stars 27 forks source link

Tab context menu related #17

Closed henryxrl closed 2 years ago

henryxrl commented 2 years ago
  1. Bookmark button It seems like the bookmark button in the tab context menu doesn't detect whether the current page has been bookmarked or not. Please see the screenshot attached. Not sure whether it's a feature or a potential bug.

image

  1. Context menu padding After loading the author style sheet, this happens: image

Do you know where I can fix this? Thanks!

aminomancer commented 2 years ago
  1. It doesn't detect whether the page is bookmarked. It's the same button no matter what. If the tab is already bookmarked then clicking it will open the edit dialog, because the edit dialog is functionally the same as the add bookmark dialog. Understand that the bookmark tab button and the reload tab button are already present in vanilla Firefox. This script just moves them to the top. The back/forward buttons are the only ones added by the script. And in vanilla Firefox, the bookmark tab button does not change depending on whether the tab is already bookmarked or not.
  2. I have no idea what that is. What operating system are you using?
henryxrl commented 2 years ago
  1. I see. Thanks for the explanation.
  2. It seems like an extra padding. I'm using Windows 11. image
aminomancer commented 2 years ago

Which version of Firefox?

henryxrl commented 2 years ago

Lastest Nightly, 96.0a1 (2021-11-06) (64-bit)

aminomancer commented 2 years ago

Also can you give me a full list of all the scripts you're using? You have all the stylesheets, right? You have the full resources folder and the chrome.manifest file?

aminomancer commented 2 years ago

Do you have browser.display.windows.non_native_menus set to 1 in about:config?

henryxrl commented 2 years ago

Yes it's 1. I set everything according to your table

aminomancer commented 2 years ago

And no it's not extra padding. Otherwise you'd see a purple padding around it. It's blue which means it's margins on the arrowscrollbox. In the menupopup's #shadow-root.

I don't have Windows 11 and don't have any way to test this theme on Windows 11. Simply put it just isn't designed for Windows 11. If you can look through the inspector and tell me what you see, we can probably fix it. But I can't do it on my own. I think the shadow will be on the top level <menupopup> element. But the extra "padding" will be in its shadow root. Like under the <menupopup> there'll be a #shadow-root row. You expand that and there'll be an <arrowscrollbox> element. There should be margins on it... Like, that should show as a band of yellow bordering it. The margins will either be on the arrowscrollbox or on one of its descendants. Look around for it and when you find the yellow band, see if you can find the margin rule in the Rules tab.

Do the same with the shadow. There will probably be something like -moz-window-shadow: cliprounded so tell me if the problem is solved if you add -moz-window-shadow: none !important; and appearance: none !important; to userChrome.au.css.

aminomancer commented 2 years ago

Sorry I should have said add this to userChrome.au.css:

menupopup, panel {
    -moz-window-shadow: none !important;
    appearance: none !important;
}

And maybe try adding this to userChrome.au.css too:

menupopup::part(content),
menupopup::part(arrowscrollbox-scrollbox) {
    margin: 0 !important;
}
henryxrl commented 2 years ago

The first part of the code doesn't fix the problem but the second part does! Thank you!!!

aminomancer commented 2 years ago

Oh I see the problem. You have userChrome.css.menupopup-shadows set to true don't you? That will create the extra padding. You should just set that to false.

henryxrl commented 2 years ago

Ah yes! That should be the problem haha!

Btw, since you set the tabs spanning the entire width of the window, it becomes very hard to drag the window around. How do you personally do it?

aminomancer commented 2 years ago

There's a little drag space between the window control buttons and the tab toolbar buttons (new tab, all tabs, vertical tabs buttons). image

When you enable the menu bar it gets a bit smaller but it's still there image

aminomancer commented 2 years ago

I'd like to find some other way to allow window dragging though. I always have hundreds of tabs so they take up the full titlebar space regardless of the max tab size. So CSS wouldn't really change anything. But it might be possible to use javascript to allow window dragging on any element if a certain key is pressed. Like maybe if you hold down the alt key, dragging anything will drag the entire window. I'm not sure if that's possible but I'll look into it.

henryxrl commented 2 years ago

Do you think simply leaving a small space to the left of the very first tab will do? The unmodded Firefox does have this.

image image

aminomancer commented 2 years ago

No I removed the space on purpose because I think it looks ugly. Try this script

henryxrl commented 2 years ago

Wow this works nice! For me, holding shift and dragging windows triggers Microsoft's PowerToy FancyZones. I'd have to change the hotkey from alt+shift to ctrl+alt. Great work!