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
Benjamin Otte
8ab426e6d5
themingengine: Don't use GtkBorderRadius struct
...
use GtkBorderCornerRadius instead. Also, don't do NULL checks anymore,
the property is guaranteed to never return NULL.
2012-01-09 18:37:54 +01:00
Benjamin Otte
73a632a4ae
css: Handle custom properties in a custom object
...
This way we can also get rid of the hack where we required modifying the
pspec after creation, as the name is now a separate property.
2012-01-09 18:37:53 +01:00
Cosimo Cecchi
a7f3a9ff74
themingengine: split a GtkThemingBackground object
...
Allows easier modification and general sanity of the CSS background
rendering code.
2011-12-12 12:46:52 +01:00
Cosimo Cecchi
ae60f00ba4
themingengine: fix a typo
2011-11-29 10:52:03 -05:00
Cosimo Cecchi
41b56d87e7
themingengine: move code to make switch-case more clear
...
Code is more readable with the default case as the last one in the
switch block.
2011-11-29 10:52:02 -05:00
Alexander Larsson
eb44036346
Support border-image in theme_engine_render_frame_gap
...
This is similar to the normal frame rendering, but has a clip
region applied for the gap.
2011-11-28 10:05:29 +01:00
Alexander Larsson
75642d3af2
css: Always draw the bg color under the bg image
2011-11-25 16:14:20 +01:00
Alexander Larsson
8411f1a279
Implement background-clip and background-origin
2011-11-25 16:14:19 +01:00