Skip to content

Commit

Permalink
disallow GLES in glarea example and misc. show methods
Browse files Browse the repository at this point in the history
GLES issue was showing up on Wayland 1.23
  • Loading branch information
jwahlstrand committed Dec 25, 2024
1 parent 977cddd commit c60c1be
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/glarea.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ end
wh = 600
w = GtkWindow("GL example", wh, wh)
glarea = GtkGLArea()
Gtk4.allowed_apis(glarea, Gtk4.GLAPI_GL)

signal_connect(on_realized, glarea, "realize")
Gtk4.on_render(render, glarea)
Expand Down
2 changes: 2 additions & 0 deletions src/Gdk4.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ end
convert(::Type{RGBA}, gcolor::_GdkRGBA) = RGBA(gcolor.red, gcolor.green, gcolor.blue, gcolor.alpha)
convert(::Type{GdkRGBA}, color::Colorant) = GdkRGBA(red(color), green(color), blue(color), alpha(color))

Base.show(io::IO, c::GdkRGBA) = print(io,"GdkRGBA(\""*G_.to_string(c)*"\")")

## GdkCursor

GdkCursor(name::AbstractString; kwargs...) = GdkCursor(name, nothing; kwargs...)
Expand Down
2 changes: 1 addition & 1 deletion src/Pango/Pango.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ eltype(::Type{PangoFontFamily}) = PangoFontFace
Base.keys(ff::PangoFontFamily) = 1:length(ff)

PangoFontDescription(s::AbstractString) = G_.font_description_from_string(s)
Base.show(io::IO, pfd::PangoFontDescription) = print(io, "PangoFontDescription(" * G_.to_string(pfd) * ")")
Base.show(io::IO, pfd::PangoFontDescription) = print(io, "PangoFontDescription(\"" * G_.to_string(pfd) * "\")")

PangoLayout(cr::cairoContext) = G_.create_layout(cr)

Expand Down
2 changes: 2 additions & 0 deletions src/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ function GtkCssProvider(data::Union{AbstractString,Nothing}, filename = nothing)
return provider
end

Base.show(io::IO, cssp::GtkCssProvider) = print(io,"GtkCssProviderLeaf(\""*G_.to_string(cssp)*"\")")

function push!(context::GtkStyleContext, provider, priority=STYLE_PROVIDER_PRIORITY_USER)
G_.add_provider(context, GtkStyleProvider(provider), priority)
context
Expand Down

0 comments on commit c60c1be

Please sign in to comment.