From a5af4f9200c2005de0014d76fa47471727f29dc2 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sun, 11 Jul 2021 18:12:39 -0400 Subject: [PATCH] ENH don't unnecessarilty make point for box --- core | 2 +- drawing/Common.lua | 18 +++++------------- main.lua | 1 - 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/core b/core index b3e511f..db3924e 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit b3e511fb82aa9886b8f24f520fce2c3cb8473121 +Subproject commit db3924e25d98b942b4bc9fe81cb8bb8ada8a1fb1 diff --git a/drawing/Common.lua b/drawing/Common.lua index ec0e140..10457cc 100644 --- a/drawing/Common.lua +++ b/drawing/Common.lua @@ -115,7 +115,7 @@ M.percent_label_style = _G_Widget_.label_style( M.initThemedLabelPlot = function(x, y, w, h, label_style) return _G_Widget_.LabelPlot( - _G_Widget_.make_box(_G_Widget_.make_point(x, y), w, h), + _G_Widget_.make_box(x, y, w, h), M.default_plot_style, label_style ) @@ -169,7 +169,7 @@ M.base_2_scale_data = _G_Widget_.scale_data(2, 1, 0.9) M.initThemedScalePlot = function(x, y, w, h, f) return _G_Widget_.ScalePlot( - _G_Widget_.make_box(_G_Widget_.make_point(x, y), w, h), + _G_Widget_.make_box(x, y, w, h), M.default_plot_style, _G_Widget_.label_style( _G_Patterns_.INACTIVE_TEXT_FG, @@ -314,7 +314,6 @@ end -------------------------------------------------------------------------------- -- text row with critical indicator --- TODO add limit to this M.initTextRowCrit = function(x, y, w, label, append_end, limit) return{ label = _left_text( @@ -413,7 +412,7 @@ M.default_table_style = _G_Widget_.table_style( M.initTable = function(x, y, w, h, n, labels) return _G_Widget_.Table( - _G_Widget_.make_box(_G_Widget_.make_point(x, y), w, h), + _G_Widget_.make_box(x, y, w, h), n, labels, M.default_table_style @@ -425,15 +424,8 @@ end M.initPanel = function(x, y, w, h, thickness) return _G_Widget_.FillRect( - _G_Widget_.make_box( - _G_Widget_.make_point(x, y), - w, - h - ), - _G_Widget_.rect_style( - thickness, - _G_Patterns_.BORDER_FG - ), + _G_Widget_.make_box(x, y, w, h), + _G_Widget_.rect_style(thickness, _G_Patterns_.BORDER_FG), _G_Patterns_.PANEL_BG ) end diff --git a/main.lua b/main.lua index a891efe..e5cfd4d 100644 --- a/main.lua +++ b/main.lua @@ -195,7 +195,6 @@ _G_Patterns_ = nil _unrequire('Super') _unrequire('Color') -_unrequire('Gradient') _unrequire('Widget') _unrequire('Patterns')