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
Matthias Clasen
b46ef0eb87
Fix distcheck
...
A mention of gtkmodelmenu.h was leftover in Makefile.am.
2012-09-18 15:10:55 -04:00
Matthias Clasen
e0f2492ce8
Avoid an unintented export
...
GtkStyleCascade is entirely private, so don't leak any symbols.
2012-09-18 13:54:22 -04:00
Cosimo Cecchi
5addd8cbe6
mountoperation: fix previous commit
...
We don't want to call this method if there's no shell agent.
2012-09-18 13:48:07 -04:00
Cosimo Cecchi
a67e885531
mountoperation: don't timeout proxied mount operation dialogs
...
When we proxy mount operation dialogs to the Shell agent, don't use a
timeout for the remote calls, since we will be waiting on user
interaction.
2012-09-18 13:46:14 -04:00
Benjamin Otte
4ff9b07490
Raleigh: Improve the spinner animation
...
Make it closer to how it was previously.
2012-09-18 15:28:42 +02:00
Ryan Lortie
99a53112ec
GtkAccelLabel: adjust recent accel changes
...
In the event that a GtkAccelKey was present for the closure but it
contained a keyval of 0 the previous code would show "". After the
recent adjustments, "-/-" would be shown in this case.
It turns out to be a pretty common case, so fix the logic to stop using
'0' as a magic value to mean "don't have an accel" and add a separate
boolean for that purpose.
2012-09-18 08:57:53 -04:00
Benjamin Otte
8c3caae33f
cssimage: Add a hack to get antialiased circles
...
We like to draw circles in themes, and as radial gradients are the only
okayish way to do that, at least make them antialiased.
2012-09-18 13:26:20 +02:00
Matthias Clasen
bf2cf23262
Force spinners to be square
2012-09-17 22:47:36 -04:00
Matthias Clasen
6210e7fb80
GtkSettings: Properly clean up style providers
2012-09-17 22:31:25 -04:00
Matthias Clasen
ab3d6a0b0a
Revert "Bind the themes to the livecycle of the screen"
...
This reverts commit 1f5dea9eba
,
since it was causeing noticable behaviour changes.
Previously, GTK_DATA_PREFIX=/ ./gtk3-demo would start
gtk3-demo with the Raleigh theme. With that change, it
was starting with no theme at all (i.e. all black).
2012-09-17 22:31:25 -04:00
Benjamin Otte
047b6b7194
css: Add a spinner animation to the default theme
2012-09-17 20:40:01 +02:00
Benjamin Otte
0cecf315fd
cssanimation: Implement pausing the animation
2012-09-17 20:40:01 +02:00
Benjamin Otte
d74e1b9ac9
stylecontext: Always create animations
...
Even when there is no current values, do create animations. This ensures
that animations do exist for unmapped widgets when they get mapped
later.
2012-09-17 20:40:01 +02:00
Benjamin Otte
4a281edc87
stylecontext: Only create transitions conditionally
...
While regular animations should always be created, transitions should
not. This patch allows to express this by passing NULL as the values to
transition from.
It also adds a gtk_style_context_should_create_transitions() function
that returns TRUE when transitions should be created.
2012-09-17 20:40:01 +02:00
Benjamin Otte
7712d41b5e
stylecontext: Refactor the way animations are started and stopped
...
We now create animation objects unconditionally, but we only run the
animation loop when gtk_style_context_should_animate() return TRUE.
2012-09-17 20:40:01 +02:00
Benjamin Otte
13cbd22d17
stylecontext: Clear animations for values kept in cache
2012-09-17 20:40:01 +02:00
Benjamin Otte
37dac2a481
stylecontext: Remove leftover debugging
...
... that actually was both wrong, a performance failure and has been
there since the original checkin.
Updating the cached style data absolutely does not mean clearing all
cached style data first. There's nothing to update then.
2012-09-17 20:39:14 +02:00
Benjamin Otte
e2cc9f3afc
csscomputedvalues: Handle starting animations differently
2012-09-17 20:39:14 +02:00
Benjamin Otte
bf19d89510
animation: Don't set the changed properties anymore
...
The code is not needed anymore. And it looked wrong, too, so I'm glad
it's gone.
2012-09-17 20:39:13 +02:00
Benjamin Otte
2147473131
csscomputedvalues: Compute the changes by animations ourselves
...
Instead of letting the animation set a bitmask unconditionally, actually
compare the before and after values for changes.
2012-09-17 20:39:13 +02:00
Benjamin Otte
ee6f886434
cssimage: Make cross-fade code safe for non-integer sizes
...
This includes sizes < 1px, which previously caused a SEGV.
2012-09-17 20:39:13 +02:00
Benjamin Otte
f77f6f3322
cssvalue: Fix out-of-bounds in array transition code
2012-09-17 20:39:13 +02:00
Cosimo Cecchi
ebf9e9db42
themingengine: animate spinners again
...
Using the animation specified with CSS by the theme.
2012-09-17 20:39:13 +02:00
Benjamin Otte
7cf2adfec4
cssvalue: Always consider values equal to themselves
2012-09-17 20:39:13 +02:00
Cosimo Cecchi
bdd64dc055
csseasevalue: fix wrong priority in steps easing transformation
...
We need to add parentheses around the ternary operator, or it will be
applied to the whole expression.
2012-09-17 20:39:13 +02:00
Benjamin Otte
eb6ad3562e
cssimage: Implement (most of) current cross-fade syntax
...
The CSS4 spec adapted their cross-fade syntax again. Yay!
(The previous parser was completely broken anyway...)
2012-09-17 20:39:13 +02:00
Benjamin Otte
a7ec3ba53f
csscomputedvalues: Get rid of animated values
...
Merge the animated values code into the computed values code. This
should get rid of various bugs related to animated->computed updating.
2012-09-17 20:39:12 +02:00
Benjamin Otte
7248c19037
csscomputedvalues: Store animated values here
...
Actually use the GtkCssComputedValues to store the computed values here
instead of putting them into the GtkCssAnimatedValues separately.
2012-09-17 20:39:12 +02:00
Benjamin Otte
94a3bd21e5
csscomputedvalues: Allow storing animated values here
...
It's not used yet, but that will come in the next patch(es). This is a
separate patch to make sure we didn't mess up anything.
2012-09-17 20:39:12 +02:00
Benjamin Otte
89d6d34bee
csscomputedvalues: Inline function
2012-09-17 20:39:12 +02:00
Benjamin Otte
7224f897d6
animation: Add _gtk_style_animation_is_static()
...
This will be useful to not trigger updates all the time when nothing is
happening (ie due to animations being paused or due to them having
reached their final value).
2012-09-17 20:39:12 +02:00
Benjamin Otte
229b6fe17a
css: Add animation support
...
This adds the GtkCssAnimation class and the code needed to hook it into
GtkStyleContext. It takes the values out of the CSS "animation"
properties and does animations. See
http://dev.w3.org/csswg/css3-animations/
for details.
Note that the code for starting and stopping animations with widget
visibility doesn't work yet.
2012-09-17 20:39:12 +02:00
Benjamin Otte
206aa209ae
widget: Use gtk_widget_queue_draw() for queueing redraws
...
This change is necessary because the old code did not accound for corner
cases (like translucent child windows), which could stop
gtk_widget_queue_resize() to not trigger redraws.
2012-09-17 20:39:12 +02:00
Benjamin Otte
554002028c
stylecontext: Provide a function for getting the style provider
...
This will be necessary for creating the computed values for keyframes.
2012-09-17 20:39:12 +02:00
Benjamin Otte
e1e9dec1b2
window: Add the .background class to windows unconditionally
2012-09-17 20:39:11 +02:00
Benjamin Otte
854585e770
css: Implement 'animation' shorthand parsing
2012-09-17 20:39:11 +02:00
Benjamin Otte
c69e30d65a
cssparser: Don't use a free'd string in error messages
2012-09-17 20:39:11 +02:00
Benjamin Otte
5510bef70a
cssstyleproperty: Add animation properties
2012-09-17 20:39:11 +02:00