ENH use enum for x/y alignment
This commit is contained in:
parent
529cc3824c
commit
df16b60f4a
2
core
2
core
|
@ -1 +1 @@
|
||||||
Subproject commit 9e6e960796bd66bc050f2d111ecdab6c309a0874
|
Subproject commit 6d2b8844900d51d94fdc8cf6e946ffa7ddd464e4
|
|
@ -31,15 +31,15 @@ M.label_font_spec = M.make_font_spec(_G_Patterns_.FONT, 8, false)
|
||||||
M.left_text_style = _G_Widget_.text_style(
|
M.left_text_style = _G_Widget_.text_style(
|
||||||
M.normal_font_spec,
|
M.normal_font_spec,
|
||||||
_G_Patterns_.INACTIVE_TEXT_FG,
|
_G_Patterns_.INACTIVE_TEXT_FG,
|
||||||
'left',
|
_G_Widget_.X_ALIGN.LEFT,
|
||||||
'center'
|
_G_Widget_.Y_ALIGN.CENTER
|
||||||
)
|
)
|
||||||
|
|
||||||
M.right_text_style = _G_Widget_.text_style(
|
M.right_text_style = _G_Widget_.text_style(
|
||||||
M.normal_font_spec,
|
M.normal_font_spec,
|
||||||
_G_Patterns_.PRIMARY_FG,
|
_G_Patterns_.PRIMARY_FG,
|
||||||
'right',
|
_G_Widget_.X_ALIGN.RIGHT,
|
||||||
'center'
|
_G_Widget_.Y_ALIGN.CENTER
|
||||||
)
|
)
|
||||||
|
|
||||||
local _bare_text = function(pt, text, style)
|
local _bare_text = function(pt, text, style)
|
||||||
|
@ -69,8 +69,8 @@ M.Header = function(x, y, w, s)
|
||||||
_G_Widget_.text_style(
|
_G_Widget_.text_style(
|
||||||
M.make_font_spec(_G_Patterns_.FONT, HEADER_FONT_SIZE, true),
|
M.make_font_spec(_G_Patterns_.FONT, HEADER_FONT_SIZE, true),
|
||||||
_G_Patterns_.HEADER_FG,
|
_G_Patterns_.HEADER_FG,
|
||||||
'left',
|
_G_Widget_.X_ALIGN.LEFT,
|
||||||
'top'
|
_G_Widget_.Y_ALIGN.TOP
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
bottom_y = bottom_y,
|
bottom_y = bottom_y,
|
||||||
|
@ -238,8 +238,8 @@ M.initTextRing = function(x, y, r, fmt, limit)
|
||||||
_G_Widget_.text_style(
|
_G_Widget_.text_style(
|
||||||
M.normal_font_spec,
|
M.normal_font_spec,
|
||||||
_G_Patterns_.PRIMARY_FG,
|
_G_Patterns_.PRIMARY_FG,
|
||||||
'center',
|
_G_Widget_.X_ALIGN.MIDDLE,
|
||||||
'center'
|
_G_Widget_.Y_ALIGN.CENTER
|
||||||
),
|
),
|
||||||
fmt,
|
fmt,
|
||||||
_G_Widget_.threshold_text_style(
|
_G_Widget_.threshold_text_style(
|
||||||
|
@ -321,8 +321,8 @@ M.initTextRowCrit = function(x, y, w, label, append_end, limit)
|
||||||
_G_Widget_.text_style(
|
_G_Widget_.text_style(
|
||||||
M.normal_font_spec,
|
M.normal_font_spec,
|
||||||
_G_Patterns_.PRIMARY_FG,
|
_G_Patterns_.PRIMARY_FG,
|
||||||
'right',
|
_G_Widget_.X_ALIGN.RIGHT,
|
||||||
'center'
|
_G_Widget_.Y_ALIGN.CENTER
|
||||||
),
|
),
|
||||||
append_end,
|
append_end,
|
||||||
_G_Widget_.threshold_text_style(
|
_G_Widget_.threshold_text_style(
|
||||||
|
|
|
@ -75,8 +75,8 @@ local labels = _G_Widget_.TextColumn(
|
||||||
_G_Widget_.text_style(
|
_G_Widget_.text_style(
|
||||||
Common.normal_font_spec,
|
Common.normal_font_spec,
|
||||||
_G_Patterns_.INACTIVE_TEXT_FG,
|
_G_Patterns_.INACTIVE_TEXT_FG,
|
||||||
'left',
|
_G_Widget_.X_ALIGN.LEFT,
|
||||||
'center'
|
_G_Widget_.Y_ALIGN.CENTER
|
||||||
),
|
),
|
||||||
nil,
|
nil,
|
||||||
_SPACING_
|
_SPACING_
|
||||||
|
|
|
@ -106,8 +106,8 @@ local cache = {
|
||||||
_G_Widget_.text_style(
|
_G_Widget_.text_style(
|
||||||
Common.normal_font_spec,
|
Common.normal_font_spec,
|
||||||
_G_Patterns_.INACTIVE_TEXT_FG,
|
_G_Patterns_.INACTIVE_TEXT_FG,
|
||||||
'left',
|
_G_Widget_.X_ALIGN.LEFT,
|
||||||
'center'
|
_G_Widget_.Y_ALIGN.CENTER
|
||||||
),
|
),
|
||||||
nil,
|
nil,
|
||||||
_TEXT_SPACING_
|
_TEXT_SPACING_
|
||||||
|
@ -121,8 +121,8 @@ local cache = {
|
||||||
_G_Widget_.text_style(
|
_G_Widget_.text_style(
|
||||||
Common.normal_font_spec,
|
Common.normal_font_spec,
|
||||||
_G_Patterns_.SECONDARY_FG,
|
_G_Patterns_.SECONDARY_FG,
|
||||||
'right',
|
_G_Widget_.X_ALIGN.RIGHT,
|
||||||
'center'
|
_G_Widget_.Y_ALIGN.CENTER
|
||||||
),
|
),
|
||||||
'%s%%',
|
'%s%%',
|
||||||
_TEXT_SPACING_
|
_TEXT_SPACING_
|
||||||
|
|
Loading…
Reference in New Issue