Commit Graph

345 Commits

Author SHA1 Message Date
Jasper St. Pierre
78fb102002 st: Use generic marshaller
https://bugzilla.gnome.org/show_bug.cgi?id=662152
2012-01-25 19:03:01 -05:00
Jasper St. Pierre
f6508b51a2 st-im-text: Guard against multiple dispose
This could cause warnings like "invalid (NULL) pointer instance"

https://bugzilla.gnome.org/show_bug.cgi?id=665000
2012-01-25 19:01:33 -05:00
Owen W. Taylor
e58c82fc04 theme-node-drawing: don't crash if st_theme_node_paint() is called on an empty area
When st_theme_node_paint() was called with zero width or height and a theme
node with a shadow, we'd crash because we'd fail to allocate a texture with
an empty size, then unreference the NULL pointer.

https://bugzilla.redhat.com/show_bug.cgi?id=748293
https://bugzilla.gnome.org/show_bug.cgi?id=668050
2012-01-16 17:38:38 -05:00
Owen W. Taylor
91ca86ffe4 st-theme-node-drawing: clear border buffer before drawing on it
A new texture has undefined contents - when we're creating a shadow,
we need to clear the contents of the texture before drawing the border
and background into it.

https://bugzilla.gnome.org/show_bug.cgi?id=668048
2012-01-16 17:38:38 -05:00
Quentin Glidic
25948f214e St: Implement background-size CSS property
Implement the background-size CSS property, specified by the CSS
Backgrounds and Borders Module Level 3, including the keywords
"contain", "cover", and fixed-size backgrounds.

https://bugzilla.gnome.org/show_bug.cgi?id=633462
2011-12-23 14:23:23 -05:00
Giovanni Campagna
875b6d131b StTextureCache: fix load_sliced_image with different sizes
grid_width and grid_height were inverted, which caused a crash
in GdkPixbuf code. This was never noticed because the animation
in the panel is a square.

https://bugzilla.gnome.org/show_bug.cgi?id=666606
2011-12-20 19:25:43 +01:00
Florian Müllner
56f312dc03 st: Fix typo
Commit c7846e1 introduced a small typo, fix.
2011-12-19 16:08:37 +01:00
Jasper St. Pierre
f2cbddc196 st-theme-node: Fix memory leak
We ref the icon_colors in st_theme_node_get_icon_colors, but never
unref it.
2011-12-19 09:47:26 -05:00
Jasper St. Pierre
c7846e172f st-icon: Fix memory leak
We were never freeing the dup'd icon_name string for an StIcon.
2011-12-19 09:47:26 -05:00
Jasper St. Pierre
faff0738eb Do not use the default stage
https://bugzilla.gnome.org/show_bug.cgi?id=664052
2011-12-15 16:13:29 -05:00
Jasper St. Pierre
628e59894b Doc fixes
https://bugzilla.gnome.org/show_bug.cgi?id=663277
2011-11-07 15:24:59 -05:00
Florian Müllner
1760ba1279 st-texture-cache: Fix colored symbolic icons
Commit b7bf712b97 broke colored symbolic icons by never including
the requested colors in the texture load request.

https://bugzilla.gnome.org/show_bug.cgi?id=662998
2011-10-29 19:33:30 +02:00
Jasper St. Pierre
1aa97b19f7 Stop using APIs deprecated in Clutter master
https://bugzilla.gnome.org/show_bug.cgi?id=662627
2011-10-24 17:18:26 -04:00
Jasper St. Pierre
be72b1d066 st-texture-cache: Unref each texture when we destroy the async load data
We ref the textures when we add them to the list, so we should unref
them when we destroy the list.
2011-10-21 17:43:11 -04:00
Jasper St. Pierre
9b38c5b304 Minor documentation fixes 2011-10-20 16:26:07 -04:00
Jasper St. Pierre
0dd4584157 st-texture-cache: Rearrange code to prevent some work and a memory leak
For some reason, the texture cache decides to make a request and then look up
an icon in the icon theme. If it's valid, it just returns, fine, but if it
doesn't add the icon, it tries to undo the request, leaking an
AsyncTextureLoadData that isn't freed in the process.

https://bugzilla.gnome.org/show_bug.cgi?id=660968
2011-10-20 15:26:41 -04:00
Jasper St. Pierre
b7bf712b97 st-texture-cache: Merge strategies
Rather than have five or six structs allocated duplicating data,
just keep one and simplify the code considerably.

Again, part of my ongoing quest to merge St and Mx.

https://bugzilla.gnome.org/show_bug.cgi?id=660968
2011-10-20 15:19:00 -04:00
Jasper St. Pierre
5d25716cee st-texture-cache: Use ANSI C-style comments
https://bugzilla.gnome.org/show_bug.cgi?id=660968
2011-10-19 12:40:44 -04:00
Florian Müllner
a26a77f9db st-entry: Display a capslock warning in password entries
Implement the GtkEntry behavior of showing a warning icon when
capslock is turned on while entering hidden text.

https://bugzilla.gnome.org/show_bug.cgi?id=660806
2011-10-17 22:43:47 +02:00
Jasper St. Pierre
cecb1a41fb st-texture-cache: Fix a minor crash when computing our border-radius
If we add a 0-sized actor with a border-radius, we will crash as we try to
allocate a 0-sized texture in Cogl. Bail out early instead of doing that.

https://bugzilla.gnome.org/show_bug.cgi?id=661617
2011-10-13 14:15:18 -04:00
Florian Müllner
23a4d4c69e texture-cache: Don't share requests for uncachable textures
Make create_texture_and_ensure_request() aware of the caching
policy to avoid returning the same texture for different
images.

https://bugzilla.gnome.org/show_bug.cgi?id=660585
2011-10-05 21:30:27 +02:00
Jasper St. Pierre
f9b37a21e8 StThemeNodeDrawing: Remove useless LoadCornerData
Done as part of my quest to merge Mx and St:

https://github.com/magcius/mx/tree/st-rebase

https://bugzilla.gnome.org/show_bug.cgi?id=660968
2011-10-05 12:24:28 -04:00
Jasper St. Pierre
0ccb280008 st-theme-node-drawing: Fix centering when the image needs to be scaled
The translate coordinates are calculated as the offset after the scale, so it
needs to be applied after the scale as well. This fixes random centering issues
in the UI.

https://bugzilla.gnome.org/show_bug.cgi?id=660674
2011-10-04 15:46:01 -04:00
Florian Müllner
e49a595f54 st-texture-cache: Don't cache GIcons which cannot be serialized
For GIcons we use g_icon_to_string() in the key, but the function
will return NULL if the icon cannot be serialized. As a result,
all non-serializable GIcons of the same size end up with the same
cache key - an example for this are contacts with avatars, which
currently all end up with the same image.
To fix, opt out of caching for GIcons which cannot be serialized.

https://bugzilla.gnome.org/show_bug.cgi?id=660585
2011-09-30 20:14:25 +02:00
Florian Müllner
8bd5b1e696 st: Fix crash in theme-node-transition
Setting up the framebuffers for transitions may fail, in which case
the material used for drawing is left uninitialized, so trying to
access it results in a crash.
Instead bail out in this case, which means that we won't paint
anything during the transition - still, drawing errors are better
than crashes ...

https://bugzilla.gnome.org/show_bug.cgi?id=659676
2011-09-26 19:52:36 +02:00
Adel Gadllah
2140a498a2 StTable: Silence row_span warning for now
This seems to be very noisy and generally harmless so
silence it up for now.

https://bugzilla.gnome.org/show_bug.cgi?id=658939
2011-09-19 21:25:07 +02:00
Adel Gadllah
09fe12d0c1 st-scroll-view-fade: Pass a precomputed fade area to the shader
Instead of doing complex computations in the shader just pass in the correct
fade area (taking padding, scrollbars and rtl into account) and just work
with that in the shader.

That fixes a bug where we would fade the scrollbar when padding is present.

https://bugzilla.gnome.org/show_bug.cgi?id=659159
2011-09-19 18:51:01 +02:00
Ray Strode
b12967b930 st-adjustment: Drop all animation-y stuff
StAdjustment has some non-functional and unused animation vestiges
like the "elastic" property, st_adjustment_interpolate() and
st_adjustment_clamp().

This commit vacuums that stuff up so it doesn't tempt anyone into
trying to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-28 12:14:17 -04:00
Ray Strode
4e9e6e75d3 st-box-layout: Document insertion apis
This commit just adds some brief doc comments
to st_box_layout_insert_actor() and
st_box_layout_insert_before()

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-27 15:25:01 -04:00
Dan Winship
dbeab0ef87 St: fix container paint volumes
If a container is not clip-to-allocation, then its get_paint_volume()
needs to include the paint volumes of all of its children, since they
(or their children) may paint outside the container's allocation.

Also, if the superclass get_paint_volume() returns FALSE, then the
subclass should return FALSE too.

https://bugzilla.gnome.org/show_bug.cgi?id=655812
2011-08-03 09:16:55 -04:00
Dan Winship
2a96964204 st-container: fix a misspelled variable name 2011-08-01 14:29:15 -04:00
Alejandro Piñeiro
4322a20cbe Added StButtonAccessible
Basic skeleton and the proper role (ATK_ROLE_PUSH_BUTTON)
2011-08-01 19:20:08 +02:00
Adel Gadllah
0f49f36519 Use CLUTTER_CAIRO_FORMAT_ARGB32: rather then doing a byte order check
Clutter 1.7.x introduced CLUTTER_CAIRO_FORMAT_ARGB32: which can be used when
sharing textures/data with cairo without having to do check the
byte order and choose the appropriate format by hand.

https://bugzilla.gnome.org/show_bug.cgi?id=654577
2011-07-13 23:10:38 +02:00
Jasper St. Pierre
a007b1bb2d st-entry: Inherit all colors
https://bugzilla.gnome.org/show_bug.cgi?id=643768
2011-07-12 15:30:59 -04:00
Jasper St. Pierre
f524138a64 st-entry: Support a different color for selected text
This should improve readability in text entries where the text
color is very close to the color of the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=643768
2011-07-12 15:30:59 -04:00
Jasper St. Pierre
325462d9bf St: Take the cairo fallback for large corners
The cogl path pads the corners out to the maximum corner radius to make the
math and painting logic easier. Unfortunately, when the radius exceeds the
actor's halfsize, the padding ends up interfering with other corners, creating
a big mess of rendering errors.

It'd be extremely complicated to fix this properly in the Cogl code,
so take the Cairo fallback.

https://bugzilla.gnome.org/show_bug.cgi?id=649513
2011-07-09 18:05:07 -04:00
Jasper St. Pierre
ee4ae62946 St: Implement CSS3 specification for reducing border-radius
Currently, any cases of overlapping corners were just ignored and rendered incorrectly.
Implement the corner overlap algorithm as specified by the W3C to fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=649513
2011-07-09 18:04:51 -04:00
Adel Gadllah
620330db8f StScrollViewFade: Fix scrollbar size handling
Only skip the areas of the scrollbars when they are invisible
and add take the horizontal scrollbar into account as well
when calculating the faded area.

https://bugzilla.gnome.org/show_bug.cgi?id=651866
2011-06-29 18:48:49 +02:00
Adel Gadllah
3765acc0a5 StScrollView: Expose scrollbars visibility as property
Add two boolean readonly properties that tell whether
the scrollbars are visible or not.

https://bugzilla.gnome.org/show_bug.cgi?id=651866
2011-06-29 18:44:25 +02:00
Giovanni Campagna
2674d96e54 StTheme: retrive the list of custom stylesheets and use it in loadTheme()
Using the list of stylesheets loaded with st_theme_load_stylesheet(),
one can build an StTheme that is completely identical to the previous
one, except for one property (application-stylesheet).
This allows rt and the user-theme extension to work while respecting
the theming of other extensions.

https://bugzilla.gnome.org/show_bug.cgi?id=650971
2011-06-15 21:56:37 +02:00
Jasper St. Pierre
e7289378b7 st-scroll-view: Make the fade effect and offset themable
Theme authors now have the power (and responsibility) of creating fade
effects with the new CSS length property '-st-fade-offset'. A value of
0 disables the effect.

This new CSS approach replaces the current programmatic toggle of
the 'vfade' property. A new CSS style class name 'vfade' is used as
a replacement for the old property.

https://bugzilla.gnome.org/show_bug.cgi?id=651813
2011-06-04 15:43:49 -04:00
Florian Müllner
af51e8df7b st-shadow: Use non-deprecated GAtomic API 2011-06-02 23:06:38 +02:00
Colin Walters
22ef63cc44 st-icon-colors: Use non-deprecated GAtomic API 2011-06-02 16:22:28 -04:00
Colin Walters
fdefb317cb StTextureCache: Fix leak of key string
Also micro-optimize by avoiding another strdup(), instead pass
ownership of the string when we can.

https://bugzilla.gnome.org/show_bug.cgi?id=649508
2011-05-24 13:00:46 -04:00
Dan Winship
c5ca4e3ff0 StImText: remove two references to old clutter bugs
Remove a workaround for clutter_actor_get_transformed_position() not
working inside paint(), and remove a comment about
ClutterText::position not being properly notified, since it is now.
(However, it doesn't seem worth it to rewrite the code to use
notification, since that would actually end up being more complicated
than the current solution.)

https://bugzilla.gnome.org/show_bug.cgi?id=648758
2011-05-23 10:51:23 -04:00
Dan Winship
55771b437b StScrollBar: use clutter_actor_has_allocation()
StScrollBar was tracking whether or not it currently had a valid
allocation, but since Clutter 1.4 there is a method it can call to get
that information instead.

https://bugzilla.gnome.org/show_bug.cgi?id=648758
2011-05-23 10:51:23 -04:00
Christopher Aillon
73cae8ce9a st-scroll-view: remove spurious assignment of uninitialized data
https://bugzilla.gnome.org/show_bug.cgi?id=649596
2011-05-11 16:19:00 -04:00
Colin Walters
dcd07eb23f StTextureCache: plug leak in not-found icon case
Need to free the key too.

https://bugzilla.gnome.org/show_bug.cgi?id=649508
2011-05-11 16:18:10 -04:00
Colin Walters
c975740f92 st-private: Correct fix for memory leak
The previous fix in 72f9f482d was wrong; we need to keep around
the buffer until cairo is done with the pattern.

https://bugzilla.gnome.org/show_bug.cgi?id=649497
2011-05-11 11:23:53 -04:00
Colin Walters
72f9f482d6 st-private: Fix memory leak
==13810== 11,360 bytes in 1 blocks are definitely lost in loss record 18,574 of 18,765
==13810==    at 0x4005447: calloc (vg_replace_malloc.c:467)
==13810==    by 0x5191882: standard_calloc (gmem.c:107)
==13810==    by 0x51920A7: g_malloc0 (gmem.c:196)
==13810==    by 0x4056201: blur_pixels (st-private.c:466)
==13810==    by 0x40573B4: _st_create_shadow_cairo_pattern (st-private.c:710)
==13810==    by 0x4070746: st_theme_node_paint (st-theme-node-drawing.c:856)
==13810==    by 0x3FEFFFFF: ???

https://bugzilla.gnome.org/show_bug.cgi?id=649497
2011-05-05 16:02:00 -04:00