Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate_panel_opacity #1219

Merged
merged 1 commit into from
Oct 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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