Commit Graph

54476 Commits

Author SHA1 Message Date
Matthias Clasen
85a7d0a201 font chooser widget: Expose tweak-action as property
This is necessary for applications that want to embed
the font chooser widget outside of GtkFontChooserDialog,
in order to access the tweak page.
2018-03-27 16:14:21 -04:00
Matthias Clasen
6ff76a483c font button: notify when ::font-features changes
Lack of notification was causing the font-features to not
show up in the inspector.
2018-03-27 16:14:21 -04:00
Timm Bäder
9665c4d651 spinbutton: spinbuttons aren't entries anymore
Fix a code sample to reflect that.
2018-03-27 19:09:15 +02:00
Timm Bäder
8646f9da19 spinbutton: Remove queue_resize call from realize
No reason for this to be here.
2018-03-27 19:08:50 +02:00
Timm Bäder
490abbb292 spinbutton: Fix a copy/paste bug in the docs 2018-03-27 18:25:03 +02:00
Timm Bäder
cc0a69e101 gl renderer: Fix some crashes
When the first op is a modelview or projection change.
2018-03-27 18:20:52 +02:00
Timm Bäder
5c66f2ec19 accellabel: Stop saying it's a GtkLabel
And clean up the includes accordingly.
2018-03-27 18:20:52 +02:00
Timm Bäder
331af6815b accellabel: Remove some unnused class fields 2018-03-27 18:20:52 +02:00
Timm Bäder
33b2bfa81f accellabel: Remove priv pointer 2018-03-27 18:20:52 +02:00
Emmanuele Bassi
1b62d28cbb ci: Move flatpak building to a script
The YAML is getting hard to modify, so let's use a simple script like we
do for the other CI jobs.
2018-03-27 12:47:05 +01:00
Emmanuele Bassi
69441cbace Do not test for linker flags
Meson warns when doing that, as it's not really portable.

Since we're using platform-specific linker flags on Darwin, we can also
do the same on Linux; the syntax is GCC-specific, so we're going to need
Clang users to test it.
2018-03-27 12:47:05 +01:00
Benjamin Otte
b9445f4d7e Merge branch 'krnowak/leak-fixes' into 'master'
Fix some leaks

See merge request GNOME/gtk!87
2018-03-27 11:37:24 +00:00
Krzesimir Nowak
06661da8b0 Fix some leaks 2018-03-27 13:14:41 +02:00
Matthias Clasen
4b2c4ab109 wayland: Don't emit signals if nothing changed
We were emitting a preedit-changed even if the preedit text did
not actually change, causing text views to scroll.
2018-03-26 21:38:28 -04:00
Timm Bäder
b26e584e29 gl renderer: Rename everything called window to surface 2018-03-26 21:13:52 +02:00
Timm Bäder
81d19154a3 entry: Remove useless queue_draw call
This is already taken care of by the add_class/remove_class.
2018-03-26 20:03:00 +02:00
Benjamin Otte
f494d6ae1f snapshot: Generate better names for offset nodes 2018-03-26 19:43:06 +02:00
Benjamin Otte
353ad30b12 rendernode: Fix serializing
Adding the offset node broke serialization in 2 ways:

1. We store the enum value in the node, so make sure to not change it
   for existing values
2. The offset node was missing in the deserialization lookup table
2018-03-26 19:43:06 +02:00
Benjamin Otte
e2ee2a6dab iconhelper: Apply scale to paintable
Instead of fiddling around with scale in the iconhelper (and getting it
wrong), create a GtkScaler around the paintable that takes care of the
scaling.
2018-03-26 18:46:22 +02:00
Benjamin Otte
5e99646e1c dnd: Remove gtk_drag_set_icon_surface()
All users are gone. Use gtk_drag_set_icon_paintable() instead.
2018-03-26 18:32:38 +02:00
Benjamin Otte
cc9908353c tests: Don't use gtk_drag_set_icon_surface() 2018-03-26 18:30:34 +02:00
Benjamin Otte
9afbf02bc2 textview: Port dnd icon to be a GdkPaintable 2018-03-26 18:16:37 +02:00
Benjamin Otte
3f28a6851b colorswatch: Port drag icon to paintables 2018-03-26 18:16:36 +02:00
Benjamin Otte
8e3e321da4 colorbutton: Port dnd icon to paintable
Patch is untested, because colorbuttons can't do DND at the moment.
2018-03-26 18:16:36 +02:00
Benjamin Otte
aa1d1e4189 treeview: Turn drag icon into paintable 2018-03-26 18:16:36 +02:00
Benjamin Otte
a269e9a266 iconview: Port DND icons to snapshot paintables 2018-03-26 18:16:36 +02:00
Benjamin Otte
5415d05359 tests: Remove references to long-deleted property 2018-03-26 18:16:36 +02:00
Benjamin Otte
60719bb67c textutil: Make gtk_text_util_create_drag_icon() return a paintable 2018-03-26 18:16:36 +02:00
Benjamin Otte
7fdcc58532 snapshot: Add gtk_snapshot_to_paintable()
This is intended for DND icons
2018-03-26 18:16:36 +02:00
Benjamin Otte
9b83116fcb snapshot: Export gtk_snapshot_append_layout()
This is the equivalent snapshot function to pango_cairo_show_layout().

Not to be confused with gtk_snapshot_render_layout(), which is the
equivalent to gtk_render_layout().
2018-03-26 18:16:36 +02:00
Benjamin Otte
e6d24f4c15 snapshot: Make gtk_snapshot_append_node() take care of offset
Push an offset node when append_node is called. That resets the offset.
2018-03-26 18:16:36 +02:00
Benjamin Otte
ce743f28a1 rendernode: Add an offset node
This is a special case of the transform node that does a 2D translation.

The implementation in the Vulkan and GL renderers is crude and just does
the same as the transform node.

Nothing uses that node yet.
2018-03-26 18:16:36 +02:00
Piotr Drąg
b8b6324c4c Update Polish translation 2018-03-26 01:42:57 +02:00
Benjamin Otte
8c43f22e3e colorscale: Draw gradient using render nodes
Don't use Cairo when it's not needed.
2018-03-26 00:31:12 +02:00
Benjamin Otte
438b4b6b5c colorscale: Draw hue background as a texture
No need to use Cairo here.
2018-03-26 00:31:12 +02:00
Benjamin Otte
b16ac01a03 colorplane: Create background image as a texture
Don't create it using Cairo.
2018-03-26 00:31:12 +02:00
Matthias Clasen
448d2502d9 Merge branch 'bz773274' into 'master'
wayland: Don't paint if the window is unmapped

See merge request GNOME/gtk!32
2018-03-25 20:44:44 +00:00
Benjamin Otte
6bad307180 colorscale: Don't free surface data before surface
When drawing onto a recording surface, source surfaces get cached.

But if we g_free() the surface data after we're done, that cache is
gonna point at invalid data...
2018-03-25 22:38:42 +02:00
Timm Bäder
98a9f2b3c1 GdkGLContext: Add a GL debug message callback
If G_ENABLE_CONSISTENCY_CHECKS is defined (i.e. if our buildtype is
'debug'), add a opengl debug callback that prints all debug messages
with a severity higher than SEVERITY_NOTIFICATION as a warning to the
console.
2018-03-25 21:04:36 +02:00
Timm Bäder
433517fdc9 gl renderer: Skip all 0-sized nodes
These will cause problems later on.
2018-03-25 11:47:57 +02:00
Timm Bäder
7240178988 gl renderer: Remove cairo node special case 2018-03-25 11:47:57 +02:00
Emmanuele Bassi
eb382c1321 ci: Remove --werror
Turns out that GCC errors out when building the GLib test suite, as it
now checks for overflows in allocator functions, and we're testing for
those.

This would not be an issue for GTK, but since we're building GLib as a
subproject, we get failures for those as well.

Until we can find out how to disable errors for subprojects, or fix the
GLib test suite not to trip up warnings in GCC, we're going to live
without compiler warnings treated as errors for a while.
2018-03-25 00:31:36 +00:00
Emmanuele Bassi
cfeab26de0 ci: Use the appropriate argument for errors
The option to enable fatal warnings in Meson is `--werror`.
2018-03-25 00:00:02 +00:00
Daniel Boles
f8ecd488cd Menu: Don't leak priv->motion_controller 2018-03-24 22:01:02 +00:00
Benjamin Otte
b83cd9e818 ci: build with -Werror 2018-03-24 22:27:28 +01:00
Emmanuele Bassi
ba65c1ae58 ci: Disable ccache
Forcibly remove any ccache use, even if it's installed.
2018-03-24 21:17:34 +00:00
Emmanuele Bassi
fe45cf9c09 docs: Style fixes for the contribution guidelines 2018-03-24 21:16:16 +00:00
Benjamin Otte
1cfa88ed91 snapshot: Remove renderer
Now that there's no longer a need to keep the renderer around for Cairo
rendering, don't do that then.
2018-03-24 21:57:20 +01:00
Benjamin Otte
e84c6acc4f rendernode: Remove renderer argument
It's not needed to create Cairo nodes anymore.
2018-03-24 21:57:20 +01:00
Benjamin Otte
df600669a2 rendernode: Create Cairo surfaces as recording surfaces
This way, we can postpone the actual rendeing of the node until the
renderer. This allows the renderer to choose the right scale to
render at, so it can decide to use 2x scale for hidpi on its own.

Last but not least, it makes all nodes independent of the context they
are created in, because they do not need to know at snapshot time what
they will ultimately be rendered into.
2018-03-24 21:57:20 +01:00