Skip to content

Commit

Permalink
add test for Button, Slider, Toggle, IntervalSlider
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Oct 2, 2024
1 parent f57e8cc commit abd06a9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ReferenceTests/src/tests/examples2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1743,4 +1743,4 @@ end
show_direction = true, stack = :x, show_final = true)

fig
end
end
24 changes: 24 additions & 0 deletions ReferenceTests/src/tests/figures_and_makielayout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -409,5 +409,29 @@ end
Makie.Checkbox(f[2, 3], checked = true, checkmarkcolor_checked = :black)
Makie.Checkbox(f[2, 4], checked = false, checkboxcolor_unchecked = :yellow)
Makie.Checkbox(f[2, 5], checked = true, checkboxcolor_checked = :orange)
f
end

# @reference_test "Button - Slider - Toggle"
begin
f = Figure(size = (500, 200))
Button(f[1, 1:2])
Button(f[2, 1:2], buttoncolor = :orange, cornerradius = 20,
strokecolor = :red, strokewidth = 2, # TODO: allocate space for this
fontsize = 16, labelcolor = :blue)

IntervalSlider(f[1, 3])
sl = IntervalSlider(f[2, 3], range = 0:100, linewidth = 20, color_inactive = :orange, color_active_dimmed = :lightgreen)
Makie.set_close_to!(sl, 30, 70)

Toggle(f[3, 1])
Toggle(f[4, 1], framecolor_inactive = :lightblue, rimfraction = 0.6)
Toggle(f[3, 2], active = true)
Toggle(f[4, 2], active = true, framecolor_inactive = :lightblue, framecolor_active = :yellow, rimfraction = 0.6)

Slider(f[3, 3])
sl = Slider(f[4, 3], range = 0:100, linewidth = 20, color_inactive = :cyan, color_active_dimmed = :lightgreen)
Makie.set_close_to!(sl, 30)

f
end

0 comments on commit abd06a9

Please sign in to comment.