diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 691a82fc36..c215e9634d 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -350,3 +350,11 @@ send_news_to_device_location = "main" # work on all operating systems) server_listen_on = '0.0.0.0' +#: Unified toolbar on OS X +# If you enable this option and restart calibre, the toolbar will be 'unified' +# with the titlebar as is normal for OS X applications. However, doing this has +# various bugs, for instance the minimum width of the toolbar becomes twice +# what it should be and it causes other random bugs on some systems, so turn it +# on at your own risk! +unified_title_toolbar_on_osx = False + diff --git a/src/calibre/gui2/layout.py b/src/calibre/gui2/layout.py index 281450ed30..7d07463b87 100644 --- a/src/calibre/gui2/layout.py +++ b/src/calibre/gui2/layout.py @@ -17,6 +17,7 @@ from calibre.gui2.search_box import SearchBox2, SavedSearchBox from calibre.gui2.throbber import ThrobbingButton from calibre.gui2.bars import BarsManager from calibre.gui2.widgets import ComboBoxWithHelp +from calibre.utils.config_base import tweaks from calibre import human_readable class LocationManager(QObject): # {{{ @@ -266,7 +267,8 @@ class MainWindowMixin(object): # {{{ self.bars_manager.update_bars() # This is disabled because it introduces various toolbar related bugs # The width of the toolbar becomes the sum of both toolbars - # self.setUnifiedTitleAndToolBarOnMac(True) + if tweaks['unified_title_toolbar_on_osx']: + self.setUnifiedTitleAndToolBarOnMac(True) l = self.centralwidget.layout() l.addWidget(self.search_bar)