Commit Graph

27749 Commits

Author SHA1 Message Date
Benjamin Otte
a2dfb1e93f roundedbox: typedef to GskRoundedRect 2016-12-20 18:01:10 +01:00
Benjamin Otte
c04bece131 roundedbox: Use a graphene_size_t for the corners
Obviously, I'm trying to port GtkRoundedBox to GskRoundedRect.

This is the second step on that path.
2016-12-20 18:01:10 +01:00
Benjamin Otte
6d012fb4ea gtk: Get rid of GtkCssCorner
We have GskCorner now which is identical.
2016-12-20 18:01:10 +01:00
Benjamin Otte
0a0cbcdcb6 viewport: implement snapshot() 2016-12-20 18:01:10 +01:00
Benjamin Otte
b0175421f2 stack: Implement snapshot()
This uses the new push()/pop() mechanism to its fullest extent when
implementing transitions. It's fun to inspect the results in the
inspector.

Crossfades don't work yet, they continue using a Cairo fallback.

A side effect of the stack conversion is that widget-factory now uses
snapshots for a lot more things.
2016-12-20 18:01:10 +01:00
Benjamin Otte
1137483d15 snapshot: Work on pushing and popping again
It is now possible to call push() subfunctions for simple container
nodes with just a single child. So you can for example
gtk_snapshot_push_clip() a clip region that all the nodes that get
appended later will then obey.

gtk_snapshot_pop() will then not return a container node, but a clip
node containing the container node (and similar for the transform
example).

This is implemented internally by providing a "collect function" when
pushing that is called when popping to collects all the accumulated
nodes and combine them into the single node that gets returned.

To simplify things even more, gtk_snapshot_pop_and_append() has been
added, which pops the currently pushed node and appends it to the
parent.

The icon rendering code has been converted to this approach.
2016-12-20 18:01:10 +01:00
Benjamin Otte
1f988d8b05 gsk: Add gsk_clip_node_new()
The node is a simple clipping node: It does a rectangular clip of its
contents.
2016-12-20 18:01:10 +01:00
Benjamin Otte
68a54ae81f stack: Don't draw an extra background
The gadget draws a background for us, we don't need another one.
2016-12-20 18:01:10 +01:00
Benjamin Otte
07d39299ea gsk: Replace gsk_render_node_set_opacity()
... with gsk_opacity_node_new().

Also implement support for opacity in gtk_widget_snapshot() using this
new node.
2016-12-20 18:01:10 +01:00
Benjamin Otte
671d43b873 cssimage: Implement snapshot() in the fallback image 2016-12-20 18:01:10 +01:00
Benjamin Otte
ed6643cf69 cssimage: Use textures in GtkCssImageSurface
We now use textures instead of surfaces and implement the snapshot()
vfunc instead of draw().
2016-12-20 18:01:10 +01:00
Benjamin Otte
429346fa7e cssimage: Implement a fallback draw() vfunc
... that chains into snapshot. This way, we can stop implementing draw()
in GtkCssImage subclasses and focus on snapshot() instead.
2016-12-20 18:01:10 +01:00
Benjamin Otte
c258ee403a snapshot: Make gtk_snapshot_get_renderer() private
Public API doesn't need to be concerned with renderers. Worst case, they
can use NULL instead of the actual renderer.
2016-12-20 18:01:10 +01:00
Benjamin Otte
e6d423e0e2 gsk: Remove gsk_renderer_create_fallback()
Use gsk_render_node_draw() instead.
2016-12-20 18:01:10 +01:00
Benjamin Otte
b120075698 snapshot: Add API for colors and textures 2016-12-20 18:01:10 +01:00
Benjamin Otte
6129daf29b gsk: Add gsk_color_node_new() 2016-12-20 18:01:10 +01:00
Benjamin Otte
361e2cda27 Call gsk_render_node_draw() instead of creating fallback renderers 2016-12-20 18:01:10 +01:00
Benjamin Otte
02131d590e snapshot: Change how gtk_snapshot_push/pop works
Instead of appending a container node and adding the nodes to it as they
come in, we now collect the nodes until gtk_snapshot_pop() is called and
then hand them out in a container node.

The caller of gtk_snapshot_push() is then responsible for doing whatever
he wants with the created node.

Another addigion is the keep_coordinates flag to gtk_snapshot_push()
which allows callers to keep the current offset and clip region or
discard it. Discarding is useful when doing transforms, keeping it is
useful when inserting effect nodes (like the ones I'm about to add).
2016-12-20 18:01:10 +01:00
Benjamin Otte
ca80e9decf snapshot: Handle clip region as part of the state
This is in preparation for further changes.
2016-12-20 18:01:10 +01:00
Benjamin Otte
67fb129ed7 gsk: gsk_render_node_set_transform() => GskTransformNode
Instead of having a setter for the transform, have a GskTransformNode.

Most of the oprations that GTK does do not require a transform, so it
doesn't make sense to have it as a primary attribute.

Also, changing the transform requires updating the uniforms of the GL
renderer, so we're happy if we can avoid that.
2016-12-20 18:01:10 +01:00
Benjamin Otte
19753062c4 gsK: Move children handling to GskContainerNode 2016-12-20 18:01:09 +01:00
Benjamin Otte
d691dfc894 inspector: Prepare TreeModelRenderNode for brave new world
I'm about to move children handling to the container node, which means
the generic code can no longer assume children APIs existing.

So rewrite the treemodel to work without it.
2016-12-20 18:01:09 +01:00
Benjamin Otte
3eb7c4719b gsk: Remove gsk_render_node_set_bounds()
gsk_render_node_get_bounds() still exists and is computed via vfunc
call:
- containers dynamically compute the bounds from their children
- surface and texture nodes get bounds passed on construction
2016-12-20 18:01:09 +01:00
Benjamin Otte
a97b819b81 gsk: Add gsk_container_node_new()
It replaces gsk_renderer_create_render_node() which was doing the eact
same thing, only taking an unused extra argument.
2016-12-20 18:01:09 +01:00
Benjamin Otte
8830a1a1ad gtk: Remove gtk_snapshot_append()
It does not make sense to append an empty container node. Those should
only be push()'d.
2016-12-20 18:01:09 +01:00
Benjamin Otte
abd184efc9 gsk: Remove gsk_render_node_is_surface/texture()
Use gsk_render_node_get_node_type() instead.
2016-12-20 18:01:09 +01:00
Benjamin Otte
52d2faef88 gsk: Add gsk_cairo_node_new()
Split off Cairo drawn content nodes and require you to allocate them
using this new function.
2016-12-20 18:01:09 +01:00
Benjamin Otte
d1b80a6baa gtk: Don't push cairo nodes
We want to split nodes into containers and nodes that do actual drawing.
So pushing nodes that do drawing is exactly the wrong thing.

Also fix up GtkPopover. There's no need for it to push anything.
2016-12-20 18:01:09 +01:00
Benjamin Otte
8c8691b469 gsk: Add gsk_texture_node_new()
Start the transition into the different node types.
2016-12-20 18:01:09 +01:00
Benjamin Otte
ff884385c0 gsk: Remove GskRenderNode::hidden
If you want to hide something, don't render it.
2016-12-20 18:01:09 +01:00
Debarshi Ray
7ea199c831 flowbox: Export gtk_flow_box_get_child_at_pos as public API
https://bugzilla.gnome.org/show_bug.cgi?id=776187
2016-12-20 00:35:17 +01:00
Debarshi Ray
faf2295440 GtkStack: Remove redundant code
Commit 7ce96cb6ac avoids notifications
during destruction by using gtk_widget_in_destruction. Therefore this
code is no longer needed.

This reverts commit 39e7afecb1

https://bugzilla.gnome.org/show_bug.cgi?id=749012
2016-12-20 00:32:15 +01:00
Philip Chimento
76e5fd4d0f GtkApplication: Lack of optional components shouldn't warn
When running uninstalled tests with GtkApplication on an autobuilder with
a fake session bus, warnings will cause the tests to abort. The GNOME
session manager, the Xfce session manager, and the Inhibit portal are all
not needed for normal operation of GTK, so we should not log warnings if
they are not found.

As well as not being present on a fake session bus, it's also not
expected that they'll be present on all platforms.

https://bugzilla.gnome.org/show_bug.cgi?id=774784
2016-12-19 15:20:58 -08:00
Piotr Drąg
a2da4ddceb Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772371
2016-12-19 15:08:10 -05:00
Debarshi Ray
7331735499 flowbox: Don't emit selected-children-changed during destruction
https://bugzilla.gnome.org/show_bug.cgi?id=776012
2016-12-19 18:05:59 +01:00
Debarshi Ray
f5818c594c listbox: Don't emit selected-rows-changed, etc. during destruction
https://bugzilla.gnome.org/show_bug.cgi?id=776012
2016-12-19 18:05:51 +01:00
Debarshi Ray
9791641d43 flowbox: Rename gtk_flow_box_find_child_at_pos for consistency
... with gtk_list_box_get_row_at_y. It would be nice to avoid the
'find' versus 'get' discrepancy since we are planning to expose it as
public API.

https://bugzilla.gnome.org/show_bug.cgi?id=776187
2016-12-19 15:07:53 +01:00
Benjamin Otte
2090219abb scrolledwindow: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
e09fd1eb8a scrolledwindow: Fix rendering
We used to allocate the gadget relative to the view window. We allocate
relative to widget->window now.
2016-12-19 05:36:06 +01:00
Benjamin Otte
e755d9357d notebook: Implement snapshot 2016-12-19 05:36:06 +01:00
Benjamin Otte
3ba5c70028 iconhelper: Implement snapshot 2016-12-19 05:36:06 +01:00
Benjamin Otte
d9619abb11 progressbar: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
1733a3de0e toolbar: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
182dad304a eventbox: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
8900d6cc45 separatortoolitem: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
edf8ffecdf levelbar: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
96a94fc21d frame: Remove the border node
It does weird clipping that
(a) nobody likes
(b) is hard to support in the new rendering world.
So we take the easy way out.

The actual frame is now drawn by the frame node around the label.
2016-12-19 05:36:06 +01:00
Benjamin Otte
795f38b4cc cellview: Remove code to modify the background
GtkCellView has a gadget, so peopl can do all their shenanigans with
CSS.

And the original use case (overriding the background so that the
cellview's GdkWindow shares the background color of the combobox) is
outdated since we have transparent backgrounds.
2016-12-19 05:36:06 +01:00
Benjamin Otte
0eecc6f686 grid: Implement support for CSS border-spacing 2016-12-10 04:32:55 +01:00
Benjamin Otte
404cdd5d02 boxgadget: Implement CSS border-spacing 2016-12-10 04:32:55 +01:00
Benjamin Otte
75c3d193f6 box: Implement support for border-spacing 2016-12-10 04:32:55 +01:00
Benjamin Otte
5aea108802 box: Remove unused member variable 2016-12-10 04:32:55 +01:00
Benjamin Otte
d7148a4718 css: Add "border-spacing" CSS property
It's using a GtkCssPositionValue, even though that name is wrong. But
the functionality of managing 2 lengths is exactly what we want.

Nobody is using this yet.
2016-12-10 04:32:55 +01:00
Benjamin Otte
cb8483b0a6 gtk: Remove unneeded gtk_snapshot_push()/pop() calls 2016-12-09 21:39:43 +01:00
Benjamin Otte
f8932d643d snapshot: Always create an initial node
This way we ensure that there is only one root node and everybody can
append() with impunity.
2016-12-09 21:39:43 +01:00
Timm Bäder
489aee5d00 widget: Remove unused adjust_* vfuncs
Expose them privately to gtksizerequest.c using normal functions
instead.
2016-12-07 18:12:54 +01:00
Timm Bäder
1aa1676d9d menu: Replace button-press-handler with gesture 2016-12-07 18:06:37 +01:00
Timm Bäder
be9adea58e toolbar: Replace button-press-event handler with gesture 2016-12-07 18:06:32 +01:00
Timm Bäder
55b1f231fb linkbutton: Replace button-press-event handler with gesture 2016-12-07 18:06:28 +01:00
Timm Bäder
c4a6c37767 separatortoolitem: Remove button-event/motion-event handlers
These only exist for the window dragging which does not exist anymore
currently. It will be reintroduced later in a form that does not require
these handlers.
2016-12-07 18:06:23 +01:00
Timm Bäder
4c12c4ba02 snapshot: Add annotations to parameters/return values 2016-12-07 18:06:17 +01:00
Timm Bäder
ea22bd9d40 widget: Use gtk_widget_measure to measure widget sizes 2016-12-07 08:19:22 +01:00
Timm Bäder
07a9b202ab widget: Remove _gtk_widget_supports_clip 2016-12-07 08:19:22 +01:00
Timm Bäder
3063d4a5e3 widget: Remove gtk_widget_invalidate_style_context 2016-12-07 08:19:22 +01:00
William Hua
fdec3e8a3f build: add gir depends for GdkX11, GdkWin32, and Gsk on Gdk
https://bugzilla.gnome.org/show_bug.cgi?id=775651
2016-12-05 12:56:50 -05:00
Benjamin Otte
582ea50faa inspector: Add support for displayin the render region
Now I just need a UI designer that makes this look nice...
2016-12-05 15:02:47 +01:00
Benjamin Otte
60567db486 gskrenderer: Add gsk_renderer_begin_draw_frame()
This way, we can hijack the begin/end draw process and do out own
processing before passing it on to GDK.
2016-12-05 15:02:47 +01:00
Benjamin Otte
e950a5190d inspector: Pass the drawing context into the recorder
That way we can capture both the actual changes (clip region) and the
area that was redrawn (render region), which in OpenGL might not be
identical.

Nothing shows the render region yet though...
2016-12-05 15:02:47 +01:00
Benjamin Otte
bddfd7bb41 gdk: Remove all code that only existed because of use_gl
Now that we don't use GL anymore, this code is unnecessary.
2016-12-05 15:02:47 +01:00
Benjamin Otte
e42e27304a gskrenderer: Store the GL context
And use it to create the drawing context with it.

Note that this doesn't yet have any effect and is all infrastructure
preparation work.
2016-12-05 15:02:47 +01:00
Benjamin Otte
332ed7be5b API: Require passing a GLContext to begin_draw_frame()
This is in preparation for requiring explicit passing of GL contexts
when drawing.
2016-12-05 15:02:47 +01:00
Benjamin Otte
633631a47b cssgadget: Compute relative to own allocation, not widget allocation
This would lead to clipped gadgets when the gadget allocation differed
from the widget allocation, like in GtkListBox.
2016-12-05 15:02:46 +01:00
Timm Bäder
ac20c3eb22 frame: Use gtk_widget_measure to measure child sizes 2016-12-04 12:00:46 +01:00
Timm Bäder
7096d6dd28 viewport: Use gtk_widget_measure to measure child sizes
and rewrite the adjustment handling in a orientation-agnostic way.
2016-12-04 12:00:46 +01:00
Timm Bäder
5ee590fbc8 scrolledwindow: measure child widgets using gtk_widget_measure 2016-12-04 12:00:46 +01:00
Timm Bäder
1ab3d32808 revealer: Measure child widget size using gtk_widget_measure 2016-12-04 12:00:46 +01:00
Timm Bäder
7f8d0acfd3 headerbar: measure children using gtk_widget_measure 2016-12-04 12:00:46 +01:00
Timm Bäder
5b05c12780 toolpalette: call set_has_window 2016-12-04 12:00:45 +01:00
Timm Bäder
9f98138ffb printunixdialog: Remove GtkDrawingArea::draw handler
the source file has been updated to use gtk_drawing_area_set_draw_func,
but the draw_cb handler in the ui file is still left.
2016-12-04 12:00:38 +01:00
Benjamin Otte
0d68b22479 stylecontext: Remove a bunch of unneeded headers 2016-12-03 18:15:49 +01:00
Daniel Boles
8efc91c4e0 GtkProgressBar: trivial conditional optimisation
I'd hope the compiler would realise this for us, but let's be explicit.
2016-12-03 16:27:03 +00:00
Timm Bäder
3dac21f20b entry: Refactor get_icon_pixbuf
This way it will only return a pixbuf if the icon helper has a pixbuf.
2016-12-03 13:19:26 +01:00
Timm Bäder
8a543ab23c iconhelper: Ensure the surface used for textures is ARGB32 2016-12-03 13:19:26 +01:00
Timm Bäder
49508ddfdb iconhelper: Remove allocate implementation 2016-12-03 13:19:26 +01:00
Timm Bäder
31ed68dbfa listbox: Fix row hovering
GtkListBox is not a windowed widget anymore so we can't use
gtk_widget_get_window. Just directly access priv->view_window instead to
get the right window.
2016-12-03 13:19:26 +01:00
Timm Bäder
fa4d6e8918 spinbutton: Remove _get_panels 2016-12-03 13:19:26 +01:00
Timm Bäder
36377e9964 Remove gtk_widget_get_preferred_height_and_baseline_for_width
It's just a wrapper around gtk_widget_measure nowadays.
2016-12-03 13:19:25 +01:00
Timm Bäder
8d36fbfbaa togglebutton: Remove unused defines 2016-12-03 13:19:25 +01:00
Debarshi Ray
1f7b03bb2b flowbox: Fix get_child_at_index crash with an invalid index
https://bugzilla.gnome.org/show_bug.cgi?id=775525
2016-12-02 19:17:40 +01:00
Daniel Boles
975a3fa4aa ComboBox: Fix the whitespace fix 2016-12-01 12:59:46 +00:00
Daniel Boles
e723fd6a23 ComboBox: Do not select item before menu realised
For a menu mode CB with wrap_width == 0 and an active item, that item is
selected in gtk_combo_box_menu_popup. Selection causes the MenuShell to
activate and hence take a grab. This was done before the menu was popped
up. A patch distributed in Debian sid - after being proposed on our BZ -
revealed that on the 1st popup of any such ComboBox, within grab_add,
the MenuShell's toplevel's GdkWindow is NULL. This causes a Gdk-CRITICAL
assertion fail on the 1st time opening any such CB, on Debian and if
that patch were merged to GTK+. By selecting after popup, we ensure the
MenuShell is realised before its grab_add and so avoid the critical.

https://bugzilla.gnome.org/show_bug.cgi?id=771242
2016-12-01 12:46:12 +00:00
Daniel Boles
a72dbeba06 ComboBox: Fix whitespace
* Replace tabs for indentation with spaces
 * Remove whitespace at ends of lines
2016-12-01 12:46:12 +00:00
Benjamin Otte
e09b78f7f7 cssshadows: Fix extents computation
Someody busted this code a *lot*.
2016-11-30 23:54:49 +01:00
Benjamin Otte
970f99615e image: Don't translate twice
The animation can pass x/y through to the render_icon() function, so
don't gtk_snapshot_translate() it.
2016-11-30 23:54:49 +01:00
Benjamin Otte
5563841603 gsk: Add gsk_renderer_new_for_window()
and remove gsk_renderer_get_for_display().

This new function returns a realized renderer. Because of that, GSK can
catch failures to realize, destroy the renderer and try another one.

Or in short: I can finally use GTK on Weston with the nvidia binary
drivers again.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-11-30 15:56:00 +01:00
Benjamin Otte
ce98df881f gsk: Change gsk_renderer_realize()
Instead of having a gsk_renderer_set_window() call, pass the window to
realize(). This way, the realization can fail with the wrong window.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-11-30 15:55:45 +01:00
Benjamin Otte
d12c81f177 flowbox: Size gadget realtive to widget->window
This fixes a few clipping issues and syncs code with GtkListBox.
2016-11-30 15:15:08 +01:00
Benjamin Otte
e28d94bc8b listbox: Move the priv->gadget allocation
It used to be relative to the window, now it is relative to the widget.

That is necessary so the snapshot fuction doesn't confuse coordinate
systems.
2016-11-30 15:15:08 +01:00
Matthias Clasen
0037d4d257 Don't leak a pixbuf reference in dnd
https://bugzilla.gnome.org/show_bug.cgi?id=775316
2016-11-29 14:42:35 -05:00
Matthias Clasen
316b24e0a0 Fix reference handling in GtkScaleButton
We were leaking the adjustment, since we confuse ourselves
with a property whose initial value comes out of a template.
Stop doing that.

https://bugzilla.gnome.org/show_bug.cgi?id=775212
2016-11-28 15:04:20 -05:00
Sébastien Wilmet
82b2bf2184 docs: fix a parameter name of GtkEntry::populate-popup
Trivial commit.

The documentation block refers to @widget, not @popup. @widget is a
better name since the type is GtkWidget.
2016-11-26 12:31:34 +01:00
Sébastien Wilmet
e2881d1e4f docs: fix docs of functions to convert layout_index <-> text_index
Trivial commit.

The documentation was swapped. The documentation for the parameters and
the return values is good.
2016-11-26 12:31:34 +01:00
Benjamin Otte
8161f8dcca rendericon: Pass the scale factor when rendeirng textures
Fixes icon rendeirng on hidpi.
2016-11-26 11:52:30 +01:00
Cosimo Cecchi
7ebbd075b9 Adwaita: make rubberband selection work again for libgd apps
libgd views still use the old style class.
2016-11-25 18:55:12 +01:00
Matthias Clasen
4939cfd67e Make gtk-encode-symbolic-svg work for icons with dotted names
We were producing org.symbolic.png from org.gnome.Recipes-symbolic.svg,
which is not useful. Look for the last dot in the original name, to
produce the expected org.gnome.Recipes-symbolic.symbolic.png instead.
2016-11-25 08:55:33 -05:00
Benjamin Otte
d7876bde74 inspector: Remove leftover GDK_PRIVATE_CALL()s 2016-11-24 15:41:19 +01:00
Matthias Clasen
3414f10bad Drop the GDK_PRIVATE_CALL mechanism
We don't need to do this extra complication anymore, since
we're now living inside a single shared library.
2016-11-23 19:31:16 -05:00
Matthias Clasen
1af817e254 inspector: Respect text-scaling-factor value initially
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774893
2016-11-23 19:16:16 -05:00
Florian Müllner
593b75fb69 GtkLabelAccessible: Initialize link before setting parent
Since at-spi-atk commit 96621a5e95 fixed PropertyChange notifications
for AccessibleParent, setting the parent will result in a call to
ref_state_set() which assumes that the object is fully initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=774939
2016-11-23 18:55:42 -05:00
Christian Hergert
c14c9aca34 inspector: ensure controller is a GtkGesture
While GtkEventController implementations today are all GtkGesture, it is
possible to create a GtkEventController manually. This is an extrac check
to ensure we only add gestures to the list.

https://bugzilla.gnome.org/show_bug.cgi?id=774760
2016-11-23 14:03:13 -08:00
Matthias Clasen
3a947fa318 menu: Don't leak check menu items
Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774686
2016-11-23 14:48:17 -05:00
Matthias Clasen
1dded6d633 notebook: Don't leak arrow gadgets
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774743
2016-11-23 14:44:37 -05:00
Matthias Clasen
0e37d67393 text handle: Don't leak adjustments
This can happen if the weak pointer is triggered before the
adjustments are unset. Pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=774790
2016-11-23 13:57:03 -05:00
Benjamin Otte
4850271ae8 API: Remove gtk_cairo_should_draw_window()
The answer is: Yes.
2016-11-23 18:48:38 +01:00
Benjamin Otte
8cb96dec7e window: unrealize renderer before destroying GDK window
We need to unrealize the children manually for that to happen, but so it
goes.

The order is necessary because we want the renderer to still be alive
while children are unrealizing.
2016-11-23 18:47:58 +01:00
Lapo Calamandrei
cb1a349d17 HC: progressbar style fix
Reset styling on the progress node when trough node has the `empty'
styleclass.

See https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-11-23 17:25:18 +01:00
Lapo Calamandrei
5ab18062a3 HC: really use radial-gradient() in place of -gtk-gradient()
Regenerate the css from sass..
2016-11-23 16:39:14 +01:00
Lapo Calamandrei
eb5b8b22e2 Adwaita: progressbar style fix
Reset styling on the progress node when trough node has the `empty'
styleclass.

See https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-11-23 16:14:58 +01:00
Chun-wei Fan
17fe2288e8 gtk/gtkprintoperation-win32.c: Fix for GTK+-4.0 API
We no longer have GtkPlug nor GtkWin32EmbedManifest for GTK+-4.x, and it
is not entirely clear at this point what would be the "best" replacement
for them, but this issue here prevents GTK+-3.89.x building on Windows.

As a result, this is a fast port to avoid using APIs that have been
removed for 4.x, and things seem to work properly (the print.c page
printed).

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-22 11:40:57 +08:00
Emmanuele Bassi
4cbe079767 Use Graphene init macros for compound literals
The Graphene init macros can now be used for compound literals, which
means we need to update our mixed uses.
2016-11-21 16:21:38 +00:00
Gustavo Noronha Silva
8e5e165f79 Fix off by one in check for GtkRoundedBox containing a rectangle
When checking if a rectangle is contained by the rounded box, the code
will refuse a rectangle which is the exact size as the one backing the
rounded box, since it checks for greater or equal width and height.
Check for greater only instead.

https://bugzilla.gnome.org/show_bug.cgi?id=774114
2016-11-21 10:53:11 -02:00
Benjamin Otte
84918c7e6f modules: Add a check for GTK3 symbols
This way, we can warn if GTK2 or GTK3 are linked into libgtk4.
2016-11-20 11:44:19 +01:00
Benjamin Otte
dfd9150a82 build: Don't link against libgtk and libgdk
libgdk is statically linked these days, so if you link against it, all
of its symbols will exist twice: Once in libgtk.so and once in your
binary.
2016-11-20 11:19:32 +01:00
Benjamin Otte
aa084333c8 inspector: Redo recording list
- Make the rows larger
- Display the elapsed time between renderings
- Display if it was a full or a partial redraw
- Add a toggle button to display profiler info
2016-11-20 05:03:18 +01:00
Benjamin Otte
be237dbb5a inspector: Pass the renderer when recording
... and collect the profiler information from the renderer.
2016-11-20 03:54:43 +01:00
Benjamin Otte
32adb31428 inspector: Record a "start" event whenever we start recording 2016-11-20 03:54:43 +01:00
Matthias Clasen
b404ecf294 Drop deprecated gtk_dialog_get_action_area
Add an internal version for the few places where we still need it,
and drop it from everywhere else.
2016-11-19 21:23:17 -05:00
Matthias Clasen
b0303c539c Make unknown window types fatal
This helps gcc to see that there's no point in warning about
gdk_window being used uninitialized.
2016-11-19 21:23:17 -05:00
Benjamin Otte
b93c26f559 render: Refactor background drawing code
We can query the blend mode inside the paint function.
2016-11-19 21:28:18 +01:00
Benjamin Otte
305ea71b97 inspector Reselect bottom row in recorder
When inserting a new recording and the bottommost row was selected,
select the newly added row. This way, you can observe the ongoing
recording.
2016-11-19 20:58:36 +01:00
Benjamin Otte
38f226b5ce render: Propagate snapshot drawing to box shadows
This decouples actual background drawing from shadow drawing in the
snapshot case.

We also now create seperate nodes for shadows vs for backgrounds.
2016-11-19 20:58:36 +01:00
Benjamin Otte
c45f8b1a25 cssshadows: Reengineer API
This way we have an API to query extents per shadow and I want that in
the next patch.
2016-11-19 20:58:36 +01:00
Benjamin Otte
2745c2502f snapshot: Move GtkSnapshot declaration to gtypes.h 2016-11-19 20:58:36 +01:00
Matthias Clasen
8afb655347 Document gtk_menu_place_on_monitor 2016-11-19 13:51:50 -05:00
Matthias Clasen
1bffefce7d Small documentation additions 2016-11-19 13:45:58 -05:00
Matthias Clasen
9bacbb489b Don't confuse gtk-doc
It doesn't like doc comments for non-api.
2016-11-19 13:44:36 -05:00
Matthias Clasen
64a75ec87d Drop docs for no-longer-existing API
Poor gtk-doc gets confused so easily...
2016-11-19 13:36:58 -05:00
Matthias Clasen
b0feee803f Add a since tag 2016-11-19 13:30:02 -05:00
Matthias Clasen
712196c416 Don't confuse gtk-doc
Empty doc comments make gtk-doc complain about undocumented
functions, even though these functions are not supposed to
be documented in the first place.
2016-11-19 12:39:09 -05:00
Matthias Clasen
3dc53dab69 Document ::snapshot vfunc 2016-11-19 12:37:19 -05:00
Matthias Clasen
c9c391bd55 Drop macro wrappers for get_version functions
These are not really useful, and were added long ago
as a clutch for transitioning to the new names.
2016-11-19 12:28:52 -05:00
Benjamin Otte
9dae0a9b00 widgetnode: We never need widget paths anymore
Backwards compat is not necessary in GTK4.
2016-11-19 18:08:35 +01:00
Matthias Clasen
0d1c54b6cc Remove once again, empty doc comments that break the docs
This is just more breakage from introspection ursurping doc
comments. Somebody needs to find a proper solution before this
is brought back.
2016-11-19 12:02:07 -05:00
Matthias Clasen
0392acd875 Reduce the text shadow warnings
They make it hard to see other useful information.
2016-11-19 08:05:42 -05:00
Benjamin Otte
dc634fe6db render: Compute extents correctly
I multiplied matrices the wrong way. Again.
2016-11-19 03:15:51 +01:00
Simon Steinbeiss
a1deb8e459 progressbar: add empty and full classes on trough based on fill-level
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-11-19 03:02:46 +01:00
Matthias Clasen
295066dad8 inspector: Show render node properties 2016-11-18 20:59:10 -05:00
Benjamin Otte
dbfc1d72fc csstransform: Handle matrix3d() 2016-11-18 21:44:25 +01:00
Benjamin Otte
ff4b8512be csstransform: Implement 3D scale and transform matrices 2016-11-18 21:44:25 +01:00
Benjamin Otte
ef6d95879f csstransforms: Parse 3D rotations 2016-11-18 21:44:25 +01:00