mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Misc: Get rid of the legacy defaults.lua globals (#9546)
* This removes support for the following deprecated constants: `DTAP_ZONE_FLIPPING`, `DTAP_ZONE_BOOKMARK`, `DCREREADER_CONFIG_DEFAULT_FONT_GAMMA` * The "Advanced settings" panel now highlights modified values in bold (think about:config in Firefox ;)). * LuaData: Isolate global table lookup shenanigans, and fix a few issues in unused-in-prod codepaths. * CodeStyle: Require module locals for Lua/C modules, too. * ScreenSaver: Actually garbage collect our widget on close (ScreenSaver itself is not an instantiated object). * DateTimeWidget: Code cleanups to ensure child widgets can be GC'ed.
This commit is contained in:
@@ -58,13 +58,13 @@ function ReaderDogear:onReadSettings(config)
|
||||
-- Adjust to CreDocument margins (as done in ReaderTypeset)
|
||||
local h_margins = config:readSetting("copt_h_page_margins")
|
||||
or G_reader_settings:readSetting("copt_h_page_margins")
|
||||
or DCREREADER_CONFIG_H_MARGIN_SIZES_MEDIUM
|
||||
or G_defaults:readSetting("DCREREADER_CONFIG_H_MARGIN_SIZES_MEDIUM")
|
||||
local t_margin = config:readSetting("copt_t_page_margin")
|
||||
or G_reader_settings:readSetting("copt_t_page_margin")
|
||||
or DCREREADER_CONFIG_T_MARGIN_SIZES_LARGE
|
||||
or G_defaults:readSetting("DCREREADER_CONFIG_T_MARGIN_SIZES_LARGE")
|
||||
local b_margin = config:readSetting("copt_b_page_margin")
|
||||
or G_reader_settings:readSetting("copt_b_page_margin")
|
||||
or DCREREADER_CONFIG_B_MARGIN_SIZES_LARGE
|
||||
or G_defaults:readSetting("DCREREADER_CONFIG_B_MARGIN_SIZES_LARGE")
|
||||
local margins = { h_margins[1], t_margin, h_margins[2], b_margin }
|
||||
self:onSetPageMargins(margins)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user