Commit Graph

24385 Commits

Author SHA1 Message Date
Benjamin Otte
8fea3b02c9 sizegroup: refactor
The code looks a lot less dangerous if it doesn't look like we're
casting a random widget to a container.
2015-10-28 19:44:27 +01:00
Benjamin Otte
e19818359a sizegroup: Fold function into only caller 2015-10-28 19:44:27 +01:00
Benjamin Otte
690e015ed1 sizegroup: Move container function into its only caller 2015-10-28 19:44:27 +01:00
Benjamin Otte
0912a6c2f5 widget: Use gtk_widget_queue_allocate() when clip changes
There's no need to queue a full resize there.
2015-10-28 19:44:27 +01:00
Benjamin Otte
195397e87a API: widget: Add gtk_widget_queue_allocate()
This is so widgets can queue a rerun of their allocation logic, but
without triggering resizes everywhere.

For now, it just calls gtk_widget_queue_resize().
2015-10-28 19:44:27 +01:00
Benjamin Otte
798a288405 container: Use correct allocation for calling size_allocate() 2015-10-28 19:44:27 +01:00
Benjamin Otte
d3d9f52365 API: widget: Add gtk_widget_get_allocated_size()
See docs for what this is.
2015-10-28 19:44:27 +01:00
Benjamin Otte
ab2d236d3d sizegroup: Remove GtkQueueResizeFlags
They were only used with geometry widgets.
2015-10-28 19:44:27 +01:00
Benjamin Otte
5dd2087d19 widget: Remove _gtk_widget_override_size_request()
The function was only used by the geometry widget.
2015-10-28 19:44:27 +01:00
Benjamin Otte
08974a1e9a window: Ignore geometry widget
Ignore the geometry widget passed to gtk_window_set_geometry_hints().
Usind the widget itself was a hack that complicates the size request
machinery.

It is also incorrect in that it doesn't respect height-for-width.

Last but not least, it was only used by gnome-terminal and that
application can easily work without it.
2015-10-28 19:44:27 +01:00
Benjamin Otte
e422ccefe1 container: Don't randomly call gtk_widget_set_allocation()
gtk_widget_size_allocate() does that already.
2015-10-28 19:44:27 +01:00
Benjamin Otte
624fb8b360 entry: Always render like with is_cellrenderer
And remove the API to set that variable.
If you want the entry to not fill its whole allocated area,
  gtk_widget_set_valign (entry, GTK_ALIGN_FILL);
will give you the old behavior.
2015-10-28 19:44:26 +01:00
Benjamin Otte
8ec2362d81 icontheme: Clarify GENERIC_FALLBACK flag handling
- Add docs explaining that it doesn't work everywhere
- g_warn_if_fail() in the APIs where it doesn't work
2015-10-28 19:44:26 +01:00
Benjamin Otte
5cffbed165 iconhelper: Don't pass GENERIC_FALLBACK flag
It's not used when looking up with a GIcon.
2015-10-28 19:44:26 +01:00
Benjamin Otte
a58d8bdcbc cssprovider: Have a section when parsing style properties
Signal handlers expect a section to be present, so provide them with
one.

New testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=757240
2015-10-28 19:37:27 +01:00
Matthias Clasen
c4eb14eb01 Revert "tooltip: Use an element name"
This reverts commit efc8dc63e3.

This change broke tooltip positioning in a way that I don't
fully understand, so take it back for now.
2015-10-28 11:53:36 -04:00
Matthias Clasen
854c7d1f0f Revert "HighContrast: Update tooltip styling"
This reverts commit 93d80380ee.
2015-10-28 11:53:33 -04:00
Matthias Clasen
cab40f0743 Revert "Adwaita: Update tooltip theming"
This reverts commit d974610741.
2015-10-28 11:48:52 -04:00
Matthias Clasen
b4d49c36ce Fix key themes for GtkEntry -> entry
This was pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=757252
2015-10-28 10:19:00 -04:00
Matthias Clasen
20e46ce8ae shortcuts: Redo the stack switcher theming
Use style classes on the button instead of the stack switcher,
this makes it easier to reuse elsewhere.
2015-10-28 10:19:00 -04:00
Matthias Clasen
62ec4a2415 shortcuts label: Redo the keycap theming
Use a style class directly on the frame. This is easier to reuse.
2015-10-28 10:19:00 -04:00
Matthias Clasen
4e950da4d1 Adwaita: Update shortcuts window theming
Use the newly added element name.
2015-10-28 10:19:00 -04:00
Matthias Clasen
0dffc8c9d3 shortcuts: Use predefined style classes
Lets use the defines we have.
2015-10-28 07:10:55 -04:00
Matthias Clasen
b3619f9050 HighContrast: Update calendar theming
Use the newly introduced element name instead of hardcoding the type.
2015-10-28 06:45:37 -04:00
Matthias Clasen
085edf0212 Adwaita: Update calendar theming
Use the newly introduced element name instead of hardcoding the type.
2015-10-28 06:45:25 -04:00
Matthias Clasen
2c2fd5c8c5 calendar: Add an element name
This will allow us to drop hardcoded type names in the theme.
2015-10-28 06:35:33 -04:00
Matthias Clasen
37eb5c08a4 inspector: Cosmetic changes to the hierarchy tab
Put the interfaces below GInterface.
2015-10-28 00:41:13 -04:00
Matthias Clasen
3869bdbc2b inspector: Add css node style properties
Add a per-cssnode view of style properties.
2015-10-28 00:33:14 -04:00
Matthias Clasen
0d8444d067 Drop some no-longer existing headers 2015-10-27 20:29:43 -04:00
Matthias Clasen
93d80380ee HighContrast: Update tooltip styling
Use the newly added element name instead of hardcoding the type.
2015-10-27 20:06:24 -04:00
Matthias Clasen
d974610741 Adwaita: Update tooltip theming
Use the newly introduced element name instead of hardcoding the type.
2015-10-27 20:06:24 -04:00
Matthias Clasen
efc8dc63e3 tooltip: Use an element name
This will allow us to drop hardcoded type names in the theme.
2015-10-27 20:06:24 -04:00
Benjamin Otte
e3ddbc544c cssselector: Print name and any selector first
When printing a "compound selector", make sure the name and universal
selectors are printed at the beginning and class, id, etc. selectors are
printed last.
2015-10-27 20:12:38 +01:00
Matthias Clasen
9848fe006e Adwaita: Update GtkAssistant theming
Use the new element name, instead of hardcoding the type.
2015-10-27 14:37:58 -04:00
Matthias Clasen
5b0208f890 assistant: Use an element name
This will allow us to drop hardcoded type names in the theme.
2015-10-27 14:37:58 -04:00
Matthias Clasen
0f4663728e toolitemgroup: Fix the previous change
dispose can be called more than once.
2015-10-27 12:54:19 -04:00
Matthias Clasen
9753bea6a4 tool item group: Don't leak a button
This causes a hickup in the new css node machinery, causing
the default-value test to fail.
2015-10-27 11:09:00 -04:00
Matthias Clasen
270e900f55 icon theme: Ensure to propagate an error
If the svg pixbuf loader is not available, we end up with criticals
from gtk_css_image_icon_theme_draw because gtk_icon_info_load_symbolic
returns NULL without setting an error.

Avoid this by propagating the load error.
2015-10-27 11:09:00 -04:00
Matthias Clasen
bb5b711d4b shortcuts: Some property hygiene
Bring property notification for some of the new shortcuts widgets
up to the standards of our testsuite.
2015-10-27 09:25:17 -04:00
Matthias Clasen
ed00d86496 inspector: Allow editing css node properties
This reuses the property editor infrastructure from the
property list pages. Good that css nodes are objects.
2015-10-26 23:39:51 -04:00
Matthias Clasen
6852a1eef9 inspector: Support editing interned string properties
Sadly, interned string properties cannot be handled generically
at all - GObject insists on inserting a strcpy in any attempt
to set a string property with generic api, destroying the
internedness of the string.

Therefore, we have to special-case GtkCssNode in the property
editor code :-(
2015-10-26 23:39:51 -04:00
Matthias Clasen
b7d001e613 Add some api annotations
Nothing is using the /*interned*/ annotations currently,
but if we are doing this, we should be consistent.
2015-10-26 23:39:50 -04:00
Benjamin Otte
a648afae12 widget: Add name to widget paths
This changes widget paths for widgets with a CSS name to return that CSS
name, now that we have added API for it.
This means that style properties are now matches using the CSS name.

Also fix the theme to use the correct name when matching style properties.
2015-10-27 03:13:42 +01:00
Benjamin Otte
517cea36ed cssmatcher: Actually match names for widget paths
The type is always 0 when we use names. So this would always return
FALSE. Oops.
2015-10-27 03:13:42 +01:00
Matthias Clasen
d717afd4d4 entry: properly update css subnode state
Update the state of the css subnodes for icons when
appropriate, and avoid calling set_state after save_to_node.
2015-10-26 22:09:07 -04:00
Matthias Clasen
c72d094ae0 entry: Use better element name for progress
Change the name of the CSS subnode for progress rendering from
progressbar to progress. This will align better with GtkProgressBar.
2015-10-26 21:34:16 -04:00
Robert Ancell
aefa1ba611 gdk: Deprecate gdk_display_get_screen 2015-10-27 14:17:52 +13:00
Benjamin Otte
101df329ae API: Add gtk_widget_path_iter_set_object_name()
... and gtk_widget_path_iter_get_object_name(). This allows applications
that still use widget paths to use the new object names to get the
correct styling.

Mutter and webkit-gtk are examples here.
2015-10-27 01:44:50 +01:00
Jonas Ådahl
aedd193c69 GtkTreeView: Rework the search window hack so it also works on Wayland
The search window of a tree view was implemented by showing without
making it visible by by positioning it outside the screen edge. This is
not possible on Wayland, so implement another method for being able to
enter text into a non-visible entry.

The new method is implemented by, before showing the window, pass the
key event directly to the IM context backing the entry. If the key
event triggered the context to commit new text or change the preedit
content, the search window is shown, and from that point the key events
are forwarded directly to the entry widget.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Jonas Ådahl
97dbef451e GtkTreeView: Make a search window destroy helper
https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00