為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Modifying the width of a "flexible space" when customizing the Firefox toolbar

  • 7 回覆
  • 2 有這個問題
  • 1 次檢視
  • 最近回覆由 ronks1

more options

The "Flexible Space" item is useful to separate icons on my Firefox (78.0.1, 64-bit, Windows 10) toolbar, but I don't need it as wide as the default. Is it possible to modify the size, and how would I go about it?

The "Flexible Space" item is useful to separate icons on my Firefox (78.0.1, 64-bit, Windows 10) toolbar, but I don't need it as wide as the default. Is it possible to modify the size, and how would I go about it?

所有回覆 (7)

more options

"Flexible" means that it expands to fill the available space. There is no about:config preference for manually setting a specific width or percentage.

more options

You would have to use multiple fixed spacer items instead.

You can edit the JSON data value of browser.uiCustomization.state on the about:config page and change customizableui-special-spring## to customizableui-special-spacer## (do not change the number).

You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.

This pref is in JSON format, so be cautious not to break this JSON code ({"key":"value"} pairs).
If you do it this way then Firefox takes care to add a unique ID number, so you only need to edit the type.
You should have the item(s) on the toolbar after you have restarted Firefox.
Make sure to keep a backup of the current value of the browser.uiCustomization.state pref to be able to undo in case something goes wrong.
These type are supported.

  • customizableui-special-separator## (separator)
  • customizableui-special-spacer## (spacer)
  • customizableui-special-spring## (spring)

由 cor-el 於 修改

more options

Thanks to both of you. Plainly there is no magic bullet here. I think I'll just leave well enough alone for now.

more options

A related question. I was planning to use separators to mark off icons on the toolbars, but they don't seem to be in the list of objects I can add. I can move existing ones around but that seems to be it. How can I add one?

more options

You can only create a flexible space (spring) item directly.
Firefox still supports fixed space and separator items, but you need to edit browser.uiCustomization.state like I posted above to change a customizableui-special-spring item to one of the other supported items.


This is the default value of browser.uiCustomization.state with the spring items:

{"placements":{"widget-overflow-fixed-list":[],"nav-bar":["back-button","forward-button","stop-reload-button","home-button","customizableui-special-spring1","urlbar-container","customizableui-special-spring2","downloads-button","library-button","sidebar-button","fxa-toolbar-menu-button"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["developer-button"],"dirtyAreaCache":["nav-bar"],"currentVersion":16,"newElementCount":2}

You edit this JSON data and replace spring with separator to get separators instead.

{"placements":{"widget-overflow-fixed-list":[],"nav-bar":["back-button","forward-button","stop-reload-button","home-button","customizableui-special-separator1","urlbar-container","customizableui-special-separator2","downloads-button","library-button","sidebar-button","fxa-toolbar-menu-button"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["developer-button"],"dirtyAreaCache":["nav-bar"],"currentVersion":16,"newElementCount":2}

Close and restart Firefox after modifying the pref to make the change effective.

You can do this with any separator you want to see on the toolbar (i.e first drag a spring to the toolbar, then edit browser.uiCustomization.state to change spring to separator, then close and restart Firefox).

由 cor-el 於 修改

more options

Sorry that I didn't cover non- User Interface "fixes" which are rather complicated when using "code" and esoteric preferences to solve your problem, but the days of an "easy fix" are gone from Firefox. And the days of "packaging stuff like that" via Extensions is gone, as Extensions are no longer allowed to do those types of modifications to the UI.

I have done that in the past 19 years of using Firefox, but stopped about 5 years ago; preferring to actually use Firefox more than time I was spending "tweaking" Firefox. Like a nasty divorce due to "incompatibility" when one partner changed how they viewed and lived their life, and the other partner was comfortable with what had been the status quo for many years for their relationship together ....

more options

Thanks again. I also like easy fixes, and it looks like there isn't one here.