为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

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.