q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e540a9864be5058bdfd93cdd4529e8589304e438
commit e540a9864be5058bdfd93cdd4529e8589304e438 Author: Daniel Kolesa <[email protected]> Date: Tue Aug 2 16:47:29 2016 +0100 docs: allow rank dir and size to be changed in theme --- src/scripts/elua/apps/gendoc.lua | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua index ec471ab..eee105e 100644 --- a/src/scripts/elua/apps/gendoc.lua +++ b/src/scripts/elua/apps/gendoc.lua @@ -556,7 +556,9 @@ local default_theme = { edge = { color = "black" }, - bg_color = "transparent" + bg_color = "transparent", + rank_dir = "TB", + size = "6" } local current_theme = default_theme @@ -606,6 +608,12 @@ local validate_theme = function(tb) if not tb.bg_color then tb.bg_color = default_theme.bg_color end + if not tb.rank_dir then + tb.rank_dir = default_theme.rank_dir + end + if not tb.size then + tb.size = default_theme.size + end if type(tb.node) ~= "table" then return false end @@ -615,6 +623,12 @@ local validate_theme = function(tb) if type(tb.bg_color) ~= "string" then return false end + if type(tb.rank_dir) ~= "string" then + return false + end + if type(tb.size) ~= "string" then + return false + end if not validate_ctheme(tb, "regular") then return false end @@ -694,8 +708,8 @@ local build_igraph = function(cl) local graph = { type = "hierarchy", attrs = { - rankdir = "TB", - size = "6", + rankdir = current_theme.rank_dir, + size = current_theme.size, bgcolor = current_theme.bg_color }, node = current_theme.node, --
