Rename config options, add separatyorWidth option

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-06-25 21:32:09 +02:00
parent a3ecd173aa
commit 18e8e33e18
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -33,8 +33,9 @@ class ToolbarTools(Falkon.PluginInterface, QtCore.QObject):
self.config = {
"settingsFile": os.path.join(settingsPath, "ToolbarTools", "settings.ini"),
"spacers": 2,
"maxWidth": 150,
"separators": 2
"spacerMaxWidth": 150,
"separators": 2,
"separatorWidth": 10
}
plugins = Falkon.MainApplication.instance().plugins()
@ -55,7 +56,7 @@ class ToolbarTools(Falkon.PluginInterface, QtCore.QObject):
def onMainWindowCreated(self, window):
for id in range(1, self.config["spacers"] + 1):
spacer = Spacer(id, self.config["maxWidth"])
spacer = Spacer(id, self.config["spacerMaxWidth"])
window.navigationBar().addWidget(spacer, spacer.id(), spacer.name())
if window not in self.spacers:
@ -63,7 +64,7 @@ class ToolbarTools(Falkon.PluginInterface, QtCore.QObject):
self.spacers[window][id] = spacer
for id in range(1, self.config["separators"] + 1):
separator = Separator(id)
separator = Separator(id, self.config["separatorWidth"])
window.navigationBar().addWidget(separator, separator.id(), separator.name())
if window not in self.separators: