From 8959d0014f5a9e375363bbd449e6e38ab3e56e43 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 31 Mar 2023 12:20:24 +0200 Subject: [PATCH] merge jk/html-png-display + highdpi adjustments new figure size and related theming adjustments move html backend show out of cairomakie move WEB_MIMES constant from WGLMakie into Makie use strings again fix test smaller colorbar ticks adjust more theming gaps padding adjust fix size of docs example make toggle smaller make colorbar thinner smaller colorbar adjust legend doc example fix intervalslider and example more docs fixes, axis legend padding improve faq example fix test value --- CairoMakie/src/screen.jl | 4 ++-- src/display.jl | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CairoMakie/src/screen.jl b/CairoMakie/src/screen.jl index 2de2e552910..eb7f95110ed 100644 --- a/CairoMakie/src/screen.jl +++ b/CairoMakie/src/screen.jl @@ -81,8 +81,8 @@ end to_cairo_antialias(aa::Int) = aa """ -* `px_per_unit = 2.0`: see [figure docs](https://docs.makie.org/stable/documentation/figure_size/). -* `pt_per_unit = 0.75`: see [figure docs](https://docs.makie.org/stable/documentation/figure_size/). +* `px_per_unit = 2.0`: see [figure docs](https://docs.makie.org/stable/documentation/figure/). +* `pt_per_unit = 0.75`: see [figure docs](https://docs.makie.org/stable/documentation/figure/). * `antialias::Union{Symbol, Int} = :best`: antialias modus Cairo uses to draw. Applicable options: `[:best => Cairo.ANTIALIAS_BEST, :good => Cairo.ANTIALIAS_GOOD, :subpixel => Cairo.ANTIALIAS_SUBPIXEL, :none => Cairo.ANTIALIAS_NONE]`. * `visible::Bool`: if true, a browser/image viewer will open to display rendered output. """ diff --git a/src/display.jl b/src/display.jl index d8f35953bee..a64b4cb8dcf 100644 --- a/src/display.jl +++ b/src/display.jl @@ -213,6 +213,9 @@ const WEB_MIMES = ( MIME"application/prs.juno.plotpane+html", MIME"juliavscode/html") +# because we have a default way to display pngs in html contexts, we can say that +# if png is showable, so are the html types +Base.showable(mime::Union{WEB_MIMES...}, fig::FigureLike) = showable(MIME"image/png"(), fig) backend_showable(@nospecialize(screen), @nospecialize(mime)) = false