aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/settings.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/plugins/settings.lua b/plugins/settings.lua
index 2032ddd..2114a36 100644
--- a/plugins/settings.lua
+++ b/plugins/settings.lua
@@ -18,7 +18,6 @@ local ListBox = require "widget.listbox"
local FoldingBook = require "widget.foldingbook"
local FontsList = require "widget.fontslist"
local ItemsList = require "widget.itemslist"
-local ToolbarView = require "plugins.toolbarview"
local KeybindingDialog = require "widget.keybinddialog"
local settings = {}
@@ -1716,15 +1715,18 @@ keymap.add {
--------------------------------------------------------------------------------
-- Overwrite toolbar preferences command to open the settings gui
--------------------------------------------------------------------------------
-local toolbarview_on_mouse_moved = ToolbarView.on_mouse_moved
-function ToolbarView:on_mouse_moved(px, py, ...)
- toolbarview_on_mouse_moved(self, px, py, ...)
- if
- self.hovered_item
- and
- self.hovered_item.command == "core:open-user-module"
- then
- self.hovered_item.command = "ui:settings"
+if config.plugins.toolbarview ~= false then
+ local ToolbarView = require "plugins.toolbarview"
+ local toolbarview_on_mouse_moved = ToolbarView.on_mouse_moved
+ function ToolbarView:on_mouse_moved(px, py, ...)
+ toolbarview_on_mouse_moved(self, px, py, ...)
+ if
+ self.hovered_item
+ and
+ self.hovered_item.command == "core:open-user-module"
+ then
+ self.hovered_item.command = "ui:settings"
+ end
end
end