Commit Graph

44644 Commits

Author SHA1 Message Date
Matthias Clasen
099cde5f80 stack sidebar: Use an element name 2015-11-03 23:27:34 -05:00
Matthias Clasen
ead35ee12f stack switcher: Use an element name 2015-11-03 23:24:49 -05:00
Matthias Clasen
ef1bc737b0 widget-factory: Stop using deprecated API 2015-11-03 23:24:13 -05:00
Matthias Clasen
910f4f72ba stack: Set an element name
And it is...stack.
2015-11-03 23:20:24 -05:00
Matthias Clasen
8dfb0e728c HighContrast: Update range styling
Adapt to changes in the previous commit.
2015-11-03 23:17:09 -05:00
Matthias Clasen
37ad3628a0 Adwaita: Update range styling
Adapt to the changes in the previous commit.
2015-11-03 23:17:09 -05:00
Matthias Clasen
8727c8fe24 range: Convert to CSS nodes
Use CSS nodes for GtkScale and GtkScrollbar. See their documentation
for details on what subnodes with what names exist.
2015-11-03 23:17:09 -05:00
Benjamin Otte
2a6e1498ba testutils: Deprecate a bunch of ugly functions
We've by now disabled and then remved all of the tests that use these
functions because they never worked properly. So let's depecate these
functions before somebody starts using them.
2015-11-04 05:06:31 +01:00
Benjamin Otte
61db7da2ef testsuite: Remove a bunch of broken tests
These tests have either been commented out for way too long or use APIs
that we don't want to support.
2015-11-04 05:06:23 +01:00
Christian Hergert
24391634b5 stack: GtkStack:interpolate-size should be read/write
It looks like the param spec for interpolate-size was
copied from the line above it, which is a read only property.

There is a setter for interpolate-size, and it is implemented in
set_property().
2015-11-03 15:13:51 -08:00
Christian Hergert
5f0a8cf136 headerbar: remove G_PARAM_CONSTRUCT from custom-title
This fixes the ability to sublcass GtkHeaderBar from a UI template which
contains a custom <child type="title"> element.

https://bugzilla.gnome.org/show_bug.cgi?id=757544
2015-11-03 14:50:56 -08:00
Benjamin Otte
d65ba7cf97 widget: Queue resize on parent, not self
When setting the parent of a widget, queue_resize() on the widget will
be optimized away if the widget already had a resize queued.

Plus, we do not need to resize the widget as its size request is not
going to change.
2015-11-03 22:55:03 +01:00
Matthias Clasen
8e5c7ac028 menu: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen
c389511b86 paned: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen
92e3655ace combo box: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen
a7076d1c4c text view: Add diagram to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen
fc0a222350 accel label: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen
332ea5f8ec progressbar: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen
65d959bbc8 spin button: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen
870461475a switch: Add a diagram to CSS node documentation 2015-11-03 14:27:35 -05:00
Benjamin Otte
1f01b8d52a widget: Queue an allocate on hide
This makes sure that hidden widgets always have priv->alloc_needed set
on them.

The constructor sets that flag, so we want to have it back when we
revert to this state.

This fixes GtkWindow skipping a size_allocate() when reshowing a
previously hidden window and thereby not updating its allocation and
clip. And that in turn would lead to draws not happening and us beig
left with a black window.
2015-11-03 18:57:14 +01:00
Matthias Clasen
09f7c8511b model button: Add diagrams to the CSS node documentation 2015-11-03 12:51:52 -05:00
Matthias Clasen
19b34a44b2 model button: Complete the CSS node conversion
There was still style context saving in the draw function,
and the CSS node was not always properly updated and positioned.
Fix these things, and use the same CSS node for the arrow
drawing as well.
2015-11-03 12:20:53 -05:00
Matthias Clasen
6791c1413d list box: Remove an unused static 2015-11-03 10:43:48 -05:00
Matthias Clasen
77e99039fc file chooser button: Remove an unused variable 2015-11-03 10:41:49 -05:00
Matthias Clasen
67b739b58a button: Add diagrams to CSS node docs for buttons 2015-11-03 10:17:41 -05:00
Matthias Clasen
6328cf5ee5 entry: Add a diagram to CSS node docs 2015-11-03 09:53:00 -05:00
Matthias Clasen
c711906f8c inspector: Replace a use of gtk_button_set_focus_on_click
It is deprecated now.
2015-11-03 07:44:17 -05:00
Florian Müllner
de50012371 listbox: Implement :focus-on-click
Similar to buttons-in-toolbars, it can make sense for listbox rows
to not take away the focus from the main application view, for
instance when used for navigation. Support this by taking the newly
added GtkWidget:focus-on-click property into account.

https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Florian Müllner
e364ae3ea8 Use gtk_widget_set_focus_on_click() instead of deprecated setters
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Florian Müllner
9a29a2768b Deprecate widget-specific :focus-on-click properties
The differences between the existing properties and the newly added
GtkWidget:focus-on-click property are minimal (different owner_type
in GParamSpec), so it is extremely unlikely that dropping the former
would break anything.

https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Florian Müllner
ebdf5f581d widget: Add :focus-on-click property
There are currently three widget that implement such a property, and
there are other widgets for which the behavior can make sense. It
seems like a good time to add the property to GtkWidget itself so
subclasses can choose to respect it without adding their own property.

https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Carlos Garnacho
7d8a3a52ce GdkDevice: Do not free construct-only properties data on dispose()
Those are not references to other objects, and the device will be mostly
useless if those can't be set again anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=756625
2015-11-03 13:28:07 +01:00
Carlos Garnacho
4f61fd09c5 texthandle: Request raising of text handle popovers.
https://bugzilla.gnome.org/show_bug.cgi?id=756670
2015-11-03 07:25:33 -05:00
Carlos Garnacho
9d1b8dfc61 popover: Request raise on ::show
This way latest shown popovers are ensured to be on top.

https://bugzilla.gnome.org/show_bug.cgi?id=756670
2015-11-03 07:25:33 -05:00
Carlos Garnacho
fa3e0be80c GtkWindow: make popover stacking explicit
The list of popovers will specify the stacking order, a
_gtk_window_raise_popover() private call has been added so popover
widgets can request being on top.

Also, the stacking on popovers is ensured on gtk_window_size_allocate(),
after the size/stacking changes on the child widget have finished, this
will ensure popovers are kept on top of window contents.

https://bugzilla.gnome.org/show_bug.cgi?id=756670
2015-11-03 07:14:36 -05:00
Carlos Garnacho
29dd395b7a x11: Detect single-touch touchscreens as GDK_SOURCE_TOUCHSCREEN
Those won't have ABS_MT_* axes, so won't be reported has having
XITouchClassInfo. Fallback on these to checking whether abs x/y axes are
available. After the Wacom checks, any remaining device with absolute axes
should be touchscreens, and GDK_SOURCE_MOUSE does indeed just make sense on
devices with relative axes.

https://bugzilla.gnome.org/show_bug.cgi?id=757358
2015-11-03 07:07:12 -05:00
Dhiru Kholia
b3b4282beb Fix a memory leak in gtk-3.0.m4 file
This fix is inspired by,

https://git.gnome.org/browse/glib/tree/m4macros/glib-2.0.m4

https://bugzilla.gnome.org/show_bug.cgi?id=757221
2015-11-03 07:07:00 -05:00
Olivier Fourdan
a5b1cdd0c1 GtkWindow: Fix the shadow width logic
Previous commit 305b34a "GtkWindow: fix move/get position with CSD"
introduced a regression because some windows presumably use shadows but
actually don't, resulting in a negative offset being wrongly applied.

Problem is that get_shadow_width() would return non-zero shadows even
for windows that have no shadow, thus causing the negative offset.

Fix the logic in get_shadow_width() and gtk_window_should_use_csd() so
that get_shadow_width() returns accurate values.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-11-03 09:33:34 +01:00
Matthias Clasen
9f04efd316 Adwaita: Update menubar styling
Adapt to the changes in the previous commit.
2015-11-02 23:49:38 -05:00
Matthias Clasen
a0d7b609e3 menubar: Use an element name 2015-11-02 23:49:20 -05:00
Matthias Clasen
b6112c6ed6 Adwaita: Update menu item styling
Adapt to the changes in the previous commit.
2015-11-02 23:43:58 -05:00
Matthias Clasen
aede5c65d3 menu item: Use CSS nodes
Use the element name menuitem for GtkMenuItem, GtkCheckMenuItem
and GtkRadioMenuItem. GtkSeparatorMenuItem gets the name separator.
Add a subnode with name arrow if a submenu is attached.
Give the radio and check menu items a subnode with name check or
radio.
2015-11-02 23:42:14 -05:00
Matthias Clasen
ac553d7e44 check button: Match documented behavior
We were not actually adding the style classes that the
documentation is talking about, for the !draw-indicator case.
Fix that.
2015-11-02 23:06:57 -05:00
Matthias Clasen
dd01f2d407 menu item: Remove an unused member
Nobody is reading or writing this field, so we can do without it.
2015-11-02 22:20:04 -05:00
Matthias Clasen
2ba957364d menu: Fix up CSS node ordering
Keep the bottom arrow node at the end, where it belongs.
2015-11-02 21:49:10 -05:00
Matthias Clasen
25e01a3937 menu: Document CSS nodes 2015-11-02 21:40:40 -05:00
Matthias Clasen
0e41ff015c HighContrast: Update menu styling
Support the element names introduced in the previous commit.
2015-11-02 21:34:14 -05:00
Matthias Clasen
f8c3e48bd2 Adwaita: Update menu styling
Support the element names introduced in the previous commit.
2015-11-02 20:47:56 -05:00
Matthias Clasen
0b52b29dfc menu: Port to use css nodes
Use the element name menu for the main node, and use two subnodes
with name arrow and style classes .top and .bottom for the arrows
of scrolling menus.
2015-11-02 20:47:55 -05:00