Commit Graph

41450 Commits

Author SHA1 Message Date
Benjamin Otte
f6d64f6591 render: Split icon rendering into its own file 2015-01-20 06:30:19 +01:00
Benjamin Otte
e697213b35 render: Remove spinner special-cases
The spinner is a regular builtin image now. There is no need to go
through the shadows code manually anymore as regular items do get
shadows automatically.

This also allows simplifying the actual spinner drawing code so that it
actually works.
2015-01-20 06:30:19 +01:00
Benjamin Otte
cc4d34e688 render: Render builtin images as regular CSS images
This not only reduces code, but also allows for builtin images to have
shadows or be transformed using -gtk-icon-transform.
2015-01-20 06:30:19 +01:00
Benjamin Otte
45541cbf10 render: Don't require passing CSS properties to builtin images
Instead, make the buiultin image get those properties itself in the
compute vfunc.
2015-01-20 06:30:19 +01:00
Benjamin Otte
9ce8ce1198 css: Move icon properties to the end
The order in which properties are defined depends on the order in which
they are computed. And that means that properties can only depend on
other properties that are defined before them.

The next patches will need this reordering.
2015-01-20 06:30:19 +01:00
Benjamin Otte
fe028e2789 render: Only render 4 different arrows
Instead of supporting every angle, just support top, right, bottom and
left and round the angle to one of those directions.

Adwaita overrides arrows anyway and doesn't even look at the angle, so
this should not be a problem.
2015-01-20 06:30:19 +01:00
Benjamin Otte
118c887656 render: Don't pass junction sides to builtin image
Instead, split the grip into 8 different builtin images (one for each
side and corner).
2015-01-20 06:30:19 +01:00
Benjamin Otte
e6b228f12a render: Extend builtin images to account for states
We add to the enum to account for the images generated for different
states.
2015-01-20 06:30:19 +01:00
Benjamin Otte
1c3dd5d46b render: Move code for rendering builtin images
Also, make it have a generic entry point with
gtk_css_image_builtin_draw().

The only feature lost so is the drawing of shadows for spinners, but
that will come back later.
2015-01-20 06:30:19 +01:00
Benjamin Otte
ebb64c2288 inspector: Remove unused hash table 2015-01-20 06:30:19 +01:00
Benjamin Otte
7ba7dff69e inspector: Remove unused treemodel properties
As a side effect, we can use _gtk_css_section_to_string() to format the
section and save a lot of code.
2015-01-20 06:30:19 +01:00
Benjamin Otte
4ba710ea30 inspector: Use GtkCssStyle and gtk_css_value_to_string() 2015-01-20 06:30:19 +01:00
Benjamin Otte
8b6d419e02 render: Move border rendering into its own file
gtkrenderborder.c now contains the implementation for
  gtk_css_style_render_border
  gtk_css_style_render_outline
2015-01-20 06:30:19 +01:00
Benjamin Otte
5ec97f6144 render: Remove unused header 2015-01-20 06:30:19 +01:00
Benjamin Otte
717877dff2 render: Rename gtkborderimage.[ch]
I want the gtkrender prefix for all filenames about rendering.
2015-01-20 06:30:18 +01:00
Benjamin Otte
cb0ca9a804 render: Use a GtkCssStyle instead of GtkStyleContext for focus 2015-01-20 06:30:18 +01:00
Benjamin Otte
5cc0cae4b7 render: Rename gtkthemingbackground.[ch]
I want the gtkrender prefix for all filenames about rendering.
2015-01-20 06:30:18 +01:00
Benjamin Otte
d25b4105d6 render: Take a GtkCssStyle for rendering frames
... and move the whole function into gtkthemingbackground.c
2015-01-20 01:23:19 +01:00
Benjamin Otte
d0a12d477e borderimage: Use a GtkCssStyle instead of GtkStyleContext 2015-01-20 01:23:19 +01:00
Benjamin Otte
dd2202288a themingbackground: Use a GtkCssStyle instead of GtkStyleContext 2015-01-20 01:23:19 +01:00
Benjamin Otte
8d94140da9 roundedbox: Take a GtkCssStyle instead of a GtkStyleContext
This is in preparation for iusing GtkCssStyle instead of GtkStyleContext
in render functions.
2015-01-20 01:23:18 +01:00
Benjamin Otte
73b3b9ee94 stylecontext: Rename function and export it.
The name now better reflects what it does, since GtkCssComputedValues
was renamed to GtkCssStyle, too.
2015-01-20 01:23:18 +01:00
Benjamin Otte
f313a8235b reftests: Fix border-style-none reftest
Unset all CSS; Adwaita was messing up things.
2015-01-20 01:15:04 +01:00
Benjamin Otte
8c534fefca dnd: Draw dnd icon with regular code
Overriding the window background is ugly because the window background
is owned by GTK and can be reset at any time.

https://bugzilla.gnome.org/show_bug.cgi?id=742646
2015-01-20 01:07:13 +01:00
Benjamin Otte
dbb8d1dd07 stylecontext: Keep track of the CSS ID
This is necessary since we do the new caching and need to distinguish
between styles with different IDs.

Fixes various test cases.
2015-01-20 01:07:13 +01:00
Aurimas Černius
39d6ec167e Updated Lithuanian translation 2015-01-19 23:00:55 +02:00
Daniel Mustieles
c1a013fe4a Updated Spanish translation 2015-01-19 18:26:58 +01:00
Daniel Mustieles
07e9385bab Updated Spanish translation 2015-01-19 18:26:39 +01:00
Matthias Clasen
63bc3542ce path bar: Don't segfault if we get disposed quickly
The file chooser code now calls into the path bar in init,
starting an async operation. This unveiled that the path bar
code was not safe against being disposed early, by causing
a crahsh of the objects-finalize test.
Fix this by making the callback check for CANCELLED.
2015-01-19 11:57:10 -05:00
Matthias Clasen
cb63fe042e Updates for 3.15.4 2015-01-19 11:02:36 -05:00
Matthias Clasen
00e08a0159 places sidebar: Drop the top margin
This looks odd in combination with the top underflow.
2015-01-19 09:37:04 -05:00
Carlos Garnacho
121fddc4d2 x11: Fetch vendor/product identifiers for input devices
These are retrieved from XInput device properties.

https://bugzilla.gnome.org/show_bug.cgi?id=740758
2015-01-19 15:09:19 +01:00
Carlos Garnacho
5e53676b46 device: Add property/getters for vendor/product identifiers
These are a construct only properties, expected to be filled in from
platform specific code.

https://bugzilla.gnome.org/show_bug.cgi?id=740758
2015-01-19 15:09:19 +01:00
Matthias Clasen
531fa78601 gtk-demo: Make editable cells demo more robust
When removing all rows, trying to add rows would not work
and throw criticals. This is fallout from a recent change
to insert rows at the right position. Fix this by handling
the 'empty model' case separately.

https://bugzilla.gnome.org/show_bug.cgi?id=743157
2015-01-19 07:36:08 -05:00
Carlos Garnacho
dc952e3d94 scrolledwindow: Don't displace invalidation by the widget allocation
This was left unmodified when GtkScrolledWindow was made a windowed widget.
Displacing here by the widget allocation is not necessary anymore, since
we are invalidating the window set at these coordinates.

This patch is a simplification of a previous one by Timm Bäder.

https://bugzilla.gnome.org/show_bug.cgi?id=742243
2015-01-19 13:06:27 +01:00
Benjamin Otte
cbabb2e6ff stylecontext: Fix FALSE/TRUE mixup
Introduced in e649c8773f. It's obviously
the root node right there.
2015-01-19 02:19:59 +01:00
Matthias Clasen
9e1f870680 scrolled window: Reduce the hover proximity distance further 2015-01-18 20:01:55 -05:00
Matthias Clasen
82e324f8ac file chooser: Fix up some focus issues
Better to switch the visible stack child early, since GtkStack
has its own focus handling now.
2015-01-18 19:45:13 -05:00
Lars Uebernickel
931a479da9 gtkimagemenuitem: create widget for action icons lazily
GtkImageMenuItem always packs a GtkImage when it is synced with a
related action. This is unnecessary when the action doesn't have an icon
set and results in excess padding when a GtkImageMenuItem is put in a
menu bar (GtkUIManager does this).

Fix this by not creating the GtkImage for icon-less actions.

https://bugzilla.gnome.org/show_bug.cgi?id=742181
2015-01-18 19:45:13 -05:00
Benjamin Otte
858c80f33e render: Replace gtk_style_context_get_border/padding()
Use _gtk_style_context_peek_property() instead.
2015-01-19 01:15:20 +01:00
Benjamin Otte
8b11e93a2d render: Get rid of gtk_style_context_get_color()
Use _gtk_style_context_peek_property() instead.
2015-01-19 01:15:19 +01:00
Benjamin Otte
4bffb6aff5 Adwaita: Make :active button gradient have 3 stops
Just add a 3rd stop in the place where the gradients for the other
states have a 3rd stop. When running transitions between states, this
avoids cross-fades and instead uses the much faster gradient
transitioning code.
2015-01-19 01:12:50 +01:00
Benjamin Otte
0fef59b486 stylecontext: Be more graceful when save() isn't matched with restore()
Instead of asserting, just print a g_warning() and try to work around
the problem.
I hope that g_warning() isn't too spammy for people that are hit with
it.

Also clarify the docs that not restore()ing after a save() is a bad
idea.

https://bugzilla.gnome.org/show_bug.cgi?id=743101
2015-01-19 01:12:50 +01:00
Benjamin Otte
e649c8773f stylecontext: Explicitly specify root node
When creating the query path, explicitly specify if it's for a root node
or for a child. Relying on gtk_style_context_is_saved() is unreliable
(for example when updating the cache).
2015-01-19 01:12:50 +01:00
Matthias Clasen
1a38c4d066 file chooser: Make search work again
The last round of filechooser redesign work had left
search somewhat dysfunctional. This commit fixes things
up enough that search is once again a working feature
of the file chooser.
2015-01-18 18:59:43 -05:00
Matthias Clasen
dcd3d15380 file chooser: Drop the location label
Bringing us close to the new design.
2015-01-18 17:57:12 -05:00
Matthias Clasen
4b47c5a649 file chooser: Don't show 'Enter Location' in save modes
In these modes, the entry is permanently visible anyway.
2015-01-18 17:39:05 -05:00
Matthias Clasen
a8cb7352c5 file chooser: Make Ctrl-L work in recent
Just switch to browse mode when we see Ctrl-L in recent mode.
https://bugzilla.gnome.org/show_bug.cgi?id=660450
2015-01-18 17:35:22 -05:00
Matthias Clasen
8133e7e624 file chooser: Ensure the path bar is initialized
There are some cases where we can end up showing the path
bar without ever setting a file on it. One example is:
1) Open file chooser
2) Hit ~
3) Hit Ctrl-L
While this is a bit of a workaround, at least it makes sure
that we never end up with an empty space where the path bar
is supposed to be.
2015-01-18 17:13:12 -05:00
Matthias Clasen
6a7b549608 trivial refactoring 2015-01-18 16:57:21 -05:00