Commit Graph

17295 Commits

Author SHA1 Message Date
Benjamin Otte
4943cc4c12 stylecontext: Actually use superset matcher
... when looking up the needed changes.

This is what that matcher was actually written for, but it seems I never
hooked it in.
2012-10-01 14:23:15 +02:00
Benjamin Otte
a31d5379a0 css: Add forgotten enum value
This broke compilation in a7d2138544.
2012-10-01 13:11:11 +02:00
Benjamin Otte
9138fc11cf cssanimation: Don't store the end value in a CSS transition
Instead, query the intrinsic value at runtime.
2012-10-01 13:09:49 +02:00
Benjamin Otte
a7d2138544 treeview: Invalidate children properly
GtkTreeView still uses regions (yay!), so we need to invalidate the
regions when hiding/showing children, and not their siblings.
2012-10-01 11:54:18 +02:00
Benjamin Otte
f1ad9051bd treeview: Fix computing child paths
We were adding the GtkButton class twice.
2012-10-01 11:48:50 +02:00
Benjamin Otte
2f89505b54 csscomputedvalues: Unset the section when setting a new value
Otherwise we end up with the wrong section if no new one is specified.
2012-10-01 10:32:59 +02:00
Cosimo Cecchi
a2bef8ca51 symboliccolor: fix a critical warning
This was introduced in 0cc32eae62
2012-09-28 12:49:22 -04:00
Benjamin Otte
1454ba15ba css: Huge refactoring to avoid computing wrong values
Here's the shortest description of the bug I can come up with:
When computing values, we have 3 kinds of dependencies:
(1) other properties ("currentColor" or em values)
(2) inherited properties ("inherit")
(3) generic things from the theme (@keyframes or @define-color)
Previously, we passed the GtkStyleContext as an argument, because it
provided these 3 things using:
(1) _gtk_style_context_peek_property()
(2) _gtk_style_context_peek_property(gtk_style_context_get_parent())
(3) context->priv->cascade

However, this makes it impossible to lookup values other than the ones
accessible via _gtk_style_context_peek_property(). And this is exactly
what we are doing in gtk_style_context_update_cache(). So when the cache
updates encountered case (1), they were looking up the values from the
wrong style data.

So this large patch essentially does nothing but replace the
context argument in all compute functions with new arguments for the 3
cases above:
(1) values
(2) parent_values
(3) provider

We apparently have a lot of computing code.
2012-09-28 18:27:49 +02:00
Benjamin Otte
0cc32eae62 symboliccolor: Change prototype of _gtk_symbolic_color_resolve_full()
We can juts pass a GtkStyleProviderPrivate, that one has the vfunc we
want already. So no need to pass vfuncs anymore.
2012-09-28 18:27:49 +02:00
Benjamin Otte
448cdb0737 css: Move declaration
... for future changes. This is just to check that compilation still
succeeds.
2012-09-28 18:27:49 +02:00
Benjamin Otte
e2ec13c5d2 cssvalue: Remove unnecessary include 2012-09-28 18:27:49 +02:00
Benjamin Otte
5c4fc16cd4 css: Don't crash when printing gradients
... in the fallback code. Instead print a FIXME.
2012-09-28 18:27:49 +02:00
Benjamin Otte
94c0c1542b cssvalue: Don't crash when printing NULL strings
A NULL string should be printed as "none".
2012-09-28 18:27:49 +02:00
Benjamin Otte
5e1ae36b2f section: Add _gtk_css_section_to_string()
Mostly for debugging pruposes, but use it for printing CSS errors in
GtkCssProvider, too.
2012-09-28 18:27:49 +02:00
Benjamin Otte
fbb4c61665 stylecontext: Rebuild cached styles with correct classes/regions
Previously, we were using the default classes and regions. That's
obviously wrong.
2012-09-28 18:27:48 +02:00
Alexander Larsson
ecd84fac48 iconview: Render focus even in non-selected items
This is needed for the SELECTION_NONE mode where nothing is ever
selected, but its also needed for CTRL-<key> keynav that moves the
focus without changing the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=684984
2012-09-27 19:43:50 +02:00
Stefano Facchini
3c7a6581dc treeview: fix size of the dragged column header
Currently the GdkWindow used for dragging is created once when
the first drag starts, and the reused identical each time.
Instead, just recreate it for each drag, with the correct size.
2012-09-27 17:09:55 +02:00
Alexander Larsson
f9d77959a4 Don't create GdkWindows with NULL parents
This is not multi-display safe, you always need to pick the right
parent based on which screen your widget is at.
2012-09-27 13:46:26 +02:00
Matthias Clasen
4b5db54fa7 Remove gtk_menu_button_[sg]et_menu
These functions were never in a stable release, and have
been renamed to gtk_menu_button_[sg]et_popup.
2012-09-24 00:08:30 -04:00
Matthias Clasen
0b11e08f87 Straigthen includes in gtkmenubutton.[hc]
Don't include gtk.h, but just include whats needed.
2012-09-24 00:01:39 -04:00
Matthias Clasen
31698e718c Fix the build 2012-09-23 23:57:34 -04:00
Matthias Clasen
f9ed513361 Add a missing GDK_AVAILABLE_IN annotation 2012-09-23 23:38:04 -04:00
Matthias Clasen
563a874f0f Typo fix 2012-09-23 23:37:46 -04:00
Matthias Clasen
cfb6da9b55 Document gtk_application_get_window_by_id 2012-09-23 21:15:27 -04:00
Matthias Clasen
1bfa58951c Remove empty doc comments
These confuse gtk-doc. All these functions are documented
in gtkclipboard.c
2012-09-23 21:14:46 -04:00
Matthias Clasen
d03ceb8b2c GtkMenuButton: improve rtl support
Show the menu at the side the arrow points to,
also in rtl locales.
https://bugzilla.gnome.org/show_bug.cgi?id=684606
2012-09-21 23:53:11 -04:00
Matthias Clasen
72d8deb606 GtkSearchEntry: add rtl support
Flip the clear icon in rtl locales.
https://bugzilla.gnome.org/show_bug.cgi?id=684607
2012-09-21 23:41:28 -04:00
Benjamin Otte
cca8cd2b21 Revert "blur: Use recording surface for capturing things to blur"
This reverts commit f2cb8f1270.

The patch actually didn't work for at least text. I currently have no
clue why, but I suspect it requires investigating Cairo code and
recording surfaces, and I'll not do that right now.
2012-09-21 18:51:46 +02:00
Pavel Vasin
71d2b68da0 GtkMenuItem: fix leaked action_helper 2012-09-20 15:17:20 -04:00
Ryan Lortie
85700627aa gtkapplication: fix some crashing "leak fixes"
https://bugzilla.gnome.org/show_bug.cgi?id=684258
2012-09-20 14:22:52 -04:00
Ignacio Casal Quinteiro
d39977878e colobutton: skip set_rgba as it is already in the choosercolor interface 2012-09-20 12:51:10 +02:00
Benjamin Otte
f2cb8f1270 blur: Use recording surface for capturing things to blur
This gets around clipping issues quite nicely and provides us with a
(mostly theoretical) performance boost.
2012-09-20 02:45:42 +02:00
Andrea Cimitan
3377271ef0 shadow: add blur to icon-shadow (spinner) 2012-09-20 02:45:42 +02:00
Andrea Cimitan
10e2684870 shadow: add blur to icon-shadow (icon) 2012-09-20 02:45:42 +02:00
Andrea Cimitan
7c3864ba79 shadow: add blur to box-shadow 2012-09-20 02:45:42 +02:00
Andrea Cimitan
59eb3ef30e shadow: add blur to text-shadow 2012-09-20 02:45:41 +02:00
Cosimo Cecchi
b609686133 shadow: add code to render blurred shadows
Split out the blurred shadow rendering in three steps:
- creation of a surface of the appropriate size - we use the clip
  rectangle as a good measurement for the size, since we won't render
  out of it anyway
- painting the unblurred shape on the surface - this is responsibility
  of the single shadow implementations
- blur the surface and compose the result back on the original cairo_t

This means we can share code between the implementations for the first
and third steps; it also makes the code independent of the rendered
size, so we can avoid passing down a cairo_rectangle_t with e.g. the
icon coordinates.
2012-09-20 02:45:41 +02:00
Benjamin Otte
a239f2e8b0 blur: Do the same thing for rows and cols 2012-09-20 02:45:41 +02:00
Benjamin Otte
502a2bf625 blur: Use rowstride 2012-09-20 02:45:41 +02:00
Benjamin Otte
65ba8901aa blur: Simplify code
It's always the same code, so there's no need for switch statements.
2012-09-20 02:45:41 +02:00
Benjamin Otte
267d1793c6 blur: Fix pixel sizes
The code accesses pixels in a chunks of 4 bytes, so we must only support
formats where the size of a single pixel is 4 bytes.
Fix RGB24 to be 4 bytes (the alpha channel is ignored) and disallow A8.
2012-09-20 02:45:41 +02:00
Benjamin Otte
1cecaf6d7e blur: Take the radius as a double parameter
It's only ever used like that
2012-09-20 02:45:41 +02:00
Andrea Cimitan
43673dafdc Add code for blurring (original code from Unico, copyright fine for Gtk+) 2012-09-20 02:45:41 +02:00
Cosimo Cecchi
2d5fa78528 spinbutton: fix style context path for internal buttons
We were adding one child too much to the style context path when
generating it for the internal buttons, which in turn caused sibling
selectors from the theme such as :first-child to apply to both buttons
under certain circumstances. Spotted by Lapo Calamandrei.
2012-09-19 15:41:19 -04:00
Cosimo Cecchi
67e44e6a4e Revert "levelbar: start filling from the bottom"
This reverts commit 4b3ed75f7d.

I didn't see https://bugzilla.gnome.org/show_bug.cgi?id=684288 - it
makes more sense to properly fix this for the next cycle.
2012-09-19 15:23:43 -04:00
Stefano Facchini
4b3ed75f7d levelbar: start filling from the bottom
As long as we don't have an API for explicitly inverting the bar, it
makes more sense for the progress in vertical orientation to fill from
the bottom.
2012-09-19 15:18:45 -04:00
Benjamin Otte
6696aa2128 cssprovider: Remove another path that can't be reached
... because the return value of a function is always TRUE.
2012-09-19 15:32:38 +02:00
Benjamin Otte
697ed544dd docs: Clarify GtkCssProvider loading return values 2012-09-19 15:30:21 +02:00
Benjamin Otte
ee91f22086 cssprovider: Get rid of return value
... that is always TRUE.
2012-09-19 15:18:51 +02:00
Murray Cumming
1c366eb75e GtkSettings: Fix small typo in docs. 2012-09-19 09:54:47 +02:00