mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
Change default style setter
This commit is contained in:
parent
bdf9de239d
commit
a86d826ae1
@ -18,6 +18,8 @@ local const = require("druid.const")
|
||||
local druid_instance = require("druid.system.druid_instance")
|
||||
local settings = require("druid.system.settings")
|
||||
|
||||
local default_style = require("druid.styles.default.style")
|
||||
|
||||
local M = {}
|
||||
|
||||
|
||||
@ -45,6 +47,9 @@ end
|
||||
-- @tparam[opt] table style Druid style module
|
||||
-- @treturn druid_instance Druid instance
|
||||
function M.new(context, style)
|
||||
if settings.default_style == nil then
|
||||
M.set_default_style(default_style)
|
||||
end
|
||||
return druid_instance(context, style)
|
||||
end
|
||||
|
||||
|
@ -2,11 +2,9 @@
|
||||
-- @module settings
|
||||
-- @local
|
||||
|
||||
local default_style = require("druid.styles.default.style")
|
||||
|
||||
local M = {}
|
||||
|
||||
M.default_style = default_style
|
||||
M.default_style = nil
|
||||
|
||||
function M.get_text(name)
|
||||
return "[Druid]: locales not inited"
|
||||
|
Loading…
x
Reference in New Issue
Block a user