REF use common style for round things

This commit is contained in:
Nathan Dwarshuis 2021-07-24 00:55:45 -04:00
parent 97e3b2cf5f
commit 97120bc9f9
2 changed files with 5 additions and 5 deletions

2
core

@ -1 +1 @@
Subproject commit a1c7f8f49a8db707347b7f1abc15a3c9d64212e0 Subproject commit 896bd289485dec964b5edb43c8243e5e3a8d0f7d

View File

@ -338,7 +338,7 @@ end
M.arc = function(x, y, r, thickness, pattern) M.arc = function(x, y, r, thickness, pattern)
return Arc.build( return Arc.build(
F.make_semicircle(x, y, r, 90, 360), F.make_semicircle(x, y, r, 90, 360),
Arc.style(thickness, pattern) Arc.config(s.line(thickness, CAIRO_LINE_CAP_BUTT), pattern)
) )
end end
@ -348,7 +348,7 @@ end
M.initRing = function(x, y, r) M.initRing = function(x, y, r)
return Arc.build( return Arc.build(
F.make_semicircle(x, y, r, 0, 360), F.make_semicircle(x, y, r, 0, 360),
Arc.style(ARC_WIDTH, Theme.BORDER_FG) Arc.config(s.line(ARC_WIDTH, CAIRO_LINE_CAP_BUTT), Theme.BORDER_FG)
) )
end end
@ -400,7 +400,7 @@ M.dial = function(x, y, radius, thickness, threshold, format)
return { return {
dial = Dial.build( dial = Dial.build(
F.make_semicircle(x, y, radius, DIAL_THETA0, DIAL_THETA1), F.make_semicircle(x, y, radius, DIAL_THETA0, DIAL_THETA1),
Arc.style(thickness, Theme.INDICATOR_BG), Arc.config(s.line(thickness, CAIRO_LINE_CAP_BUTT), Theme.INDICATOR_BG),
threshold_indicator(threshold) threshold_indicator(threshold)
), ),
text_ring = M.initTextRing(x, y, radius - thickness / 2 - 2, format, threshold), text_ring = M.initTextRing(x, y, radius - thickness / 2 - 2, format, threshold),
@ -429,7 +429,7 @@ M.compound_dial = function(x, y, outer_radius, inner_radius, thickness,
threshold, num_dials) threshold, num_dials)
return CompoundDial.build( return CompoundDial.build(
F.make_semicircle(x, y, outer_radius, DIAL_THETA0, DIAL_THETA1), F.make_semicircle(x, y, outer_radius, DIAL_THETA0, DIAL_THETA1),
Arc.style(thickness, Theme.INDICATOR_BG), Arc.config(s.line(thickness, CAIRO_LINE_CAP_BUTT), Theme.INDICATOR_BG),
threshold_indicator(threshold), threshold_indicator(threshold),
inner_radius, inner_radius,
num_dials num_dials