Skip to content

Commit

Permalink
Scale Slider fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Feb 16, 2022
1 parent 0d5019f commit 2b08d11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


local dversion = 285
local dversion = 286
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)

Expand Down
5 changes: 4 additions & 1 deletion Libs/DF/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ local SimplePanel_frame_backdrop_border_color = {0, 0, 0, 1}

--with_label was making the frame stay in place while its parent moves
--the slider was anchoring to with_label and here here were anchoring the slider again
function DF:CreateScaleBar (frame, config)
function DF:CreateScaleBar(frame, config)
local scaleBar, text = DF:CreateSlider (frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"), DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
scaleBar.thumb:SetWidth(24)
scaleBar:SetValueStep(0.1)
Expand All @@ -2009,6 +2009,7 @@ function DF:CreateScaleBar (frame, config)
config.scale = newScale
scaleBar:SetValue(newScale)
frame:SetScale(newScale)
editbox.defaultValue = newScale
end
end)

Expand Down Expand Up @@ -2037,6 +2038,7 @@ function DF:CreateScaleBar (frame, config)
if (mouseButton == "LeftButton") then
scaleBar.mouseDown = false
frame:SetScale(config.scale)
editbox.defaultValue = config.scale
end
end)

Expand All @@ -2049,6 +2051,7 @@ function DF:CreateScaleBar (frame, config)
end

scaleBar:SetAlpha(0.70)
editbox.defaultValue = config.scale

return scaleBar
end
Expand Down

0 comments on commit 2b08d11

Please sign in to comment.