Commit Graph

44558 Commits

Author SHA1 Message Date
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
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
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
9f04efd316 Adwaita: Update menubar styling
Adapt to the changes in the previous commit.
2015-11-02 23:49:38 -05:00
a0d7b609e3 menubar: Use an element name 2015-11-02 23:49:20 -05:00
b6112c6ed6 Adwaita: Update menu item styling
Adapt to the changes in the previous commit.
2015-11-02 23:43:58 -05:00
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
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
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
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
25e01a3937 menu: Document CSS nodes 2015-11-02 21:40:40 -05:00
0e41ff015c HighContrast: Update menu styling
Support the element names introduced in the previous commit.
2015-11-02 21:34:14 -05:00
f8c3e48bd2 Adwaita: Update menu styling
Support the element names introduced in the previous commit.
2015-11-02 20:47:56 -05:00
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
f6ca908e03 menushell: don't call gtk_render_background()
GtkMenu and GtkMenuBar, the two implementations of GtkMenuShell in GTK,
already draw it.
Furthermore, rendering a background here will overdraw any rendering
that the subclass will do, such as arrows for scrolling menus.
2015-11-02 16:05:07 -08:00
7cdfee71da inspector: Do not show transient nodes
This is kind of a hack the way it's implemented, but it's necessary
for performance to ignore transient nodes as they get created all the
time (via gtk_style_context_save()) and invalidate the whole treeview.
And that causes resizes and redrawing of the treeview and performance of
the inspector would go down the drain now that we display a larger part
of the node tree.
2015-11-02 20:32:12 +01:00
81de33e906 inspector: Always show full CSS node tree
Just select the node of the current widget whenever a new one gets
selected.
2015-11-02 20:32:12 +01:00
96a485d8b2 gdkrgba: Use %g instead of %.17g to print alpha
This way 0.3 isn't printed as 0.29999999999999
2015-11-02 20:32:12 +01:00
5ebb713df5 HighContrast: Update combobox styling
Adapt to the changes in the previous commit.
2015-11-02 14:26:50 -05:00
0d12cc3354 Adwaita: Update combobox styling
Adapt to the changes in the previous commit. Some further fixes will
be necessary here.
2015-11-02 14:22:49 -05:00
d229ea3de1 combobox: Use element names
Use combobox as the element name for the main CSS nodes of
GtkComboBox and GtkComboBoxText. Add the .combo style class
to the button and entry. in a GtkComboBox or GtkComboBoxText.
2015-11-02 13:56:25 -05:00
e56bb49407 popover: Document differentiating style classes
There's a lot of popover variations out there.
2015-11-02 12:53:57 -05:00
13d091f700 button: Mention differentiating style classes
There's a lot of button variations out there, lets document
the ones we know about.
2015-11-02 12:51:00 -05:00
113c88c2cf HighContrast: Update magnifier styling
Adapt to changes in the previous commit.
2015-11-02 12:47:14 -05:00
85bfe9ee38 Adwaita: Update magnifier styling
Adapt to changes in the previous commit.
2015-11-02 12:46:45 -05:00
d5ff9af94e entry, textview: Use a dedicated style class for magnifier
This will free up "osd" as an application-level style class,
and lets us style magnifiers differently.
2015-11-02 12:40:38 -05:00
f2434e7cea file chooser button: Add a style class
Unfortunately, GtkFileChooserButton is different from the other
pickers in that it is not a button, but rather has a button.

We ignore the difference for styling purposes, and just add
a .file style class to the button.
2015-11-02 12:27:36 -05:00
957135a57c Adwaita: Fix menu separators
These were inadvertedly broken by the element name conversion
for regular separators.
2015-11-02 12:21:39 -05:00
9e2b796e77 mir: Print hscroll and vscroll values when debugging.
Signed-off-by: William Hua <william.hua@canonical.com>
2015-11-02 10:46:37 -05:00
5c53e873b1 inspector: Track updates of node styles
When the CSS style of a node changes, we want to display the new values
in the inspector.

This for example allows to see how styles update on hover or during
animations.
2015-11-01 16:45:11 +01:00
f4c30060be cssnode: Fix style updating when the CSS node ID changes
Since 4ebb5781ea ID has a specific value,
while it used to be the same as NAME.  Thus, explicitly list ID as a
radical change just like NAME.

https://bugzilla.gnome.org/show_bug.cgi?id=757397
2015-11-01 02:42:36 +01:00
79a3a7800e cssnode: Fix a typo leading to very poor cache hashing 2015-11-01 02:42:36 +01:00
eef5f27fb4 gtkcontainer: Guard internal use of deprecated public API 2015-11-01 02:42:36 +01:00
e0f4bf5d35 inspector: Store the current node in the priv struct 2015-11-01 02:42:36 +01:00
b89939f5a4 inspector: Split out a function 2015-11-01 02:42:36 +01:00
7568d17a15 toolpalette: Use element names
Give the GtkToolPalette and GtkToolItemGroup the element
names toolpalette and toolitemgroup.
2015-10-31 21:02:36 -04:00
cacc63ea4b HighContrast: Update toolbutton styling 2015-10-31 20:55:51 -04:00
1bc2913f52 Adwaita: Update tool button styling 2015-10-31 20:52:41 -04:00
4323dd34f3 tool button: Add an element name
Unsurprisingly, it is toolbutton.
2015-10-31 20:52:09 -04:00
dba8eba6db HighContrast: Update toolbar styling
Adapt to the changes in the previous commit.
2015-10-31 20:43:07 -04:00
5ffd54aca8 Adwaita: Update toolbar styling
Adapt to the changes in the previous commit.
2015-10-31 20:42:41 -04:00
7ee7019ca7 toolbar: Use an element name instead of a style class
The element name is ... toolbar.
2015-10-31 20:30:56 -04:00
479d64e89a progress bar: Add CSS documentation 2015-10-31 20:30:15 -04:00
ca385af3c4 HighContrast: Update progressbar styling
Adapt to the changes in the previous commit.
2015-10-31 20:24:46 -04:00
71afd762ed Adwaita: Update progressbar styling
Adapt to the changes in the previous commit.
2015-10-31 20:24:19 -04:00
73704d98cc progressbar: Convert to CSS nodes
Use the element names progressbar and progress.
2015-10-31 20:20:13 -04:00
bab20f1d10 trivial formatting fix 2015-10-31 19:23:47 -04:00
7ea33d82ed Remove a duplicate include 2015-10-31 19:19:53 -04:00
d3abd83330 Adwaita: Fix up color button styling
There was one forgotten instance of the GtkColorSwatch type name.
2015-10-31 19:13:32 -04:00
7465601c1e HighContrast: Update the frame styling
Adapt to the changes in the previous commit.
2015-10-31 19:11:18 -04:00