Commit Graph

247 Commits

Author SHA1 Message Date
Benjamin Otte
52768ee6ec stylecontext: Deprecate direction property
...  and the functions implementing it. Also deprecate the direction
getter on GtkThemingEngine.
2012-12-18 18:25:42 +01:00
Benjamin Otte
9ae9649188 stylecontext: Deprecate gtk_style_context_get_font()
This is for a very simple reason: The getter is returning a const value
and the font isn't const anymore. So we need to store the font
description somewhere but we can't reuse it as it's changing all the
time (yay animations, yay inherited values). Sucks.

So keep the hack in here but deprecate the function.
2012-12-06 02:57:19 +01:00
Benjamin Otte
fc67f0d4f8 stylecontext: Remove unused private functions 2012-11-30 22:41:22 +01:00
Matthias Clasen
6400eeba35 Add a forgotten break in render_border
The GTK_BORDER_STYLE_DOUBLE case was clearly not meant to
fall through to the subsequent cases, yet it did.
Found by Coverity.
2012-11-29 23:10:34 -05:00
Benjamin Otte
df25349d63 themingengine: Do shading with GtkHSLA
... instead of with symbolic colors.
2012-11-25 03:34:02 +01:00
Benjamin Otte
fd73c1f8d9 themingengine: Draw fradctional border sizes 2012-10-31 11:09:12 +01:00
Benjamin Otte
48c6b3b4f4 gtk: Add get_type() function declarations for private objects
I'm adding a bunch of fixes for gcc complaining about
-Wmissing-declarations.

This set of patches makes private classes in gtk/*.c that use
G_DEFINE_TYPE() safe by adding definitions for the get_type() function
that can't be made static.
2012-10-02 19:32:38 +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
Cosimo Cecchi
f70fc49ebc docs: fix a number of typos and obsolete references 2012-07-02 10:41:11 -04:00
Cosimo Cecchi
f2da5f30c1 themingengine: don't use gtk_theming_engine_get()
This also avoids some useless GdkRGBA heap allocations when drawing a
border.
2012-05-16 21:57:22 -04:00
Cosimo Cecchi
87a6115df4 themingengine: don't use gtk_theming_engine_state_is_running()
It's deprecated, and always returns FALSE. This allows us to simplify a
bunch of code.
2012-05-16 21:56:54 -04:00
Cosimo Cecchi
3f7dd6f653 themingengine: render pane-separator grip only if we have no bg-image
So that it's possible to implement this with an SVG asset if we want.
2012-05-15 13:24:41 -04:00
Cosimo Cecchi
e5f0e30843 themingengine: don't hardcode the slider lines in the theming engine
It's wrong to hardcode the slider lines here; those should be rendered
as an additional background layer using background-image if the theme
specifies so.

https://bugzilla.gnome.org/show_bug.cgi?id=652304
2012-05-04 16:47:24 -04:00
Cosimo Cecchi
7e917e54a3 themingengine: simplify render_extension() default implementation
Avoid doing useless translations/rotations, since themes will most
likely set different CSS gradients using left/right/top/bottom style
classes, or use a plain color.

https://bugzilla.gnome.org/show_bug.cgi?id=674809
2012-04-26 13:50:20 -04:00
Cosimo Cecchi
d12fd1435a themingengine: render a frame in gtk_render_handle()
We already render a background there after all.

https://bugzilla.gnome.org/show_bug.cgi?id=674808
2012-04-26 13:45:24 -04:00
Benjamin Otte
883c871be6 themingengine: Fix outline-width
It's a number, not an int.
2012-04-17 08:59:20 +02:00
Benjamin Otte
04c5fdaca6 css: Remove old animation code
Deprecate public API where appropriate and make it no-ops.
Remove all calls to it.
Get rid of the 'transition' css property.

For now, this means spinners don't animate anymore.
2012-04-17 08:59:19 +02:00
Benjamin Otte
edbc8e4f57 cssvalue: Add a value for border-radius corner properties
... and convert those properties to this value.
2012-04-17 08:59:18 +02:00
Benjamin Otte
05f2249d08 css: Make outline-offset a number property 2012-04-17 08:59:18 +02:00
Benjamin Otte
ac6d61f6bb cssvalue: Add GtkCssShadowsValue
This is necessary because shadows get treated differently from other
lists when transitioning.
2012-04-17 08:59:18 +02:00
Benjamin Otte
ca17270187 cssvalue: Make GtkCssShadowValue only hold one shadow
All the properties now are a GtkCssArrayValue of GtkCssSadowValue.
GtkCssArrayValue already does everything we want, so no need to
duplicate its funtionality.
2012-04-17 08:59:17 +02:00
Benjamin Otte
c5878e8f6f themingengine: Make _gtk_theming_engine_paint_spinner() args const 2012-04-17 08:59:17 +02:00
Benjamin Otte
31565139ba stylecontext: Convert _gtk_style_context_peek_property()
Take the property id instead of the name.
2012-04-17 08:59:15 +02:00
Benjamin Otte
b65d17dda8 cssvalue: Make border styles be their own value
... and add them via gtkcssenumvalue.[ch] which will be used for all
enums.
2012-04-17 08:59:14 +02:00
Benjamin Otte
58b6d492b8 cssvalue: Add a custom RGBA value
Note: custom CSS properties still use the default GtkCssValue and always
will.
So there is a difference in css values used between those, even though
they both carry a GdkRGBA payload.
2012-04-17 08:59:14 +02:00
Benjamin Otte
645309e98b shadow: Also rename files 2012-04-17 08:59:14 +02:00
Benjamin Otte
ec5c77a552 shadow: Rename to GtkCssShadowValue
I don't want to confuse css values with other stuff, so there.
2012-04-17 08:59:13 +02:00
Benjamin Otte
ccd443796c shadow: Make this a GtkCssValue 2012-04-17 08:59:13 +02:00
Benjamin Otte
281d094b42 theming: Use peek_property() calls to query shadows 2012-04-17 08:59:13 +02:00
Alexander Larsson
7603e6e473 css: Use GtkCssValues instead of GValue in the css machinery
Also, in places where we're computing a new CssValue based on an
old one, make sure that if nothing changes we're returning a reference
to the old one, rather than creating a new identical instance.
2012-03-08 11:03:57 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Chun-wei Fan
72482c335d Bug 670499-gtkthemingengine.c: Include fallback-c89.c
This is due to the use of round and nearbyint() function, which are C99 functions...
2012-02-23 12:23:59 +08:00
Cosimo Cecchi
ae132c0a1a roundedbox: add _apply_border_radius() variations for engine/context
And make the base function just use the raw corner radii struct.
2012-02-14 16:36:56 -05:00
Cosimo Cecchi
4c61f1f663 themingengine: add a private _gtk_theming_engine_get_context()
We'll need this later.
2012-02-14 16:36:56 -05:00
Benjamin Otte
a63ff72406 css: Convert border-radius to GtkCssNumber
We can do % now, wohoo!
2012-02-02 03:14:00 +01:00
Benjamin Otte
82c2dad178 themingengine: Add a private function to query lengths 2012-02-02 03:14:00 +01:00
Benjamin Otte
7a00a95508 themingengine: Move border-image handling into render_frame_internal()
This fixes 2 bugs:
1) extensions didn't get border images
2) border-images caused outlines to not be drawn
2012-01-09 18:38:00 +01:00
Benjamin Otte
c15839f4be themingengine: Implement outline support 2012-01-09 18:38:00 +01:00
Benjamin Otte
68cfb80631 themingengine: Split out the border drawing function 2012-01-09 18:38:00 +01:00
Benjamin Otte
1b9e15485e themingengine: Implement 'dotted' and 'dashed' 2012-01-09 18:38:00 +01:00
Benjamin Otte
998055c835 css: Introduce GtkCssSide
... and use it.

This is basically an encoding of the order of sides in CSS. So when
parsing things, this is the way we parse things in.
2012-01-09 18:37:59 +01:00
Benjamin Otte
9e8e9a77b7 themingengine: Implement ridge and groove 2012-01-09 18:37:59 +01:00
Benjamin Otte
4ce34a8e13 themingengine: Redo color handling
Don't work on malloc()ed colors. Instead, use an array on the heap. This
makes it easier to copy the array.
2012-01-09 18:37:59 +01:00
Benjamin Otte
d21e7506e7 themingengine: Refactor drawing code
... and implement 'double' border-style as proof-of-concept.
2012-01-09 18:37:59 +01:00
Paolo Borelli
b8aea82743 Use the border-style subproperties for drawing
Use the newly introduced per-side property to draw frames.
2012-01-09 18:37:59 +01:00
Benjamin Otte
066f3be659 themingengine: Remove an optimization
We optimize the case later on, so no need to do it here.
2012-01-09 18:37:58 +01:00
Benjamin Otte
fce45757cb borderimage: Change memory management
Making it a on-stack object simplifies things a lot.
2012-01-09 18:37:58 +01:00
Benjamin Otte
84bc280440 borderimage: Add _gtk_border_image_new_for_context()
and use it.
2012-01-09 18:37:57 +01:00
Benjamin Otte
53b4fd69db themingengine: Add _gtk_theming_engine_peek_property()
This is useful for getting at computed values and allows accessing
images before the code autoconverts them to a cairo pattern.
2012-01-09 18:37:57 +01:00
Benjamin Otte
9181282d88 style: Remove GtkStylePropertyContext again
We need to solve this differently. I have no idea yet how, but I'll
invent something later.

This only affects win32 theming and that's broken anyway.
2012-01-09 18:37:56 +01:00