From 18e8e33e182731ca0bdb2d0e751aec1a35918d9c Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Tue, 25 Jun 2019 21:32:09 +0200 Subject: [PATCH] Rename config options, add separatyorWidth option Signed-off-by: Juraj Oravec --- toolbartools/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/toolbartools/__init__.py b/toolbartools/__init__.py index 2f6405f..b50a449 100644 --- a/toolbartools/__init__.py +++ b/toolbartools/__init__.py @@ -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: