Benjamin Otte
3d5173d4ac
gtk: Fix memleaks
...
It turns out, some simple getters - such as
gdk_drawing_context_get_clip() - love copying things before returning
them.
I guess somebody has to burn cycles...
2016-12-20 18:01:10 +01:00
Benjamin Otte
dd1cf1ac0f
css: An opaque background does not allow omitting push_group
...
When the background-clip of the background is smaller than the
background-clip of blended images, not pushing a group is wrong.
Test testing exactly that included.
2016-12-20 18:01:10 +01:00
Benjamin Otte
23e35706b4
gsk: Add support for rounded clip rectangles
...
Also add support to GtkSnapshot, so people can push rounded clips.
2016-12-20 18:01:10 +01:00
Benjamin Otte
f96f16899d
roundedbox: Remove _gtk_rounded_box_path()
...
Use gsk_rounded_rect_path() instead.
That's a private GSK function, be we can just include its header.
2016-12-20 18:01:10 +01:00
Benjamin Otte
fa9b0f9965
roundedbox: Remove _gtk_rounded_box_move()
...
Use gsk_rounded_rect_offset() instead.
2016-12-20 18:01:10 +01:00
Benjamin Otte
e26f84fca0
gtk: Remove GtkRoundedBox struct
...
Use GskRoundedRect instead.
2016-12-20 18:01:10 +01:00
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
Benjamin Otte
d52fcd914c
csstransform: Convert to use graphene_matrix_t
...
Pre-work to use 3D-transforms.
2016-11-18 21:44:25 +01:00
Matthias Clasen
0a75bb4353
Work towards a clean docs build
...
Remove various no-longer-existing functions from the sections
file, and exclude more private headers, etc.
2016-11-18 14:43:34 -05:00
Matthias Clasen
0311a1883c
snapshot: Name api parameters consistently
...
gtk-doc gets upset otherwise.
2016-11-18 07:57:10 -05:00
Matthias Clasen
95c13ee471
Document GtkSnapshot
...
This is just some initial documentation, more detail needed.
2016-11-18 07:43:39 -05:00
Benjamin Otte
dd6fb87443
printunixdialog: Use new drawing area API
2016-11-18 06:40:53 +01:00
Benjamin Otte
b0f392534f
coloreditor: Don't draw a background on boxes
...
Boxes know how to draw backgrounds these days.
2016-11-18 06:40:53 +01:00
Benjamin Otte
5940625e9e
drawingarea: Add gtk_drawing_area_set_draw_func()
2016-11-18 06:40:53 +01:00
Benjamin Otte
41d1e1fea8
drawingarea: Add content-width and content-height properties
...
People should use these instead of gtk_widget_set_size_request().
2016-11-18 06:40:53 +01:00
Benjamin Otte
100ac17505
drawingarea: Clean up
...
No need to send configure events anymore and this should be a no-window
widget.
2016-11-18 06:40:53 +01:00
Matthias Clasen
39e3b3a483
style context: Don't leak a widget path
...
Found by valgrind.
2016-11-17 20:22:42 -05:00
Benjamin Otte
efa1c6cbd5
widget: Add a defualt snapshot vfunc
...
Just to avoid having to do NULL checks when calling
widget_class->snapshot. We were crashing with drawing areas who don't
have a draw or a snapshot vfunc (woot!).
2016-11-18 00:47:56 +01:00
Benjamin Otte
9a06b0fd5f
widget: Fix math screwups in clip calculation
...
We need so subtract the allocation from the clip to get the clip offset,
not the other way around.
This was screwing in particular with marks on GtkScale, because GtkScale
mark clip computation is broken and always returns (0,0) which makes
scales have a waaaaay too large clip.
But that's another bug.
2016-11-17 23:16:14 +01:00
Matthias Clasen
214eb5860d
placeview: Don't leak the file enumerator
...
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774634
2016-11-17 13:50:25 -05:00
Matthias Clasen
0cec768b54
entry: Fix input window position for icons
...
This makes the icon in the placesview address entry and
in widget-factory's progress entry work again.
2016-11-17 12:04:35 -05:00
Timm Bäder
55fda57c44
filechooserwidget: Forward file filter to entry
...
And in the entry, apply the currently used filter as a second step to
the completion items.
https://bugzilla.gnome.org/show_bug.cgi?id=773007
2016-11-17 15:42:25 +01:00
Timm Bäder
f4929360aa
sizerequest: rename _compute_size_for_orientation to _measure
...
They have the exact same parameters and gtk_widget_measure did
unnecessary work before. Also better stack traces!
2016-11-17 15:42:25 +01:00
Matthias Clasen
5b3b111260
GtkFileChooser: Make local-only default to FALSE
...
There is no good reason anymore to default to TRUE, and this
default only makes applications miss out on useful functionality.
2016-11-17 09:06:57 -05:00
Matthias Clasen
2f197ac0c2
Revert "GtkFileChooser: Make local-only default to FALSE"
...
This reverts commit 0bc79910e0
.
2016-11-17 09:05:47 -05:00
Matthias Clasen
0bc79910e0
GtkFileChooser: Make local-only default to FALSE
...
There is no good reason anymore to default to TRUE, and this
default only makes applications miss out on useful functionality.
2016-11-17 09:02:29 -05:00
Ondrej Holy
16bce17168
gtkplacesview: Add example of IPv6 address in guidance
...
Square brackets are mandatory for IPv6 addresses. Add example of IPv6
address in the guidance to make it obvious.
https://bugzilla.gnome.org/show_bug.cgi?id=756570
2016-11-17 08:15:40 -05:00
Benjamin Otte
ab60cbd86a
snapshot: Implement gtk_snapshot_clips_rect()
...
And use this to cull widgets and gadgets that are completely outside the
clip region.
A potential optimization is to apply this clip region to cairo contexts
created with gtk_snapshot_append_cairo_node(), but for that we'd need to
apply the inverse matrix to the clip region, and that causes rounding
errors.
Plus, I hope that cairo drawing becomes exceedingly rare so it won't be
used for the whole widget factory like today (which might also explain
why no culling happens in the widget factory outside the header bar.
2016-11-17 03:33:50 +01:00
Benjamin Otte
28b32d336f
snapshot: Pass the clip region to the snapshot
2016-11-17 02:14:10 +01:00
Benjamin Otte
7493f90662
snapshot: Add GtkSnapshotState
...
Essentially copies cairo_gstate_t.
This is in preparation for attaching more information to the snapshot.
2016-11-17 01:55:26 +01:00
Benjamin Otte
5dfe788e9e
snapshot: Fix graphene misunderstandings
...
The equivalent to cairo_matrix_multiply (a, b, c) is
graphene_matrix_multiply (c, b, a).
graphene_matrix_multiply (a, b, c) may not be called with b and c being
the same matrix.
2016-11-17 01:05:15 +01:00
Benjamin Otte
6d9725f7fd
snapshot: Add infrastructure to snapshot CSS images
...
Use this infrastructure to render builtin images. Which means from now
on, GtkCheckbutton, GtkSpinner and a few others use snapshots.
2016-11-16 20:51:53 +01:00
Benjamin Otte
c22a9a03f9
renderbackground: Remove unused functions
2016-11-16 19:31:47 +01:00
Benjamin Otte
bcf70e3a03
API: Remove everything relating to "grip"
...
Grips have long been unused in GTK, so remove all support for them.
This removes the GTK_STYLE_CLASS_GRIP and the special
gtk_render_handle() code for drawing those grips.
2016-11-16 19:27:43 +01:00
Benjamin Otte
56e11f057c
API: Remove gtk_render_extension()
...
This is long-gone drawing API.
2016-11-16 18:36:10 +01:00
Benjamin Otte
40565fb030
gsk: Rework GskTexture
...
We do no longer bind textures to a renderer, instead they are a way for
applications to provide texture data.
For now, that's it. We've reverted to uploading it from scratch every
frame.
2016-11-16 17:36:33 +01:00
Benjamin Otte
f728f33382
container: ensure we only append a single node
...
The snapshot vfuncs must only append at most a single node,
otherwise things are going to break if the widget is the root node.
Unfortunately there is no code that can check this in a generic fashion,
so we'll have to debug this on a case-by-case basis.
2016-11-15 22:39:26 +01:00
Benjamin Otte
2e9ff11c85
snapshot: push/pop mismatch is critical
...
This is broken code that needs to be fixed right now.
2016-11-15 22:39:05 +01:00
Benjamin Otte
b8710d8962
widget: Remove get_render_node() vfunc
2016-11-15 17:49:19 +01:00
Benjamin Otte
313a708006
snapshot: Convert inspector's RenderNodeView
2016-11-15 17:49:19 +01:00
Benjamin Otte
e2fb970889
container: Remove get_render_node() support API
...
It's unused now.
2016-11-15 17:49:19 +01:00
Benjamin Otte
e8381f84d6
snapshot: Convert GtkPopover
2016-11-15 17:49:19 +01:00
Benjamin Otte
475cffd7f8
gadget: Remove gtk_css_gadget_get_render_node()
...
It's unused now that we can snapshot.
2016-11-15 17:49:19 +01:00
Benjamin Otte
ada70f4872
snapshot: Convert GtkIcon
2016-11-15 17:49:19 +01:00
Benjamin Otte
d38cf9fee2
snapshot: Convert GtkExpander
2016-11-15 17:49:19 +01:00
Benjamin Otte
82eb223c58
Revert "GtkFrame: Convert to indirect rendering"
...
This reverts commit a0b2b3745f
.
Frames cannot be rendered by GSK yet, because they do clipping.
2016-11-15 17:49:19 +01:00
Benjamin Otte
9c1da58ad1
snapshot: Convert GtkSeparator
2016-11-15 17:49:19 +01:00
Benjamin Otte
47a82640a8
Revert "Covert GtkOverlay to indirect rendering"
...
This reverts commit fd4a1cdad6
.
GtkOverlay uses clipping and render nodes can't clip yet.
2016-11-15 17:49:19 +01:00
Benjamin Otte
30e0bbeaaa
snapshot: convert GtkListBox
2016-11-15 17:49:19 +01:00
Benjamin Otte
150f75af66
snapshot: Convert GtkFlowBox
2016-11-15 17:49:19 +01:00
Benjamin Otte
a2b1aef6bd
Revert "paned: Convert to indirect rendering"
...
This reverts commit ba9193fc81
.
Paneds can do indirect rendering yet as we need clipping support first.
2016-11-15 17:49:19 +01:00
Benjamin Otte
dad8703e03
snapshot: Convert GtkSpinner
2016-11-15 17:49:19 +01:00
Benjamin Otte
0cf9f70ccd
snapshot: Convert box gadget
...
Makes spinbuttons have text again!
2016-11-15 17:49:19 +01:00
Benjamin Otte
703d80eac0
window: Unrealize renderer last
...
We want to unrealize the renderer only after all widgets have been
unrealized. Otherwise, the widgets cannot release rendering resources
like textures.
2016-11-15 17:49:19 +01:00
Benjamin Otte
4b8b06bb08
image: Invalidate icon helper when unrealizing
...
This frees up any cached surfaces and textures in the iconhelper,
ensuring that the renderer can release its texture data.
2016-11-15 17:49:19 +01:00
Benjamin Otte
c0aa065ac1
snapshot: Convert GtkImage and GtkIconHelper
...
Adds a bunch of new APIs to render textures with theming.
FIXME: Cannot draw shadows for textures.
2016-11-15 17:49:19 +01:00
Benjamin Otte
92e6b3a000
snapshot: Port GtkHeaderBar
2016-11-15 17:48:45 +01:00
Benjamin Otte
55de4e7140
snapshot: Convert GtkFixed
2016-11-15 17:48:45 +01:00
Benjamin Otte
9b6dfa83e2
snapshot: Convert GtkComboBox
2016-11-15 17:48:45 +01:00
Benjamin Otte
349f55f2fe
snapshot: Convert GtkLabel and GtkAccelLabel
...
Also adds gtk_snapshot_render_insertion_cursor().
2016-11-15 17:48:45 +01:00
Benjamin Otte
ab47479045
snapshot: Convert GtkButton and subclasses
2016-11-15 17:48:45 +01:00
Benjamin Otte
4c9033b62d
snapshot: Port GtkActionBar
2016-11-15 17:48:45 +01:00
Benjamin Otte
8c77b6f7f1
snapshot: Convert GtkButtonBox
2016-11-15 17:48:45 +01:00
Benjamin Otte
cc1b422f64
snapshot: Convert GtkGrid
2016-11-15 17:48:45 +01:00
Benjamin Otte
64e802c441
snapshot: Convert entry and spinbutton
2016-11-15 17:48:45 +01:00
Benjamin Otte
8ac7918e0b
snapshot: convert GtkBox
2016-11-15 17:48:45 +01:00
Benjamin Otte
e3b1c9f1cd
snapshot: Port to GtkSwitch
...
Included is the addition of gtk_snapshot_render_layout(), which is meant
to replace gtk_render_layout().
2016-11-15 17:48:45 +01:00
Benjamin Otte
da207c9fdd
snapshot: Add a snapshot function to GtkCssCustomGadget
2016-11-15 17:48:45 +01:00
Benjamin Otte
4e06d8f73c
snapshot: Add gtk_css_gadget_snapshot()
...
Including a snpahsot() vfunc, wee!
2016-11-15 17:48:45 +01:00
Benjamin Otte
ae2477b1bc
container: Add snapshot() implementation
...
Note that this implementation does not respect GDK windows at all. If
your widget requires respecting them, you should write your own
snapshot implementation and not chain up.
2016-11-15 17:48:45 +01:00
Benjamin Otte
2cd9e5170e
widget: Add more sophisticated detection of rendering method
...
We now look at which of get_render_mode, draw or snapshot vfuncs is the
latest to have been overwritten in the class tree and then use that one.
This allows GtkContainerClass and GtkBinClass to override all of them
for without screwing things up.
2016-11-15 17:48:45 +01:00
Benjamin Otte
79d2d0e40d
snapshot: Add gtk_snapshot_render_background()
...
and gtk_snapshot_render_frame() to be direct replacements for the
old gtk_render_*() functions.
Use them to replace Cairo usage completely in gtk_window_snapshot().
2016-11-15 17:48:45 +01:00
Benjamin Otte
9006e697fb
flowbox: children per line may not be 0
2016-11-15 17:48:45 +01:00
Benjamin Otte
d1fec79c00
snapshot: Completely reengineer API
...
We now try to emulate cairo_t:
We keep a stack of nodes via push/pop and a transform matrix.
So whenever a new node is added to the snapshot, we transform it
by the current transform matrix and append it to the current node.
2016-11-15 17:48:45 +01:00
Benjamin Otte
bb9626dc29
window: Implement snapshot()
2016-11-15 17:48:45 +01:00
Benjamin Otte
b1154be1c4
widget: Add GtkWidgetClass.snapshot() vfunc
...
Does the same thing as the render vfunc, only that it uses a different
prototype.
2016-11-15 17:48:45 +01:00
Benjamin Otte
93cbba6c3e
gtk: Add gtk_widget_snapshot()
...
It's functionally equivalent to gtk_widget_get_render_node() but uses a
GtkSnapshot argument to carry the state.
2016-11-15 17:48:45 +01:00
Matthias Clasen
d462c31233
entry: Avoid recursion in gtk_entry_ensure_layout
...
This was unintentional, and lead to a memory leak.
2016-11-14 15:17:41 -05:00
Lauri Kasanen
8b75268d1c
recent-manager: Fix a memory leak caused by "recent-manager: Add a limit to the list's size"
...
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-14 14:26:34 -05:00
Matthias Clasen
34e26017e3
appchooser: Plug a memory leak
...
We were not dropping the reference that the model gives us.
https://bugzilla.gnome.org/show_bug.cgi?id=774352
2016-11-14 14:19:58 -05:00
Olivier Fourdan
03b8a8a880
gtkstack: reorder size_allocate and move_window
...
Unlike other container widgets, GtkStack would allocate its children
prior to moving its windows, which might prevent further valid size
allocation signals to be emitted.
Re-order the size allocation of child widgets to be performed after
moving the GtkStack windows.
Thanks to Owen for spotting the real issue here.
https://bugzilla.gnome.org/show_bug.cgi?id=767713
2016-11-14 12:24:18 +01:00
Matthias Clasen
2520662d13
Allow replacing input file in gtk-builder-tool simplify
2016-11-12 22:33:01 -05:00
Timm Bäder
c944bf7330
Call gtk_widget_set_has_window for missing windowed widgets
2016-11-12 21:48:23 +01:00
Timm Bäder
4e445e8e53
window: Properly propagate for_size=-1
2016-11-12 20:37:30 +01:00
Timm Bäder
0d88fe65ba
stack: Use gtk_widget_measure
2016-11-12 20:37:22 +01:00
Timm Bäder
95eed97586
listbox: Use gtk_widget_measure
2016-11-12 20:37:18 +01:00
Timm Bäder
9a0513d911
window: Use gtk_widget_measure
2016-11-12 20:37:14 +01:00
Timm Bäder
997fd3c81e
grid: Use gtk_wiget_measure
2016-11-12 20:37:10 +01:00
Timm Bäder
26746c8369
toolitemgroup: Remove style properties
...
Replace them with their default values
2016-11-12 08:10:02 +01:00
Timm Bäder
fdc0c6426b
combobox: Remove appears-as-list style property
...
Remove all the code handling the appears-as-list=TRUE case.
2016-11-12 08:10:02 +01:00
Timm Bäder
5e06701f53
treeview: Remove style properties
...
Replace them with the Adwaita default values
2016-11-12 08:09:58 +01:00
Lauri Kasanen
0d364173f6
recent-manager: Add a limit to the list's size
...
This fixes a DOS where any app can cause all running gtk apps
to use arbitrary amounts of memory.
Originally reported against mate-panel, where running a big slideshow
in eye-of-mate caused increasing RAM usage in mate-panel.
v2: Hardcode the value
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-10 17:09:45 -05:00
Matthias Clasen
3c27774a5d
places sidebar: Don't leak a reference
...
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185
2016-11-10 15:16:05 -05:00
Matthias Clasen
5e19e06dcc
Fix a copy-paste error
...
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185#c3
2016-11-10 15:07:08 -05:00
Matthias Clasen
547970b0bc
headerbar: Don't leak widgets
...
We were not properly freeing separators that we end up
not using.
https://bugzilla.gnome.org/show_bug.cgi?id=774066
2016-11-10 15:03:35 -05:00
Matthias Clasen
c7d119614f
spinbutton: Fix some gadget handling issues
...
We were not adding the down_button gadget to the parent,
and we were not unreffing the button gadgets.
https://bugzilla.gnome.org/show_bug.cgi?id=774046
2016-11-10 14:46:21 -05:00
Thibaut Girka
641b42f9f5
Fix loading cached compose tables
...
https://bugzilla.gnome.org/show_bug.cgi?id=773916
2016-11-10 14:32:59 -05:00
Gustavo Noronha Silva
942e904bcc
cssshadowvalue: scale the blur surface by the same factor as the target
...
Making sure the surfaces are using the same scale factor makes it more
likely a fast path will be used when pixman gets involved, as pointed
out by Benjamin Otte.
https://bugzilla.gnome.org/show_bug.cgi?id=772075
2016-11-10 16:47:13 -02:00
Carlos Garcia Campos
c836be0508
printing: Do not truncate job names in GtkPrintOperation
...
We are currently truncating job names to 255 bytes, because that's the
maximum allowed length of job-name attribute in CUPS. This is a CUPS
limitation that GtkPrintOperation shouldn't need to know, and it
shouldn't affect other backends, that might have other limitations or
even no limitation at all. This has another side effect, that what you
set as GtkPrintOperation:job-name could be different to what you get if
the property is truncated, this is not documented in
gtk_print_operation_set_job_name(). So, I think the job name should be
truncated by the CUPS backend, right before setting the job-name
attribute.
https://bugzilla.gnome.org/show_bug.cgi?id=774097
2016-11-10 16:57:30 +01:00
Matthias Clasen
7b2313a6df
Avoid criticals in gtk_image_get_render_node
...
These nodes can be NULL, we need to handle that.
2016-11-10 08:26:37 -05:00
Florian Müllner
38a8e4ee7c
wayland: Set startup ID from GApplication platform data
...
The GApplication platform data may contain a startup ID that on X11
is used to set the startup notification ID when activated. Do the
same on the wayland backend to make startup notifications work for
DBus-activated applications where the DESKTOP_STARTUP_ID environment
variable is not set.
https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-09 14:18:14 -05:00
Benjamin Otte
1259a489f2
iconhelper: Add support for GskTexture
...
... and use that in GtkImage.
2016-11-08 20:31:34 +01:00
Benjamin Otte
c16a7d96b8
range: Don't leak pointers to discarded gadgets
2016-11-08 02:32:40 +01:00
Benjamin Otte
a54db5adcd
render: Draw shadows outside of potential push_group() call
...
Before, the shadows were clipped.
2016-11-08 02:32:29 +01:00
Benjamin Otte
f9da4f0270
render: Clip the correct rectangle
...
We translated before.
2016-11-08 02:32:29 +01:00
Lapo Calamandrei
8d212ae5c2
Adwaita: tweak radial-gradient()'s
...
radial-gradient()'s are behaving, hence simplify the css.
2016-11-07 23:15:56 +01:00
Matthias Clasen
2a5a94b260
css: Improve spec compliance of the radial gradient parser
...
The spec says:
"If <shape> is omitted, the ending shape defaults to a circle if the <size>
is a single <length>, and to an ellipse otherwise."
Make it so.
2016-11-07 15:40:21 -05:00
Matthias Clasen
1410031e57
Drop support for symbolic colors
...
-gtk-gradient was the last internal user of this code, so
we can drop it now.
2016-11-07 14:46:41 -05:00
Matthias Clasen
d674e9c8fa
Drop support for -gtk-gradient
...
The standard CSS radial-gradient can be used instead, and Adwaita
and HighContrast have been ported over.
2016-11-07 14:46:41 -05:00
Matthias Clasen
aceba7484f
css: Avoid a crash while parsing radial gradients
...
has_size does not imply that sizes[0] is != NULL.
2016-11-07 14:46:15 -05:00
Lapo Calamandrei
5af1e87f59
HC: use radial-gradient() in place of -gtk-gradient().
2016-11-07 18:22:28 +01:00
Lapo Calamandrei
c4a4fe32ea
Adwaita: no more -gtk-gradient(), really
...
the undershoot is drawn with a radial-gradient now.
2016-11-07 18:12:42 +01:00
Benjamin Otte
3b93773add
API: gdk: Add gdk_window_new_temp()
...
Your one stop shop for all those nasty hidden input-only windows.
2016-11-07 01:03:17 +01:00
Benjamin Otte
24d0baec38
API: gdk: Add gdk_window_new_popup()
...
... and use it.
2016-11-06 23:47:56 +01:00
Benjamin Otte
13d8ac83ee
range: Use gdk_window_new_input()
2016-11-06 23:46:44 +01:00
Benjamin Otte
b30afff511
API: wayland: Add gdk_wayland_window_new_subsurface()
...
... and use it instead of gdk_window_new().
2016-11-06 21:36:43 +01:00
Benjamin Otte
87f07bac6b
API: gdk: Add gdk_window_new_toplevel()
...
... and use it in GTK.
2016-11-06 17:40:59 +01:00
Benjamin Otte
7a6cab14eb
gdkwindow: Remove GdkWindowAttr.type_hint
...
Instead, let the callers call gdk_window_set_type_hint(). Which is
surprsingly what every backend did.
2016-11-06 16:22:21 +01:00
Benjamin Otte
e0600346e2
scrolledwindow: Turn into no-window widget
2016-11-06 15:50:26 +01:00
Benjamin Otte
b7a72224e1
listbox: Turn into no-window widget
2016-11-06 14:52:56 +01:00
Benjamin Otte
2f8df5237f
flowbox: Turn into no-window widget
2016-11-06 14:41:07 +01:00
John Ralls
5416db16f3
Add some new function prototypes to gtkquartz.h.
...
Fixes compile errors (-Werror,-Wmissing-prototypes).
2016-11-05 15:08:59 -07:00
Lapo Calamandrei
f4c6994e57
Adwaita: no more -gtk-gradient()
...
the only place where it was used was the `needs attention` dot
which is now drawn using radial-gradient().
2016-11-05 16:16:37 +01:00
Timm Bäder
a5b967ed31
menu: Properly clip child menuitems
...
Now that GtkMenu isn't a windowed widget anymore, we have to
differentiate between the (0, 0) of the cairo_t and the position of
priv0->view_window.
2016-11-05 13:39:41 +01:00
Timm Bäder
fdc24c7505
entry: Fix coordinates after rendernode conversion
...
Ease the transition by removing the text_area and frame vfuncs which are
unused inside GTK+.
2016-11-05 11:56:37 +01:00
Timm Bäder
f483d931ec
spinbutton: Convert to indirect rendering
2016-11-05 11:56:36 +01:00
Timm Bäder
932b9acb39
Revert "Revert "Convert GtkEntry to indirect rendering""
...
This reverts commit f4fa111e32
.
2016-11-05 11:56:36 +01:00
Timm Bäder
3b970f4555
button: Remove _get_event_window
2016-11-05 11:56:36 +01:00
Timm Bäder
846cf681e8
Remove gtk_widget_set_mapped
...
Let all the remaining callers chain up.
2016-11-05 11:56:36 +01:00
Timm Bäder
34626eaa16
notebook: use gesture for clicks
...
Instead of GtkWidget's buton-press-event/button-release-event
2016-11-05 11:56:33 +01:00
Benjamin Otte
079f0427cb
fixed: Port to GskRenderNode
...
The fishbowl demo uses this.
2016-11-05 03:35:46 +01:00
Benjamin Otte
9707f4d3b3
API: gdk: Remove title from gdk_window_new()
...
Use gdk_window_set_title() afterwards instead.
2016-11-05 03:32:27 +01:00
Benjamin Otte
b9955cfff1
API: gdk: Remove override_redirect flag from GdkWindowAttr
...
When you want an override-redirect window, you create it that way by
creating a GDK_WINDOW_TEMP window.
2016-11-05 03:32:27 +01:00
Philip Withnall
1dbdbecd39
gtkstylecontext: Clarify memory allocation behaviour of getters
...
It wasn’t clear that gtk_style_context_get[_valist]() behave like
g_object_get() — i.e. pointer-based types are returned newly-allocated.
Clarify that.
https://bugzilla.gnome.org/show_bug.cgi?id=773954
2016-11-05 00:25:25 +00:00
Matthias Clasen
f4fa111e32
Revert "Convert GtkEntry to indirect rendering"
...
This reverts commit 3656c9f94c
.
Still causes to many unresolved drawing issues.
2016-11-04 13:22:48 -04:00
Georges Basile Stavracas Neto
8507083928
levelbar: update css nodes even when no offset value is found
...
GtkLevelBar supports adding custom offsets as style classes, and they
are applied whenever the :value property matches. The current code,
however, only updates any CSS nodes when an offset is found, causing
it to not update when a discrete value changes but no custom offset
is added.
Fix that by always updating the CSS nodes.
https://bugzilla.gnome.org/show_bug.cgi?id=773799
2016-11-04 12:38:21 -04:00
Matthias Clasen
2c26f0cae4
Complete the privatization of GtkTextAttributes
...
This was not quite complete, as gtktextattributes.h was still
being included in public headers.
https://bugzilla.gnome.org/show_bug.cgi?id=773903
2016-11-04 12:05:52 -04:00
Benjamin Otte
6c6359df4f
menubar: We don't need an input window
...
Input is handled by the menuitems completely.
2016-11-03 21:29:07 +01:00
Benjamin Otte
a178258a2a
docs: Remove vfunc that doesn't exist anymore
2016-11-03 20:33:33 +01:00
Lapo Calamandrei
993f867744
Adwaita: correctly style headerbars in a stack
...
corners are correctly rounded now. Stacked splitted headerbars are
not supported yet though.
2016-11-03 14:04:32 -04:00
Ernestas Kulik
3885e85f77
popover: pop down when pressing escape
...
Simply hiding the popover may introduce inconsistencies in application
behavior, since popping up/down is the usual use case.
https://bugzilla.gnome.org/show_bug.cgi?id=773885
2016-11-03 15:46:04 +02:00
Chun-wei Fan
53077f15d8
autotools: Update MSVC gir build script generation
...
Now that GTK+ is built as a single DLL, and the .lib that is built is
gtk-4.lib, we need to update the autotools sections in generating the
NMake Makefile snippets so that we can have the correct commands and flags
for building the .gir files, which will all now link to gtk-4-vsXX.dll (or
so).
2016-11-03 18:00:03 +08:00
Chun-wei Fan
abef8d4860
Windows: Update code for monolithic GTK DLL
...
Now that the autotools build folded the GDK/GSK bits into the main GTK+
DLL, there are some updates that need to be done for this. We need to:
-Fold the DllMain() of GDK-Win32 into the main GTK+ DllMain(), as we need
the HINSTANCE to register the window. We can't have two DllMain()'s in a
single DLL.
-Remove the GDK rc(.in) files, as that is not used anymore. Make the GTK+
.rc(.in) file load the gtk.ico GTK+ logo file instead so that we still
get the GTK+ logo for the application icon by default. Update the
autotools build files as well.
-Revert commit b9f9980
as LRN pointed out in comment 25 in bug 773299, as
GTK+ is now a monolithic DLL, and we ought not to export this private
function.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-11-03 16:55:35 +08:00
Benjamin Otte
c9a313a125
revealer: Port to no-window widget
2016-11-03 03:00:15 +01:00
Benjamin Otte
acd801000c
textview: Convert to no-window widget
2016-11-03 03:00:15 +01:00
Benjamin Otte
6c3d1fba78
iconview: Turn into no-window widget
2016-11-03 03:00:15 +01:00
Benjamin Otte
7e9796568d
colorplane: Port to be a no-window widget
2016-11-03 03:00:15 +01:00
Benjamin Otte
0508526658
colorswatch: Readd accidentally removed call
2016-11-03 01:15:08 +01:00
Benjamin Otte
d818f3fcd4
viewport: Turn into no-window widget
...
While doing so, get rid of the GdkWindow instead of keeping it.
2016-11-02 22:00:29 +01:00
Benjamin Otte
bb8b24da47
menu: Don't set widget->window
...
Instead, create an input window for the menubar and omit the window for
the menu itself.
2016-11-02 22:00:29 +01:00
Timm Bäder
633a93f418
widget: Remove outdated comment
...
gtk_widget_override_color is no more.
2016-11-02 18:40:00 +01:00
Timm Bäder
a7efe10ef8
widget: Remove unused visibility-notify-event
2016-11-02 18:40:00 +01:00
Timm Bäder
773c16076b
widget: Remove state-flags leftovers
2016-11-02 18:40:00 +01:00
Benjamin Otte
6dddf0447e
css: Fix radial-gradient() color stop computation
...
The copy/paste from the linear gradient code had an error.
2016-11-02 15:19:49 +01:00
Benjamin Otte
32a5729d18
gtk: Chain up in realize()
...
... instead of copy/paste from gtk_widget_real_realize.
2016-11-02 07:16:08 +01:00
Benjamin Otte
b0a5e8764c
widget: Insist on widgets calling gtk_widget_set_has_window()
...
This way, we can grep the code for the bad widgets that set this to
TRUE and fix them.
2016-11-02 06:54:57 +01:00
Benjamin Otte
5e07a31d2b
gtk: Call gtk_widget_set_has_window() on every widget
...
Even if we just set it to the value it already had.
2016-11-02 06:54:57 +01:00
Benjamin Otte
8ea1157d38
treeview: Don't use gtk_widget_get_allocaton()
...
Use gtk_widget_get_allocated_width()/height() instead.
2016-11-02 06:54:57 +01:00
Matthias Clasen
2d14217cd7
inspector: Cosmetic improvements to the recorder
2016-11-01 22:06:25 -04:00
Matthias Clasen
793f843b08
check button: Update for new box gadget functionality
...
The box gadget now does the render node conversion for
all its children, so we have less work to do.
2016-11-01 14:29:25 -04:00
Matthias Clasen
18f321df94
expander: Update for new box gadget functionality
...
The box gadget now does the render node conversion for
all its children, so we have less work to do.
2016-11-01 14:29:25 -04:00
Matthias Clasen
953c7ba6be
box gadget: Implement get_render_node vfunc
...
This implements get_render_node in the obvious way.
2016-11-01 14:29:25 -04:00
Matthias Clasen
68cc1412e5
container: Add a private api for render node propagation
...
Add a function that propagates a render node for a single
child. This will be used in the box gadget to handle widgets.
2016-11-01 14:29:25 -04:00
Matthias Clasen
30a56acc7d
gadget: Add a get_render_node vfunc
...
This will let us do box gadgets like we do containers.
2016-11-01 14:29:25 -04:00
Matthias Clasen
3656c9f94c
Convert GtkEntry to indirect rendering
...
Warning! This unveils some positioning issue with the secondary icon.
2016-11-01 14:29:25 -04:00
Matthias Clasen
35209f098b
Stop supporting GdkColor in text buffer serialization
...
GdkColor is going away soon.
2016-11-01 13:58:10 -04:00
Matthias Clasen
17a061b8da
Drop the settings color parser
...
We have no color-valued settings anymore.
2016-11-01 13:58:10 -04:00
Matthias Clasen
6e178aede2
Use GdkRGBA for text attributes
...
Now that GtkTextAttributes is private, we can clean this struct
up a bit. The first step is to switch from GdkColor to GdkRGBA,
and adapt all users.
2016-11-01 13:58:10 -04:00
Matthias Clasen
745c348ff8
Make GtkTextAttributes private
...
This is a problematic struct, and giving direct access to it
has kept us from making improvements to GtkTextView. Drop it
from the public API, together with the auxiliary APIs. If
it turns out that this functionality is needed, we should add
individual getters.
2016-11-01 13:58:10 -04:00
Benjamin Otte
72a9c53262
inspector: Add a button to clear all recordings
...
Clears the recordings list, and even better: Frees all your memory.
2016-11-01 18:34:40 +01:00
Benjamin Otte
e02ff7c064
inspector: Collect statistics for unclassable types
...
I want to know how many GskRenderNodes I have!
2016-11-01 18:34:40 +01:00
Benjamin Otte
3741e6906e
inspector: Require toggling on/off of recording
...
This way, we don't eat up all your memory every time you start the
inspector.
2016-11-01 18:34:40 +01:00
Benjamin Otte
4673318028
inspector: Add list of render nodes to recorder
...
And make it possible to view the actually selected node in the view.
2016-11-01 18:34:40 +01:00
Benjamin Otte
4265c0e5b0
inspector: Next step in the recorder view
...
We now record all render operations and display them.
Warning: This is very brute force, you can't clear the recordings or
turn recording off. And this thing easily records 25MB per recorded
frame, so be careful to not run out of memory and get your browser
killed. ;)
2016-11-01 18:34:40 +01:00
Benjamin Otte
e6f711a94a
inspector: Add more infrastructure
...
This one introduces the Recording object which is essentially a single
instance of something that happened.
The RenderRecording is an instance of an actual rendering operation.
2016-11-01 18:34:40 +01:00
Benjamin Otte
98a500a434
inspector: Add outline for a new "recorder" tab
2016-11-01 18:34:40 +01:00
Sébastien Wilmet
59a9eda5ae
docs: fix typos in GtkMenuShell
2016-11-01 18:28:09 +01:00
Benjamin Otte
a0e63b8a07
rendernode: Require passing a renderer to get_draw_context()
...
This is in preparation of making render nodes independent of the
renderer, so that they can be rendered multiple times with different
renderers.
2016-11-01 16:32:26 +01:00
Benjamin Otte
e96c485afa
widget: Create render node with correct bounds
...
We want a render node where (0,0) is the top left of the widget.
However, we need to account for the clip origin not matching the
allocation origin.
2016-11-01 03:59:37 +01:00
Benjamin Otte
8854279e2a
treeview: Clip before translating
...
We want to clip invalidations to the bin window, not the treeview
itself.
2016-11-01 03:51:48 +01:00
Benjamin Otte
b40aeb7ab4
treeview: Clip to bin window size when drawing bin window
...
This ensures that the drawing does not extend the actually drawn area.
It also ensures that our math is sane, because the math assumes the clip
area cannot extend the window. After all, before GTK4 it always was like
that.
Fixes a bunch of drawing bugs when the clip area does indeed extend too
far.
2016-11-01 03:51:48 +01:00
Timm Bäder
ee4ba18d5e
stack: Don't underallocate child in interpolate-size case
...
In that case, we can't just rely on the stack allocation being big
enough. Especially, the child can actually be bigger than the current
stack allocation, so take that into account when positioning it.
2016-10-31 19:29:36 +01:00
Timm Bäder
8dce94c47a
stack: Redraw last_visible_surface if child allocation changes
...
So the widget is properly aligned.
2016-10-31 19:29:36 +01:00
Timm Bäder
212f8a6c7b
builderparser: Order string comparisons after frequency
...
The typical UI file has a lot more <property> tags than it has
<requested> or <interface> tags, etc. so order the string comparisons
according to this expected case.
2016-10-31 19:29:36 +01:00
Timm Bäder
938598032c
builderparser: Save tag type instead of tag name
...
So we can save a few string comparisons
2016-10-31 19:29:36 +01:00
Timm Bäder
e3a3a66370
builderparser: Don't needlessly copy requested object names
2016-10-31 19:29:36 +01:00
Timm Bäder
f415a8bc84
builderparser: stack-allocate ParserData
...
No reason for it to be heap-allocated, it won't survive this function
call anyway.
2016-10-31 19:29:36 +01:00
Timm Bäder
ba9193fc81
paned: Convert to indirect rendering
2016-10-31 19:29:35 +01:00
Timm Bäder
679b515170
popover: convert to indirect rendering
2016-10-31 19:29:35 +01:00
Timm Bäder
2f2ff773ae
separator: Convert to indirect rendering
2016-10-31 19:28:28 +01:00
Timm Bäder
c261d890ad
widget: Remove damage-event
2016-10-31 19:28:28 +01:00
Timm Bäder
c25a5606d1
widget: remove show-help
2016-10-31 19:28:28 +01:00
Timm Bäder
5071206d60
widget: Remove app-paintable
2016-10-31 19:28:28 +01:00
Timm Bäder
d7df491656
button: show() the image in gtk_button_new_from_icon_name
2016-10-31 12:23:27 +01:00
Timm Bäder
6488dde4fd
box: Use measure() to measure child sizes
2016-10-31 12:20:41 +01:00
Timm Bäder
76ff53193a
box: Mark out params of _query_packing as (optional)
2016-10-31 12:20:41 +01:00
Timm Bäder
a829929a41
sidebarrow: Use GtkButton:icon-name
2016-10-31 12:20:41 +01:00
Timm Bäder
3154d3f258
box: Remove unused private API
2016-10-31 12:20:41 +01:00
Timm Bäder
86e94d0e0f
dialog: Let GtkButton manage its style classes
...
A button created using gtk_button_new_with_label will already have the
text-button style class applied.
2016-10-31 12:20:41 +01:00
Timm Bäder
01723fa02f
filechooser: Use GtkButton's icon-name property
2016-10-31 12:20:41 +01:00
Lapo Calamandrei
5bb5213486
Adwaita: add more padding to popover menus...
...
...since Timm removed that from the actual code.
2016-10-29 17:34:49 +02:00
Lapo Calamandrei
91723bfcfc
Revert "Adwaita: add more padding to popovers"
...
Padding should be added back to menu popover only...
This reverts commit 670948586a
.
2016-10-29 17:33:26 +02:00
Lapo Calamandrei
da1348edb4
Adwaita: no rounded corners for solid-csd.
2016-10-29 17:18:58 +02:00
Lapo Calamandrei
670948586a
Adwaita: add more padding to popovers
...
...since Timm stole some.
2016-10-29 17:14:07 +02:00
Benjamin Otte
73cd739e19
API: widget: Remove gtk_widget_is_composited()
...
We don't need to clutter our API with functions that are easily
available elsewhere and effectively unused.
2016-10-29 04:49:47 +02:00
Benjamin Otte
d249e77bcb
API: screen: Remove gdk_screen_is_composited()
...
Switch code to use gdk_display_is_composited() instead.
The new code also doesn't use a vfunc to query the property but rather
requires the backend to call set_composited()/set_rgba() to change the
value.
2016-10-29 04:49:47 +02:00
Benjamin Otte
a334316d5e
API: widget: Remove GtkWidget::composited-changed signal
...
Nobody uses it.
If you need the functionality, listen to display changes on
your widget and then connect to the display's notify::composited.
2016-10-29 04:49:47 +02:00
Benjamin Otte
b69328eb74
inspector: Use the new APIs when displaying information
2016-10-29 04:49:47 +02:00
Timm Bäder
b2a0105234
frame: Get the render node from the gadget
...
So we get a proper css background etc. applied.
2016-10-28 19:33:47 +02:00
Timm Bäder
5c99f7a670
Fix clip of more windowed widgets
2016-10-28 19:33:47 +02:00
Timm Bäder
acbdd5c8f2
Fix clip position of windowed widgets
2016-10-28 17:56:51 +02:00
Timm Bäder
90292b1aa3
modelbutton: Convert to indirect rendering
2016-10-28 16:33:03 +02:00
Timm Bäder
48602e500c
cssgadget: Move gadgets to their allocated position
2016-10-28 16:33:02 +02:00
Timm Bäder
46d80b94a8
switch: Port to indirect rendering
2016-10-28 16:33:02 +02:00
Timm Bäder
8c128f36c5
frame: Use measure() to measure label size
2016-10-28 16:33:02 +02:00
Timm Bäder
82d38e35f8
stack: Use measure() to measure child widget
...
Simpler code this way \o/
2016-10-28 16:33:02 +02:00
Timm Bäder
6eb3d98de0
csswidgetnode: Fix container condition for GtkInvisible
...
... which is a toplevel, but not a container.
2016-10-28 16:33:02 +02:00
Timm Bäder
21a43014ed
menusectionbox: Remove margins
...
So the theme can add the spacing on its own.
2016-10-28 16:33:02 +02:00
Timm Bäder
37e06f19e2
inspector: make use of GtkButton's icon-name property
2016-10-28 16:33:02 +02:00
Timm Bäder
5a64ad4479
toggletoolbutton: Remove unneeded deprecation markers
2016-10-28 16:33:02 +02:00
Matthias Clasen
775b42ef92
Revert "Convert GtkEntry to indirect rendering"
...
This reverts commit 8e29222d95
.
This needs more work - spin buttons need to be converted at
the same time, and we should make sure that text still appears.
2016-10-28 06:47:26 -04:00
Matthias Clasen
8e29222d95
Convert GtkEntry to indirect rendering
...
Warning! This unveils some positioning issue with the secondary icon.
2016-10-27 20:46:08 -04:00
Matthias Clasen
45e83f3d38
Convert GtkIcon to indirect rendering
2016-10-27 20:35:39 -04:00
Benjamin Otte
be8c0b27af
inspector: Don't connect to nonexisting signal
...
The GdkScreen::size-changed signal was removed a while ago.
And because signal changes don't trip the compiler, there are always
leftovers...
2016-10-27 06:14:01 +02:00
Benjamin Otte
48f5df5318
gtk: Add back infrastructure for GTK_DEBUG=updates
...
Includes the ability to turn on updates in the inspector. Animations are
now run via a tick function which allows us to neatly overlay a
semi-transparent red rectangle and fade it out over time.
It also probably enables way more, but somebody with more UI neatness
than me needs to figure out what it eanbles first...
2016-10-27 05:07:23 +02:00
Benjamin Otte
e1e64ac6fc
treeview: Use gtk_widget_queue_draw()
2016-10-27 05:07:23 +02:00
Benjamin Otte
a81c309c39
textview: Use gtk_widget_draw()
2016-10-27 05:07:23 +02:00
Benjamin Otte
0cf4fdcb86
widget: Use gtk_widget_queue_draw()
2016-10-27 05:07:23 +02:00
Benjamin Otte
2ca641edc9
scrolledwindow: Use gtk_widget_queue_draw()
2016-10-27 05:07:23 +02:00
Benjamin Otte
bf64b6aec4
paned: Use gtk_widget_queue_draw()
2016-10-27 05:07:23 +02:00
Benjamin Otte
8202d3fe89
menu: Remove unneeded invalidations
...
The gadgets should take care of those themselves
2016-10-27 05:07:23 +02:00
Benjamin Otte
ef1ba12037
notebook: Use gtk_widget_queue_draw()
2016-10-27 05:07:23 +02:00
Benjamin Otte
1df8b15711
gtk: Remove gdk_window_invalidate() from docs
...
And replace its mentions with gtk_widget_queue_draw().
2016-10-27 05:07:23 +02:00
Benjamin Otte
b9aef64f09
toolitemgroup: Use gtk_widget_queue_draw()
2016-10-27 05:07:23 +02:00
Benjamin Otte
4d4b355d0e
iconview: Use gtk_widget_queue_draw()
2016-10-27 05:07:23 +02:00
Benjamin Otte
ac88153f60
expander: Remove unnecessary redraws
2016-10-27 05:07:23 +02:00
Benjamin Otte
8b76d12f28
drawingarea: Clarify docs
...
Don't use gdk_window_invalidate(), use gtk_widget_queue_draw().
2016-10-27 05:07:23 +02:00
Benjamin Otte
27ab75250c
widget: Redo how gtk_widget_queue_draw() works
...
Before, we would immediately invalidate the GdkWindow of the widget, now
we call the parent's GtkWidgetClass.queue_draw_child() function.
This allows the parent to track redraw queueing of children.
By default GtkWidgetClass.queue_draw_child() will again chain up to its
parent while respecting the GdkWindow hierarchy for clipping.
GtkWindow is then the only widget actually invalidating the GdkWindow.
This essentially moves redraw queueing from GDK to GTK.
2016-10-27 05:07:23 +02:00
Benjamin Otte
77038a9b0b
widget: Inline function into only caller
...
... and remove all the checks that are not needed in this case.
2016-10-27 05:07:23 +02:00
Benjamin Otte
568f1ff301
pixelcache: Remove
...
It's now unused.
2016-10-27 05:03:06 +02:00
Benjamin Otte
a9c05448a8
textview: Get rid of the pixel cache
2016-10-27 05:03:06 +02:00
Benjamin Otte
134165e773
treeview: Remove the pixel cache usage
2016-10-27 05:03:06 +02:00
Matthias Clasen
6861a5d0a4
Spacing fixes for builtin dialogs
...
Replace border-width and padding by margins, in most places.
2016-10-26 20:58:07 -04:00
Matthias Clasen
e2e8231ca9
color chooser: Fix a problem with show-editor=TRUE
...
For some reason we end up allocating the colorplane widget
before it is realized, and then never initialize the surface.
Fix this by explicitly doing it on realize.
https://bugzilla.gnome.org/show_bug.cgi?id=773474
2016-10-26 14:33:07 -04:00
Benjamin Otte
75358e4d8d
applicationwindow: Fix issues with measure vfunc transition
2016-10-26 19:52:02 +02:00
Benjamin Otte
a750f942ac
viewport: Remove pixelcache
...
With the rework for GSK and queueing of redraws pending, the pixel cache
just gets in the way. So we remove it everywhere.
2016-10-26 19:52:02 +02:00
Emmanuele Bassi
da2d91b9b3
build: Update CLEANFILES
...
We use nodist for gir and typelib files, because we expect them to be
rebuilt.
2016-10-26 16:10:35 +01:00
Emmanuele Bassi
b6c749e61c
build: Beautify the GIR post-processing
...
Use AM_V_GEN to silence the command line output.
2016-10-26 15:58:23 +01:00
Alexander Larsson
723b588b5d
Make gdk.la and gsk.la a noninst helper library
...
This merged gtk, gdk and gsk into one library, making it possible to
have internal private APIs between gtk them, as well as producing more
efficient code.
https://bugzilla.gnome.org/show_bug.cgi?id=773100
2016-10-26 16:34:15 +02:00
Benjamin Otte
3fd63e1d67
widget: Improve early exit checks on queue_draw()
...
(1) We don't need to check for realized when we check for mapped right
below.
(2) Empty regions don't need to be drawn.
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
52c4421bd3
win32 theme: Fix tooltip borders
...
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
d1dafbeaef
win32 theme: Fix combobox
...
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
16926308a8
win32 theme: Fix column headers
...
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
1f340882e2
win32 theme: Fix popup window decorations
...
Windows such as combobox's popup were using toplevel window's borders
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
5c6dda0459
gtkwin32theme: delete #if 0 code
...
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
a877d2c163
win32 theme: Fix scale widget
...
It was invisible before.
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
7e3f9d6f71
win32 theme: No need to create a DC for GetThemePartSize
...
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
77ff3ada62
win32 theme: use TS_TRUE in GetThemePartSize
...
Several styles return a size of 0x0px when using TS_DRAW, as
we don't pass a RECT to draw into.
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
ed980824c4
win32 theme: Fix scrollbars
...
The fix is only partial, when both scrollbars are visible their ends
overlap.
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
ea9b992351
Fix CSS warnings in win32 theme
...
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Jaime Velasco Juan
9a9969b337
Fix tiny fonts in win32 theme
...
broken since df08fc91... (css: always get default font size in pixels)
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-26 16:25:49 +02:00
Sébastien Wilmet
83dc4c8b39
docs: fix copy/paste errors in the docs of GtkScrolledWindow
...
Trivial commit.
2016-10-26 15:20:25 +02:00
Matthias Clasen
c9ce0bd4ba
Drop x11-specific code from the GTK+ dnd code
...
We were using passive grabs to listen for some individual
keys. Nowadays, the managed dnd code in the x11 backend
does the same.
2016-10-26 05:13:52 -04:00
Chun-wei Fan
2ba64e0b62
MSVC builds: Support MSVC 2013 and later
...
We now need C99 features from the compiler which are only supported by
Visual Studio 2013 and later, so drop the MSVC 2008~2012 projects, and make
the baseline supported Visual Studio version be 2013. Update the build files
as a result.
2016-10-26 16:46:38 +08:00
Felix Riemann
0ca12fabf0
GtkShortcutType: Fix typos in developer documentation
...
https://bugzilla.gnome.org/show_bug.cgi?id=773479
2016-10-25 20:10:41 +02:00
Alexander Larsson
70935f0952
Drop support for offscreen GdkWindows
...
These complicate a lot of GdkWindow internals to implement features
that not a lot of apps use, and will be better achieved using gsk.
So, we just drop it all.
2016-10-25 09:54:37 +02:00
Rico Tzschichholz
16ded8d47b
gdk: Remove deprecated {keyboard,pointer}_{grab,ungrab} API
2016-10-24 10:33:11 +02:00
Rico Tzschichholz
540cfd8580
textiter: Remove deprecated gtk_text_iter_begins_tag
2016-10-24 09:07:32 +02:00
Rico Tzschichholz
8abf05e194
gtk: Update path references from gtk-3.0 to gtk-4.0
2016-10-23 20:22:38 +02:00
Rico Tzschichholz
bdaa2bf531
gtkplacessidebar: Remove deprecated "show-other-locations" signal
2016-10-23 19:13:15 +02:00
Rico Tzschichholz
c15d61df1f
cellrenderertoggle: Fix compile warnings
2016-10-23 19:10:06 +02:00
Rico Tzschichholz
614079ffb0
accessible: Fix compile warnings
2016-10-23 19:09:27 +02:00
Rico Tzschichholz
94058583dc
treeview: Remove stray property enum-entry
2016-10-23 19:08:27 +02:00
Rico Tzschichholz
b5f9343ab4
treeview: Remove deprecated API
2016-10-23 18:23:59 +02:00
Rico Tzschichholz
db8369de1f
cellrenderertoggle: Remove deprecated indicator-size property
2016-10-23 18:23:59 +02:00
Rico Tzschichholz
502e63eddc
stylecontext: Remove deprecated API
2016-10-23 18:23:59 +02:00
Rico Tzschichholz
5c526c9926
gtkplacessidebar: Remove deprecated "show-connect-to-server"
2016-10-23 18:23:59 +02:00
Rico Tzschichholz
f3bc6619eb
Remove deprecated gtk_im_multicontext_append_menuitems
2016-10-23 18:23:59 +02:00
Rico Tzschichholz
88fcbd946a
testutils: Remove deprecated API
2016-10-23 18:23:59 +02:00
Rico Tzschichholz
471d8d6184
Remove deprecated GTK_RELIEF_HALF
2016-10-23 18:23:58 +02:00
Rico Tzschichholz
3c4f6d64cd
quartz: Remove stock API usage
2016-10-23 13:12:00 +02:00
Rico Tzschichholz
24b917165b
Remove stray "stock" references
2016-10-23 13:01:52 +02:00
Rico Tzschichholz
a1b519a102
Removed deprecated GtkIM*Style enums
2016-10-23 12:52:00 +02:00
Rico Tzschichholz
64e63e7977
radiotoolbutton: Remove deprecated API
2016-10-23 12:42:52 +02:00
Rico Tzschichholz
d69f657aec
layout: Remove deprecated API
2016-10-23 12:38:31 +02:00
Rico Tzschichholz
5c5f8f4672
iconsource: Remove stray reference
2016-10-23 11:12:13 +02:00
Rico Tzschichholz
2273f5d28e
iconset: Remove stray references
2016-10-23 11:12:13 +02:00
Rico Tzschichholz
723b4af529
assistant: Remove deprecated API
2016-10-23 11:12:12 +02:00
Rico Tzschichholz
5d41103750
accessible: Drop deprecated connect_widget_destroyed
2016-10-23 11:12:08 +02:00
Timm Bäder
9f47b43f7c
colorbutton: Don't notify nonexistent properties
2016-10-22 21:51:59 +02:00
Timm Bäder
ab467317a1
widget: Add docs for ::measure
2016-10-22 21:40:04 +02:00
Timm Bäder
38f2290479
button: Add Since annotations to icon-name setter/getter
2016-10-22 21:02:34 +02:00
Timm Bäder
a50587b9ec
widget: Really remove get_preferred_xxx vfuncs
2016-10-22 19:40:57 +02:00
Timm Bäder
e2b6044c1b
expander: Remove spacing property
2016-10-22 19:36:58 +02:00
Timm Bäder
85e01b9f39
toolbar: Remove GtkToolbarSpaceStyle
2016-10-22 19:32:45 +02:00
Timm Bäder
a06d34aaff
cellrendererpixbuf: Remove :follow-state
2016-10-22 19:32:25 +02:00
Timm Bäder
6c911c8171
remove GTK_DEBUG_PLUGSOCKET
...
Both GtkPlug and GtkSocket are gone so this doesn't make a lot of sense
anymore.
2016-10-22 19:30:01 +02:00
Timm Bäder
d188912338
icontheme: Remove deprecated API
2016-10-22 19:08:29 +02:00
Timm Bäder
66430e683c
toolpalette: Remove deprecated API
2016-10-22 19:08:29 +02:00
Timm Bäder
9992a616ef
widget: Use ::measure vfunc to measure size
...
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Timm Bäder
6525b95e25
textview: Remove deprecated GtkScrollable API
2016-10-22 17:02:06 +02:00