Skip to content

Commit aa8cdcb

Browse files
committed
Fixed minor formatting issues
1 parent a253203 commit aa8cdcb

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lua/gauge.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function gauge (win, -- miniwindow ID to draw in
5757
WindowRectOp (win, 2, left, top, left + width, top + height, bg_colour) -- fill entire box
5858

5959
-- how big filled part is
60-
local gauge_width = width * Fraction
60+
local gauge_width = (width - 2) * Fraction
6161

6262
-- box size must be > 0 or WindowGradient fills the whole thing
6363
if math.floor (gauge_width) > 0 then
@@ -96,11 +96,9 @@ function gauge (win, -- miniwindow ID to draw in
9696
WindowRectOp (win, 1, left, top, left + width, top + height, frame_colour)
9797

9898
if name and #name > 0 then
99-
-- mouse-over information: add hotspot if not there
100-
if not WindowHotspotInfo(win, name, 1) then
99+
-- mouse-over information: add hotspot
101100
WindowAddHotspot (win, name, left, top, left + width, top + height,
102101
"", "", "", "", "", "", 0, 0)
103-
end -- if
104102

105103
-- store numeric values in case they mouse over it
106104
if max then
@@ -167,4 +165,4 @@ local font_height = WindowFontInfo (win, font, 1)
167165
WindowRectOp (win, 1, left - 3, top, left + width + 3, top + font_height, border_colour) -- border
168166

169167
return width
170-
end -- draw_text_box
168+
end -- draw_text_box

0 commit comments

Comments
 (0)