Commit Graph

54210 Commits

Author SHA1 Message Date
Benjamin Otte
a721d8b78f css: Implement support for dynamic values
This adds a new GtkStyleAnimation called GtkCssDynamic (for lack of a
better name) that is spawned whenever at least one dynamic value is part
of the GtkCssStyle.
2018-03-16 06:04:43 +01:00
Benjamin Otte
d774406573 cssimage: Implement dynamic values
No image actually implements it yet, but this is the plumbing.
2018-03-16 06:04:43 +01:00
Benjamin Otte
3322599e99 css: Introduce the idea of dynamic values
Dynamic values are values that change their contents with the current
(monotonic) time.

This just introduces the GtkCssValue API for it.
2018-03-16 06:04:43 +01:00
Benjamin Otte
7f0ef81e11 vulkan: Our data is premultiplied, don't pretend it isn't
If the backend can't do premultiplied alpha, better make the backend treat
2018-03-16 06:04:43 +01:00
Benjamin Otte
927f48d289 css: Remove ability to query css images as cairo patterns
Nobody's doing that. And CSS Images are no longer using Cairo anyway.

If we wanted to support querying them (hint: we don't) we should be
using GdkPaintable.
2018-03-16 06:04:43 +01:00
Benjamin Otte
45072c3a64 aboutdialog: The default icons are textures these days 2018-03-16 06:04:43 +01:00
Benjamin Otte
a891a3ae26 demos: Unbreak icon for fishbowl demo
351559fcfa was to eager in simplifying
things.
2018-03-16 06:04:43 +01:00
Benjamin Otte
4bb8352ab5 css: Fix compiler warning
...
2018-03-16 06:04:43 +01:00
Matthias Clasen
62aa487500 Improve the scale handling
Always use the smallest scale that is larger than requested,
or, failing that, the largest available scale.
2018-03-15 20:28:12 -04:00
Matthias Clasen
454814c6b4 Merge branch 'css-image-scaled' into 'master'
Css image scaled

See merge request GNOME/gtk!62
2018-03-15 23:58:40 +00:00
Emmanuele Bassi
0b4e0ce509 ci: Restore ccache, but do not cache it across jobs
The GitLab cache is kept across jobs, whether they succeeded or not:
this means that if a compiler check fails during the Meson
configuration, the small compiler program gets cached and restored the
next time the job is run, thus failing again.
2018-03-15 18:28:44 +00:00
Matthias Clasen
35f92b5695 Merge branch 'wip/filechooser-non-default-display-gtk4' into 'master'
Fix filechooser dialog using non default display (gtk4)

Closes #83

See merge request GNOME/gtk!60
2018-03-15 17:44:49 +00:00
Matthias Clasen
55d35dd13e Update the expected results in the testsuite
the -gtk-scaled() change in the previous commit makes it so
that we now print out the scale factors. Update the expected
output of affected tests to take that into account.
2018-03-15 13:38:41 -04:00
Timm Bäder
ba52be36c2 gl renderer: Set border program outline state 2018-03-15 18:17:57 +01:00
Timm Bäder
eaf899061a gl renderer: Remove shadow program
Drawing shadows is the same task as drawing text in our case and these
two shaders have been the same thing for quite a while.
2018-03-15 18:12:00 +01:00
Timm Bäder
0a7880110e gl renderer: Fix clipped borders
Stop abusing the clip rect for borders.
2018-03-15 18:11:57 +01:00
Timm Bäder
a475e6671c shaderbuilder: Remove unused API 2018-03-15 16:30:48 +01:00
Timm Bäder
e35132054e gl: Move shaderbuilder into gl/ subdirectory
It only handles OpenGL shaders.
2018-03-15 15:06:46 +01:00
Timm Bäder
ebfadae568 gl renderer: Draw offscreen nodes in device pixels
We need to draw them upscaled, of course. This fixes button hover (or,
more generally, crossfade nodes) in hidpi setups.
2018-03-15 13:52:07 +01:00
Timm Bäder
65e3dda065 testsuite: Add more gl renderer tests 2018-03-15 12:58:51 +01:00
Timm Bäder
f82b3fdb90 gl tests: Update clipped cross fade output 2018-03-15 12:41:11 +01:00
Timm Bäder
d66bfb1a9a testsuite: Add a GL gradient test 2018-03-15 11:15:35 +01:00
Matthias Clasen
a4c2819f91 Make GtkCssImageScaled handle scales properly
We slightly expand the syntax of -gtk-scaled to allow
specifying an explicit scale after each image, and then
we create a single-image GtkCssImageScaled with the
preferred scale in compute().
2018-03-15 06:04:08 -04:00
Timm Bäder
3a5630358f gl renderer: Fix rounded clips in hidpi 2018-03-15 11:01:53 +01:00
Timm Bäder
afffc696f4 spinbutton: Remove an unnecessary queue_draw call
This is done automatically in case the spinbutton value actually
changes.
2018-03-15 09:44:49 +01:00
Timm Bäder
a0729f9683 gdk: Remove unused variable 2018-03-15 09:25:42 +01:00
Timm Bäder
04fadc508b GskGLDriver: Use g_assert_cmphex for GL constants 2018-03-15 09:25:42 +01:00
Matthias Clasen
16bf07fe33 Trivial formatting fixes
Fix some whitespace problems.
2018-03-14 23:23:03 -04:00
Daniel Boles
2f16c092a5 testspinbutton: Add button to toggle wrap on Spins
I found myself wanting to test this for something else, so let's test
it. It revealed a bug immediately!

https://gitlab.gnome.org/GNOME/gtk/issues/88
2018-03-14 23:09:51 +00:00
Daniel Boles
55664f95ab testspinbutton: Orient box orthogonally to Spins
This makes better use of space.
2018-03-14 23:01:06 +00:00
Timm Bäder
8b800fa775 testsuite: Simplify GL test definition 2018-03-14 17:28:41 +01:00
Timm Bäder
d978d4af59 testsuite: Add a GL tests for clipped rounded clipped nodes 2018-03-14 17:28:41 +01:00
Timm Bäder
d417595a05 gl renderer: Draw rounded clip child to a texture
And then clip the texture using the current (maybe also rounded) clip.
This way, the result is correct. We don't necessarily have to do the
offscreen drawing in any case, but got the safe route for now.
2018-03-14 17:28:41 +01:00
Timm Bäder
90c8619f42 gl renderer: Properly draw gl textures from a different context
Temporarily switch to the texture's gl context, download the texture and
create a new one in our context for it.
2018-03-14 17:28:41 +01:00
Timm Bäder
955dca950c fixed: Remove snapshot implementation
It does the same thing as the default implementation.
2018-03-14 17:28:41 +01:00
Timm Bäder
5f2283c0ab snapshot: Ignore 0 sized clip nodes
This may happen due to the intersection before.
2018-03-14 17:28:41 +01:00
Carlos Soriano
f06f0a0dee gtkmenu: Remove unused constant
It was used in gtk3 but not in master anymore.
2018-03-14 16:05:08 +01:00
Jonas Ådahl
a48eaa1954 entrycompletion: Realize popup after setting screen
Realization is done as a side effect of calling
_gtk_entry_completion_resize_popup(), but if this is done before the
GdkScreen of the GtkWindow is set up correctly, it may result in the
widget being unrealized when the screen is updated. This may happen
when the file dialog parent window is not using the default GdkDisplay.

To avoid this issue, realize the popup after the screen has been
properly set up.

Fixes #83 in gtk4
2018-03-14 15:37:26 +08:00
Timm Bäder
417e8d6ca4 snapshot: Add missing (nullable) annotation 2018-03-13 23:43:29 +01:00
Timm Bäder
d4c9a35193 widget: Simplify setting a default direction
No reason for the second paramter to be a pointer.
2018-03-13 23:43:29 +01:00
Timm Bäder
81a7f8e00c label: Remove dead NULL check
We only create the gesture when priv->select_info is !NULL.
2018-03-13 23:43:29 +01:00
Christoph Reiter
f91ea2ce37 Merge branch 'master' into 'master'
Add proper annotation for gdk_frame_clock_get_refresh_info

See merge request GNOME/gtk!55
2018-03-13 20:30:53 +00:00
Christoph Reiter
5838ac3d1d run-docker.sh: Disable SELinux for the container and update the image tag
On Fedora and similar SELinux by default prevents containers accessing
mounted host directories. This script is just used for testing,
so disable it.
2018-03-13 21:13:31 +01:00
Emmanuele Bassi
27abc9fefe Update CONTRIBUTING.md
Update the instructions to match the GitLab workflow.
2018-03-13 18:13:46 +00:00
Emmanuele Bassi
b939af0090 ci: Add explicit dependency on "which"
The xvfb-run script depends on it, but it seems Fedora packages ended up
forgetting about it.
2018-03-13 17:56:44 +00:00
Emmanuele Bassi
4e2790ea74 ci: Remove ccache
There are issues with the caching; CI will randomly fail to create new
files used when testing features.
2018-03-13 17:03:27 +00:00
Emmanuele Bassi
9a5947758c ci: Add GLib build dependencies
Since we may end up building GLib as a subproject, we're going to need
all the appropriate GLib build dependencies as well as the GTK ones.
2018-03-13 16:28:42 +00:00
Emmanuele Bassi
44469197d5 ci: Use a different Docker image
I've rebuilt the new Docker image we use for CI to include GStreamer in
the dependencies.

We really need to have the Docker registry hosted on gnome.org, to avoid
pointing people at Dockerhub.
2018-03-13 16:05:03 +00:00
Emmanuele Bassi
9d045db142 Annotate gdk_gl_texture_new() appropriately
This is a constructor, and it needs a transfer annotation.

Sadly, the resulting introspection representation is going to be a less
than satisfactory `Gdk.gl_texture_new()`, because there is no such thing
as a GdkGLTexture in the public API.
2018-03-13 16:00:55 +00:00
Emmanuele Bassi
73ffb7f5e9 Initialise variables
The dx and dy variables may be left uninitialized by the coordinate
translation — or so the C compiler thinks. Let's avoid a warning when
building.
2018-03-13 16:00:55 +00:00