Commit Graph

557 Commits

Author SHA1 Message Date
Timm Bäder
132f2721ce inspector: Use GtkButton:icon-name in ui files 2017-01-16 17:22:38 +01:00
Benjamin Otte
6055028c96 snapshot: Rename append APIs
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
2017-01-13 04:46:09 +01:00
Alexander Larsson
65ad2541d7 Snapshot: Only record names if inspector is recording
Otherwise we do a lot of allocations and vprintf calls which are
not used.
2017-01-11 10:22:40 +01:00
Timm Bäder
9aedbc376b inspector: Don't try to access child props of non-containers 2017-01-07 17:19:30 +01:00
Timm Bäder
42f1ff0123 inspector: Show child widgets of widgets 2017-01-07 17:19:29 +01:00
Benjamin Otte
b993acfe2c gsk: Add GskRepeatNode
Also add gtk_snapshot_push_repeat() and use that to draw backgrounds.

With that change, CSS background snapshots are created without Cairo
nodes.
2017-01-01 19:53:36 +01:00
Benjamin Otte
7540702cf0 gsk: Add GskColorMatrixNode
This node essentially implements the feColorMatrix SVG filter. I got the
idea yesterday after looking at the opacity implementation.

It can be used for opacity (not sure if we want to) and to implement a
bunch of the CSS filters.
2016-12-31 02:49:47 +01:00
Benjamin Otte
a36e5ceea7 cellrenderer: Remove render() vfunc
Make the last 2 cell renderers create the cairo node themselves.
2016-12-23 11:11:52 +01:00
Benjamin Otte
91c71b10e6 inspector: Add a render node save button
Now we can select buggy nodes, save them to a file, and add that file to
our testsuite.
2016-12-23 08:11:00 +01:00
Benjamin Otte
def94f03e2 debug: Add GTK_DEBUG=snapshot
This causes the snapshotting algorithm to dump all widget nodes into
their own container node. We then name that group accordingly (ie
"GtkSwitch<0xdeadbeef>") so you can easily see which node belongs where.

The feature is toggleable in the inspector's visual tab.

There's a few problems with it, becuse GtkSnapshot optimized container
nodes away if they are not needed, so we are losing some widgets...
2016-12-20 19:26:40 +01:00
Benjamin Otte
22a657004b debug: Remove pixel-cache debug categories
We have no more pixel cache, so they are kind of useless.
2016-12-20 19:26:40 +01:00
Benjamin Otte
2034e83a20 gsk: Add GskOutsetShadowNode 2016-12-20 18:01:12 +01:00
Benjamin Otte
fcc1f554d6 gsk: Add GskInsetShadowNode
And again lots of shadow code gets copied to GSK. But we're now almost
at a stage where widget-factory does not use cairo nodes anymore.
2016-12-20 18:01:12 +01:00
Benjamin Otte
2480e0d575 gsk: Add GskShadowNode
... and make the icon rendering code use it.

This requires moving even more shadow renering code into GSK, but so be
it. At least the "shadows not implemented" warning is now gone!
2016-12-20 18:01:12 +01:00
Benjamin Otte
6e31fc4300 inspector: Print node type in node properties 2016-12-20 18:01:11 +01:00
Benjamin Otte
75b76af221 gsk: Add GskBorderNode
The node draws a solid CSS border, which can be used to cover everything
but dashed and dotted borders (double, groove, inset, ...).

For different border styles, we overlay multiple nodes and set their
colors to transparent for sides with non-matching styles.
2016-12-20 18:01:11 +01:00
Benjamin Otte
30438c6e8b gsk: Add cross-fade node
And implement stack crossfades with it.
2016-12-20 18:01:11 +01:00
Benjamin Otte
e8cd71228a gsk: Implement linear gradient render nodes 2016-12-20 18:01:11 +01:00
Benjamin Otte
cf520b7a1f gsk: Add blend nodes
Implement blend mode support in GTK background compositing with it.
2016-12-20 18:01:11 +01:00
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
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
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
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
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
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
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
ff884385c0 gsk: Remove GskRenderNode::hidden
If you want to hide something, don't render it.
2016-12-20 18:01:09 +01: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
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
d7876bde74 inspector: Remove leftover GDK_PRIVATE_CALL()s 2016-11-24 15:41:19 +01: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
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
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
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
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
2745c2502f snapshot: Move GtkSnapshot declaration to gtypes.h 2016-11-19 20:58:36 +01:00
Matthias Clasen
295066dad8 inspector: Show render node properties 2016-11-18 20:59:10 -05:00
Benjamin Otte
313a708006 snapshot: Convert inspector's RenderNodeView 2016-11-15 17:49:19 +01:00
Matthias Clasen
2d14217cd7 inspector: Cosmetic improvements to the recorder 2016-11-01 22:06:25 -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
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
b69328eb74 inspector: Use the new APIs when displaying information 2016-10-29 04:49:47 +02:00
Timm Bäder
37e06f19e2 inspector: make use of GtkButton's icon-name property 2016-10-28 16:33:02 +02: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
Rico Tzschichholz
8abf05e194 gtk: Update path references from gtk-3.0 to gtk-4.0 2016-10-23 20:22:38 +02:00
Timm Bäder
a5867ffe71 Remove some more GdkColor properties 2016-10-20 20:12:08 +02:00
Benjamin Otte
dbeeaf7de6 cssprovider: Remove GError out argument from load functions
People should use the GtkCssProvider::parsing-error signal instead.
2016-10-17 16:52:05 +02:00
Emmanuele Bassi
24d59f6c34 inspector: Mark internal function as static 2016-10-17 11:10:14 +01:00
Benjamin Otte
e76ba9a3c3 gdk: Remove gdk_window_set_debug_updates()
The update tracking code was ugly and using deprecated drawing APIs. It
was also in the wrong place.

So instead of trying to keep it working, I'll remove it. We need to find
a better way to put it and make it work there.
2016-10-16 18:18:58 +02:00
Benjamin Otte
cda617df4d API: sizegroup: Remove gtk_size_group_set_ignore_hidden() 2016-10-16 18:18:58 +02:00
Benjamin Otte
1518fe0a8f API: stylecontext: Remove state argument from getters
The argument must always be the current state.
2016-10-16 18:18:58 +02:00
Timm Bäder
f45dadadd0 box: Remove 'padding' child property 2016-10-16 18:17:21 +02:00
Timm Bäder
c301357627 inspector: Remove object_title from css editor
It's unused
2016-10-16 18:17:21 +02:00
Benjamin Otte
662001b60a API: Remove ability to set visuals on windows
And with it, gtk_widget_get_visual() and gtk_widget_set_visual() are
gone.

We now always use the RGBA visual (if available) and otherwise fall back
to the system visual.
2016-10-16 18:17:21 +02:00
Benjamin Otte
9222b4cd7c inspector: Use display name instead of screen name
This is for future compatibility as they are guaranteed to be identical.
2016-10-16 18:17:21 +02:00
Benjamin Otte
266fd36f3f inspector: Port to GdkMonitor 2016-10-16 18:17:21 +02:00
Matthias Clasen
0d00e0c3d3 Fix the build 2016-10-10 14:37:09 -04:00
Adam Jackson
434ce02ebe Use eglGetPlatformDisplay{,EXT} if available
Calling eglGetDisplay forces libEGL to guess what kind of pointer you
passed it. Different EGL libraries will do different things here, and in
particular glvnd will do something different than Mesa. Since we do have
an API that allows us to explicitly type the display, use it.

The explicit call to eglGetProcAddress is working around a bug in
libepoxy 1.3, which does not understand the EGL concept of client
extensions. Since it does not, the normal epoxy resolver for
eglGetPlatformDisplayEXT would not find any provider for that entry
point, and crash when you attempted to call it.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:17:09 -04:00
Adam Jackson
3b11575f0b Fix some EGLDisplay * abuse
EGLDisplays are already opaque pointers, and eglGetDisplay returns an
EGLDisplay not a pointer to one.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:17:09 -04:00
Matthias Clasen
74f3d7f6d3 Switch gettext domain from gtk30 to gtk40 2016-10-07 10:34:50 -04:00
Benjamin Otte
e1a03ead7a Use NULL for generic marshallers in g_signal_new()
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
2016-08-29 16:20:54 +02:00
Timm Bäder
a985e62b25 Use gtk_popover_popdown/popup where appropriate
https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-16 11:49:26 -04:00
Matthias Clasen
8430be75ed Fix an array overrun
When I introduced the new input source enum value for
track points, I forgot that there is a fixed-size array
with names for those in the inspector.
2016-06-23 15:47:47 -04:00
Matthias Clasen
57d00e004a inspector: Ellipsize accessible description.
This string can be long, and we don't want to break the ui
2016-06-05 20:56:52 -04:00
Chun-wei Fan
092cb9e202 GTK: Fix build for pre-C99 compilers
Some compilers we support, such as pre-2013 Visual Studio, does not support
for INIFINITY, log2() and exp2(), so check for exp2() and log2() during
configure, and use fallbacks for them and INIFINTY if they are not found.

https://bugzilla.gnome.org/show_bug.cgi?id=766207
2016-05-10 17:14:07 +08:00
Matthias Clasen
3952bd60a5 inspector: Port to new monitor api
Adapt to new monitor apis, and show more information.
2016-04-27 23:18:16 -04:00
Paolo Borelli
6225d435e6 inspector: do not leak seat capabilities descriprion
Factor out an utility function for readability and free the string
with the list of capabilities
2016-04-24 17:49:26 +02:00
Matthias Clasen
8a2061f581 inspector: Don't lie with statistics
If we don't have statistics, despite GOBJECT_DEBUG being set,
explain how to fix this.
2016-04-14 22:52:59 -04:00
Matthias Clasen
abff6e23c0 inspector: simplify some code 2016-04-09 15:48:34 -04:00
Matthias Clasen
af1c873bca inspector: Use GdkAxes instead of GdkAxisUse 2016-04-09 12:14:33 -04:00
Matthias Clasen
d83ad00f9e inspector: Add an origin mark to the slowdown scale
Makes it easier to get back to the original speed.
2016-04-09 11:56:08 -04:00
Matthias Clasen
e6c408c08a inspector: Give the font scale an entry
This matches what Matt did for the slowdown.
2016-04-09 11:56:08 -04:00
Matt Watson
46b120b35e inspector: add slider to control slowdown factor 2016-04-08 16:09:29 -07:00
Christoph Reiter
72346cb209 inspector: add slider for adjusting the font scale
https://bugzilla.gnome.org/show_bug.cgi?id=761435
2016-03-25 16:10:28 -04:00
Matthias Clasen
65927caf84 inspector: Look for themes in system data dirs
This matches what GTK+ does now.
2016-03-22 08:22:48 -04:00
Matthias Clasen
7cb36aba40 Load theme settings from the right location
When loading a per-theme settings.ini file, look for it in
the same directory where we found the gtk.css file for the
theme. Previously, we were always looking in
$prefix/share/themes/THEME/gtk-3.0/, even if the css was
loaded from somewhere else.

https://bugzilla.gnome.org/show_bug.cgi?id=641354
2016-03-21 22:19:19 -04:00
Matthias Clasen
5e68c4e62d inspector: Reset the treewalk when required
The tree walk holds a tree iter, which will become invalid
when we either remove the row that it points to or remove
all rows.

Reset the tree walk in those cases to avoid a crash that
was pointed out by Bastien Nocera.
2016-03-11 13:53:57 -05:00
Matthias Clasen
2e34ce8f7c inspector: Add api to get the current tree walk position
This will be used in the next commit.
2016-03-11 13:53:57 -05:00
Benjamin Otte
eeb945e4c1 inspector: Widgets update automatically when CSS changes
There's no need to force-invalidate their CSS.
2016-03-11 17:00:41 +01:00
Matthias Clasen
97250ea5e6 inspector: Add a switch for the layout debug flag 2016-03-11 00:22:36 -05:00
Matthias Clasen
2b773e07e3 inspector: Show the frame clock in misc
There is no convenient way to get a handle on the frame clock,
otherwise, and the frame clock object is where we show the frame
rate...
2016-03-10 16:21:35 -05:00
Matthias Clasen
30faa9a2a9 inspector: Refine strv editor
Put some spacing between the rows, and link the buttons to
the entries they belong to.
2016-03-09 21:59:43 -05:00
Matthias Clasen
6e9fd6832a inspector: Do a better job with readonly properties
Say if they are non-writable or construct-only, and also
gray out construct-only properties in the list.
2016-03-09 21:59:43 -05:00
Matthias Clasen
c24cc63523 inspector: Minor refactoring
Break out some functions in prop-editor.c
2016-03-09 21:59:43 -05:00
Matthias Clasen
c1c8a861aa inspector: Redo property lists a bit
Break out value types as a separate column, to make the
value column more readable.
2016-03-09 21:59:43 -05:00
Matthias Clasen
0c929b7124 inspector: Avoid overflow when editing doubles
The adjustment double properties allow values from -G_MAXDOUBLE
to G_MAXDOUBLE, which leads to overflow when calculating
max - min / 10. To avoid that, simply use a fixed page_size of 1.0.
2016-03-09 21:59:43 -05:00
Matthias Clasen
6af8e9f3cc inspector: Wording changes
Align the property nicks of GtkCssNode with the column names
in the inspector node tree.
2016-03-09 19:29:58 -05:00
Matthias Clasen
f23c77b14b inspector: Some more cleanup
The last commit left some unused functions behind.
2016-03-09 19:29:58 -05:00
Matthias Clasen
e5a5f0a59a inspector: Remove an unncessary context menu
Now that we have the style properties on the same page again,
we don't need the context menu anymore.
2016-03-09 19:29:58 -05:00
Matthias Clasen
aa193ce4a4 inspector: UI refresh
The sidebar in the object page was using up more space than it deserves.
Replace it with a combo box in the subheader. Now that we have more space,
put the CSS node tree and the style properties in the same page again.
2016-03-07 00:24:15 -05:00
Matthias Clasen
4b5bcdeaa5 inspector: Drop the per-object CSS editor
The global editor is good enough for all uses.
2016-03-06 21:41:46 -05:00
Matthias Clasen
251810ff40 inspector: Avoid pointless selections
The CSS selector and the class hierarchy are purely
informative, no need to select anything here.
2016-03-05 00:35:08 -05:00
Matthias Clasen
e69c1c5a9b inspector: More grid lines
I had forgotten the css property list.
2016-03-05 00:34:39 -05:00
Matthias Clasen
360bad6865 inspector: Some ui refinements
Remove pointless expanders from lists, add grid lines and,
in some places, tree lines.
2016-03-05 00:29:06 -05:00
Matthias Clasen
8b93c013c3 inspector: Simplify general tab setup
Factor out the code to create a listbox row with two labels,
and use it throughout.
2016-02-25 20:49:09 -05:00
Matthias Clasen
4f5f299266 inspector: React to device changes
Recreate the device section in the general tab when
devices come or go.
2016-02-25 20:28:23 -05:00
Ignacio Casal Quinteiro
53fe9c2b0c inspector: use guint to fix the windows build 2016-02-25 15:25:19 +01:00
Matthias Clasen
fe4602acc5 inspector: Show ::num-touches for touch devices
This can be useful information.
2016-02-25 08:27:08 -05:00
Matthias Clasen
84ba01d713 inspector: Update for screen config changes
Repopulate the display section whenever the monitor configuration
changes.
2016-02-25 01:22:01 -05:00
Matthias Clasen
15ccdcd25b inspector: Don't show numeric ids
The vendor and product ids for input devices aren't useful
as-is; need to figure out how to translate them to names.
2016-02-25 01:10:23 -05:00
Matthias Clasen
455935a06a inspector: Show more device information
This adds vendor and product id and axes. This reveals that
the GDK backends have quite different quality when it comes
to returning meaningful information here.
2016-02-25 00:49:50 -05:00
Matthias Clasen
03db14c2d6 inspector: Show some basic device information
Add information about seats and their associated devices
in the General tab.
2016-02-25 00:17:09 -05:00
Matthias Clasen
13e5e83798 Add message contexts to translated strings
The string "None" is used in multiple contexts; add message contexts
to give translators a chance to translate them accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=762165
2016-02-16 18:33:16 -05:00
Benjamin Otte
f5d4fb1a0b inspector: Don't use unused variables
Windows-specific refactorings broke this.
2016-02-11 04:14:56 +01:00
Benjamin Otte
76e56c5038 win32: Stop using _gdk_display global in device code
Use gdk_device_get_display() instead.
2016-02-11 03:44:47 +01:00
Timm Bäder
8ea573b473 css node tree: Fix crash
This function would return "" whenever the state of the css node was
unset, causing a crash when selecting the css node tree from the
sidebar.
2016-02-10 12:28:32 +01:00
Matthias Clasen
dc407dbc8f inspector: Avoid crash in magnifier
We can't use gtk_widget_draw on widgets that are not allocated.
2016-02-08 09:34:24 +01:00
Benjamin Otte
fe6d4cbdf5 inspector: Drop type name from node list
It's not used anymore in the CSS, so people don't need to see it.
2016-02-05 19:31:47 +01:00
Benjamin Otte
b783670820 inspector: Don't hardcode builtin themes
Insteead, enumerate the resources that are available. Fixes windows
themes not being listed in the inspector.
2016-02-04 13:35:21 +01:00
Matthias Clasen
761120a5e2 inspector: Show CSS pseudoclass names for node state
This is a better fit for showing CSS node state, since one
commonly looks at this information to devise CSS selectors,
where the CSS names are needed.
2016-01-24 10:59:46 -05:00
Timm Bäder
d6f989f59c Inspector: Plug a few leaks 2016-01-24 08:01:36 +01:00
Matthias Clasen
57baf6804b inspector: Show baseline value
The misc info page already shows the allocation and clip areas,
the baseline fits right in.
2016-01-22 22:24:46 -05:00
Matthias Clasen
ffc4f8ee11 Forgotten file 2016-01-21 08:18:28 -05:00
Matthias Clasen
e33bda3078 inspector: Show full allocation + clip
Previously, we were only showing the size of the allocation
and clip area. But there is no good reason to hide the position
of these rectangles, so add them, in the traditional format
of X geometry strings: wxh+x+y
2016-01-20 22:52:05 -05:00
Matthias Clasen
449a9c419a inspector: Refine typography
Use thin spaces in the formatting of monitor sizes.
2016-01-20 22:51:25 -05:00
Matthias Clasen
d28959c6db inspector: Make cursor-size combo wider
Cursor sizes typically have 2 digits, lets not clip them.
2016-01-17 13:23:49 -05:00
Matthias Clasen
dc5c82e29c inspector: Don't select 'randomly'
While rescanning the object tree, we were emitting ::object-selected
signals, possibly causing wild blinking in the application window.
Don't do that.

https://bugzilla.gnome.org/show_bug.cgi?id=760572
2016-01-13 23:24:38 -05:00
Matthias Clasen
a45b1d1e3c inspector: Sort themes in the various theme combos
It is nicer if the themes show up in a predictable order,
so sort them alphabetically.
2016-01-07 19:56:05 -05:00
Matthias Clasen
ec02f055ed inspector: Add HighContrastInverse to list of themes 2016-01-07 19:56:05 -05:00
Matthias Clasen
80a91722e5 inspector: Don't leak weak references
These come back to bite us when the inspector is no longer around
at the end of the program.

https://bugzilla.gnome.org/show_bug.cgi?id=759768
2015-12-26 21:42:10 -05:00
Matthias Clasen
787f600d33 inspector: Remove some dead code
Since commit bffeae6203, the
tree path is not used for anything useful anymore, so do away
with it entirely.
2015-12-26 21:42:10 -05:00
Matthias Clasen
6a67df79a8 inspector: Avoid criticals in the css editro
We can't keep text iters around after text buffer has been
changed. Just clear the list errors when the buffer changes
before we've passed it again.
2015-12-20 14:43:14 -05:00
Timm Bäder
e8aa9b0440 Add a way to highlight resizing widgets
https://bugzilla.gnome.org/show_bug.cgi?id=759586
2015-12-18 16:20:19 +01:00
Lionel Landwerlin
776778efc8 inspector: Ensure clip is always shown 2015-12-17 01:14:31 +00:00
Matthias Clasen
117ab50922 inspector: Always show clip
It is less confusing than hiding it sometimes.
2015-12-16 19:24:43 -05:00
Carlos Garnacho
3f7eefb922 inspector: Use seat grabs for the "inspect widget" feature
And remove some usages of GdkDeviceManager API.
2015-12-16 19:47:07 +01:00
Benjamin Otte
26d536a69b inspector: Fix quick-fix
Constructing GtkCssStyleChange objects without styles is forbidden, so
don't do it. Instead untangle the callback from the actual update
function and call that untangled function directly.
2015-12-15 01:15:51 +01:00
Benjamin Otte
971a277419 cssnode: Change style-changed signal
Instead of having old and new style, now have a GtkCssStyleChange opaque
object that will compute the changes you are interested in for you.

This simplifies change signal handlers quite a bit and avoids lots of
repeated computation in every signal handler.
2015-12-12 02:16:04 +01:00
Matthias Clasen
0ad259a178 inspector: Hide request mode for non-widgets
Only widgets have a request mode.
2015-12-11 17:12:44 -05:00
Matthias Clasen
326f4739ca inspector: Redo the CSS node page
Showing two lists in a paned was a bit awkward, and space was
getting too limited. Go back to showing just the node list at
first, and make the CSS properties available via a stack. At
the same time, add a right-click context menu to the node list
to make the name and class editing more easily available.
2015-12-06 23:06:33 -05:00
Matthias Clasen
6f1c945010 inspector: Avoid a crash
gkt_cell_layout_get_area may return NULL, handle it.
2015-12-06 17:25:31 -05:00
Matthias Clasen
150728d6b0 inspector: Show the size request mode
This is not a property, so show it in the misc page.
2015-11-30 22:27:27 -05:00
Timm Bäder
df2cb5befc inspector: Leave unneeded widgets out of source files 2015-11-24 11:17:10 +01:00
Matthias Clasen
036ee7a68b inspector: Always underline at least one char
Empty underlines are hard to make out. Since we get somewhat
unreliable section information from the CSS parser, we just
make sure that we always underline at least one character.
2015-11-20 20:59:53 -05:00
Matthias Clasen
df55412ba2 inspector: Fix css warning tags
The builder syntax for tags was invalid here (why did this not
get flagged as error ?!). While we're at it, give the warning
underline a nice, orange color.
2015-11-20 20:35:39 -05:00
Matthias Clasen
ad49103b93 inspector: Show css parsing errors
The squiggly underline is useful, but seeing the error message
is much better, so show it in a tooltip.
2015-11-20 18:18:01 -05:00
Matthias Clasen
e9449f6014 inspector: Don't grow horizontally
Labels in the object tree are application data. Ellipsize them
to avoid growing extremely wide if the data is bogus.
2015-11-10 17:36:33 -05:00
Matthias Clasen
774b6f94d5 inspector: fix a typo 2015-11-10 17:36:23 -05:00