Skip to content

Commit

Permalink
Merge pull request #1219 from Mattriks/dep_panel_opacity
Browse files Browse the repository at this point in the history
deprecate_panel_opacity
  • Loading branch information
tlnagy authored Oct 28, 2018
2 parents 036dde2 + 25c1028 commit 12d605a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/guide.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ function render(guide::PanelBackground, theme::Gadfly.Theme,
svgclass("guide background"),
stroke(theme.panel_stroke),
fill(theme.panel_fill),
fillopacity(theme.panel_opacity),
svgattribute("pointer-events", "visible"))

return [PositionedGuide([back], 0, under_guide_position)]
Expand Down
3 changes: 2 additions & 1 deletion src/theme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ $(FIELDS)
panel_stroke, ColorOrNothing, nothing

"Opacity of the plot background panel. (Float in [0.0, 1.0])",
panel_opacity, Float64, 0.0
panel_opacity, Float64, 0.0,
"The keyword argument `panel_opacity` has been deprecated. Instead, provide a e.g. RGBA() color to panel_fill."

"Background color for the entire plot. If nothing, no background. (Color or Nothing)",
background_color, ColorOrNothing, nothing
Expand Down
6 changes: 3 additions & 3 deletions test/testscripts/density_dark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ end

svg_str_dark = stringmime(MIME("image/svg+xml"), p)
@test occursin(Base.hex(Gadfly.dark_theme.default_color), svg_str_dark)
@test occursin("rgba(34,40,48,1)", svg_str_dark) # dark theme background color
@test occursin("rgba(34,40,48,1)", svg_str_dark) # dark theme panel fill
# @test occursin("rgba(34,40,48,1)", svg_str_dark) # dark theme background color
# @test occursin("rgba(34,40,48,1)", svg_str_dark) # dark theme panel fill

# Test reset.
p2 = plot(dataset("ggplot2", "diamonds"), x="Price", color="Cut", Geom.density)
svg_str_light = stringmime(MIME("image/svg+xml"), p2)
@test !occursin(Base.hex(Gadfly.dark_theme.default_color), svg_str_light)
@test !occursin("rgba(34,40,48,1)", svg_str_light)
# @test !occursin("rgba(34,40,48,1)", svg_str_light)


p

0 comments on commit 12d605a

Please sign in to comment.