Commit Graph

578 Commits

Author SHA1 Message Date
Alban Browaeys
e96d9e0ea1 st-icon: check if gicon is null before unref.
Commit a6b49fe7d6
introduced a check for equality of priv->gicon vs gicon
and unref then return early if so. But if both are null,
we should not unref gicon. Only return.

https://bugzilla.gnome.org/show_bug.cgi?id=698863
2013-05-02 09:51:32 +02:00
Giovanni Campagna
ef9c50e63a StIcon: use g_signal_connect_object() for safety
Prevent a crash in case an icon is destroyed before the texture
finishes loading, and something else is keeping the texture alive
for any reason.

https://bugzilla.gnome.org/show_bug.cgi?id=696720
2013-04-29 00:19:59 +02:00
Jasper St. Pierre
c3775c0f56 st-theme-node: Disable transitions if animations-enabled is off
https://bugzilla.gnome.org/show_bug.cgi?id=698391
2013-04-19 14:34:06 -04:00
Florian Müllner
2b439ef209 theme-node: Add lookup_url/get_url() methods
Similar to the existing generic getter methods, add lookup functions
for URL properties like the standard background-image/border-image
properties.

https://bugzilla.gnome.org/show_bug.cgi?id=693688
2013-04-16 19:10:40 +02:00
Rui Matos
86c92c37d2 st-im-text: Override ClutterText's cursor_event to set cursor position
This is both more efficient and accurate than doing it from the paint
vfunc.

https://bugzilla.gnome.org/show_bug.cgi?id=697722
2013-04-10 17:27:28 +02:00
Giovanni Campagna
8b659f0f4c St: support -st-natural-width/height CSS properties
It is sometimes desirable to specify the size of a box from CSS without
changing the minimum-width too.
This property implements that.

https://bugzilla.gnome.org/show_bug.cgi?id=664411
2013-04-08 19:25:45 +02:00
Adel Gadllah
6ef9ab6a0b st-scroll-view-fade: Don't fade out gradient
The changes from commit b4f5f1e461 and b394d184cc increased the
instructions required for the fade fragment shader. This is over the limit
for some hardware (like intel gen3), which causes the driver to fallback
to software rendering for the shader. The result is that painting a scrollview
that has a fade effect takes around 30 (!!) seconds.

So lets go back to the old effect for 3.8 until we find a solution.

https://bugzilla.gnome.org/show_bug.cgi?id=696404
2013-03-22 19:56:13 +01:00
Adel Gadllah
45fc7ec01f st-scroll-view-fade: Don't use return in the shader
Returing from main() makes llvmpipe unhappy (produces black output color),
so rework the logic to avoid the return.

https://bugzilla.gnome.org/show_bug.cgi?id=695607
2013-03-14 22:43:14 +01:00
Adel Gadllah
a6b49fe7d6 st-icon: Don't cause a redraw by replacing the icon with itself
Check if the two icons match before setting a new icon, if they
do don't do anything.

Based on patch from Owen Taylor <otaylor@fishsoup.net>

https://bugzilla.gnome.org/show_bug.cgi?id=694988
2013-03-05 00:03:29 +01:00
Florian Müllner
b52f4ed25b st-entry: Disable cut/copy actions in password entries
Curently it is possible to copy the content of password entries,
and paste it elsewhere in clear text. This is undesirable, so
follow GTK+'s behavior and disable the cut/copy actions for
password entries.

https://bugzilla.gnome.org/show_bug.cgi?id=695104
2013-03-04 16:43:59 +01:00
Adel Gadllah
ea55c36a3a st-widget: Don't add hidden actors to the paint volume
We are not painting them anyway.
2013-03-01 19:13:22 +01:00
Florian Müllner
b394d184cc scroll-view-fade: Tweak easing at edges
Since commit b4f5f1e461, the effect is eased in at the scroll
view's edges so that it does not appear out of nowhere. However,
the linear easing used is not the best option, as now the effect
appears so late that content near the edges ends up just being
cut off rather than faded out.
So adjust the easing function to have the effect appear faster.

https://bugzilla.gnome.org/show_bug.cgi?id=694327
2013-03-01 17:30:01 +01:00
Florian Müllner
1bd8c67041 st-scroll-view: Add :overlay-scrollbars property
If enabled, scrollbars take away from the allocation given to the
view's content. This is usually preferrable to painting the bars on
top of the content, but there are exceptions, for instance when the
content needs to be centered with regard to the view as a whole.
Add a :overlay-scrollbars property to account for those cases.

https://bugzilla.gnome.org/show_bug.cgi?id=694261
2013-02-22 10:57:50 +01:00
Cosimo Cecchi
a4a5492782 st-bin: fix a typo in the property setter
This got unnoticed for more than 3 years!

https://bugzilla.gnome.org/show_bug.cgi?id=694234
2013-02-20 00:06:52 -05:00
Florian Müllner
5d275389af scroll-view-fade: Fix [vh]fade_offset property getters
The two were mixed up all along, and nobody noticed ...

https://bugzilla.gnome.org/show_bug.cgi?id=694125
2013-02-18 22:44:23 +01:00
Giovanni Campagna
5e87fea1ee StEntry: reset the cursor when unmapped
We cannot reset the cursor at the next leave event, as that might
happen on a NULL stage and cause a BadWindow error, so do it on
unmap (which is guaranteed to happen before the stage is cleared).

https://bugzilla.gnome.org/show_bug.cgi?id=694057
2013-02-18 18:08:57 +01:00
Jasper St. Pierre
7fc2b33a0a st-texture-cache: Use async variants of the icon loading API
While we were relying on gtk_icon_info_load_icon and friends being
thread-safe, there was no such guarantee, and recent caching that
was added to GTK+ made it non-threadsafe. To replace it, _async()
variants of the icon loading code were added that are thread-safe.
Use those instead of using our own worker threads.

https://bugzilla.gnome.org/show_bug.cgi?id=692845
2013-02-14 16:16:00 -05:00
Jasper St. Pierre
a5d3f7785a st-texture-cache: Add one simple way to free texture load data
https://bugzilla.gnome.org/show_bug.cgi?id=692845
2013-02-14 16:09:04 -05:00
Jasper St. Pierre
f1cdce38a6 st-texture-cache: Remove a no-op scale pixbuf
We already passed GtkIconTheme the size when it wanted to load it,
so it knows the desired size and will scale it to what we want.

https://bugzilla.gnome.org/show_bug.cgi?id=692845
2013-02-14 16:09:04 -05:00
Neil Roberts
777f145128 st-clipboard: Use GDK for the event filters instead of Clutter
Instead of using Clutter to add an event filter for X events it now
uses the GDK API. The Clutter API won't work if Clutter is not using
an X11-based backend such as if Mutter is directly running with the
KMS backend. This is a step towards making Mutter be its own display
server and a step towards being a Wayland compositor. In this case GDK
will still be using the X backend because it will connect to the
headless X server.

https://bugzilla.gnome.org/show_bug.cgi?id=693438
2013-02-11 09:48:45 +00:00
Adel Gadllah
a10a294a2e st-im-text: Remove unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=693522
2013-02-10 13:39:30 +01:00
Neil Roberts
33f69481f7 Don't rely on implicit type conversion in the scroll view shader
Before version 1.2 of GLSL it would not implicitly convert from int to
float which meant that if you compare a float variable with an integer
constant it will generate a compile error. In particular this means
that on GLES2 (which uses GLSL 1.0) the scroll view shader will not
compile on pedantic compilers, which includes Mesa. This patch just
changes it to use floating point constants.

https://bugzilla.gnome.org/show_bug.cgi?id=693339
2013-02-08 12:03:38 +00:00
Jasper St. Pierre
eaf184b585 st-entry: Implement middle click paste
https://bugzilla.gnome.org/show_bug.cgi?id=645019
2013-02-07 04:51:30 -05:00
Jasper St. Pierre
0616261a94 st-clipboard: Add the ability to choose the clipboard type
https://bugzilla.gnome.org/show_bug.cgi?id=645019
2013-02-07 04:51:30 -05:00
Adel Gadllah
11bd7dc7de scroll-view-fade: Remove explicit GLSL version
Cogl sets this for us since commit 2701b93f159bf2d3387cedf2d06fe921ad5641f3.

Setting it twice is illegal and causes compile failures:
error C0204: version directive must be first statement and may not be repeated.
2013-02-05 20:32:08 +01:00
Giovanni Campagna
a8c8df6ee8 StImText: don't translate keyboard state again
Clutter translates keyboard state internally, and clears the lock bits
from modifier state, so translating again results in the wrong keysym.
Given that Clutter already gives us a fine keysym, we don't need this.

https://bugzilla.gnome.org/show_bug.cgi?id=692586
2013-02-03 16:45:28 +01:00
Florian Müllner
655dce6a4b st-theme-node: Recalculate properties on stylesheet changes
As theme nodes keep a cache of matched properties, we need to make
sure to update it when the list of stylesheets changes. In particular
this fixes a regression from commit dc2ec0a8f9, which caused
extensions with stylesheets to crash the shell when re-enabled (for
instances when coming back from the lock screen).

https://bugzilla.gnome.org/show_bug.cgi?id=692994
2013-02-01 17:28:40 +01:00
Florian Müllner
2cf403a3e9 st-theme: Add "custom-stylesheets-changed" signal
StThemeNodes cache matched properties from stylesheets, so when the
list of custom stylesheets changes, the node may miss better matches
(when a stylesheet was added) or have pointers to invalid memory in
the list (when a stylesheet was removed).
In order to allow theme nodes to listen for stylesheet changes, add
an appropriate signal to StTheme.

https://bugzilla.gnome.org/show_bug.cgi?id=692994
2013-02-01 17:28:39 +01:00
Cosimo Cecchi
426581eb1e scroll-view: reserve scrollbar allocation when policy is automatic
This is useful to avoid reflowing the layout when there's a
center-aligned block and a scrollbar appears.

https://bugzilla.gnome.org/show_bug.cgi?id=686881
2013-01-24 15:10:02 -05:00
Giovanni Campagna
8be3c5ed21 St: fix parsing of transition-duration values
According to css3-transition, transition-duration is expressed
as a time, that is, in seconds or milliseconds. Fix that by
recognizing numbers with units and implicitly converting to
milliseconds after parsing.

https://bugzilla.gnome.org/show_bug.cgi?id=681376
2013-01-03 03:47:58 +01:00
Jasper St. Pierre
4b095d532c st-texture-cache: Remove st_texture_cache_load_from_raw
This is now unused.

https://bugzilla.gnome.org/show_bug.cgi?id=691019
2013-01-02 12:32:29 -05:00
Rico Tzschichholz
52536e94e5 st-scroll-view: Fix build with -Werror=maybe-uninitialized 2012-12-20 23:01:13 +01:00
Rico Tzschichholz
5d6b3abd26 st-adjustment: Add missing math.h include 2012-12-20 23:01:13 +01:00
Jasper St. Pierre
f162dd7e87 scroll-bar: Add smooth scrolling support
Do the same for StScrollBar.

https://bugzilla.gnome.org/show_bug.cgi?id=687573
2012-12-20 08:40:04 -05:00
Jasper St. Pierre
06dc12e217 scroll-view: Add proper smooth scrolling
The code here before was added as dummy code to satisfy an error
in the missing switch, and wasn't ever tested due to the lack of XI2
in mutter. Use the same math as GtkRange does to calculate scroll bar
positions from raw XI2 deltas to allow for proper smooth scrolling.

https://bugzilla.gnome.org/show_bug.cgi?id=687573
2012-12-20 08:40:04 -05:00
Giovanni Campagna
587c93eadf StDrawingArea: fix texture drawing
cogl_rectangle() wants the four rectangle corners, not the size.

https://bugzilla.gnome.org/show_bug.cgi?id=641745
2012-12-19 15:45:18 +00:00
Giovanni Campagna
9860b1c677 St: fix regression from f7af96dbb2
A bad rebase caused the wrong patch to be pushed.

https://bugzilla.gnome.org/show_bug.cgi?id=687881
2012-12-16 20:45:43 +01:00
Giovanni Campagna
f7af96dbb2 St: avoid blocking IO to resolve relative urls
realpath() does a series of lstat() on each path component to resolve
symbolic links, but we just want to get an absolute path, and we don't
really care if it is physical or not. Going through a GFile does the
canonicalization we need, and is a lot faster.

https://bugzilla.gnome.org/show_bug.cgi?id=687881
2012-12-15 03:40:13 +01:00
Giovanni Campagna
208121646c St: recompute all theme nodes when the icon theme changes
StWidget considers "same theme node" as an indication that the style
did not change, and skips emitting style-changed in that case. This
means that icon theme changes are not picked up by StIcon.

https://bugzilla.gnome.org/show_bug.cgi?id=689353
2012-12-06 17:42:07 -05:00
Lionel Landwerlin
36fc3a5c96 st: fix rendering of corners in the box-shadow
https://bugzilla.gnome.org/show_bug.cgi?id=689789
2012-12-06 18:42:37 +00:00
Jasper St. Pierre
ead0286ca6 st-private: Don't round-trip through a font-string
ClutterText can support a PangoFontDescription directly.

https://bugzilla.gnome.org/show_bug.cgi?id=689568
2012-12-03 15:56:59 -05:00
Jasper St. Pierre
a88433dba6 st-private: Fix style 2012-12-02 20:11:36 -05:00
Jasper St. Pierre
7e5f1fe411 st-private: Don't create attr lists if we don't need them
Decorations are fairly uncommon in gnome-shell, so it's
worthwhile to avoid effort creating empty attr lists. This
can also help prevent a relayout.

https://bugzilla.gnome.org/show_bug.cgi?id=689400
2012-12-02 20:11:10 -05:00
Jasper St. Pierre
2492dc50db scroll-bar: Remove jitter on the scroll bar when moving the mouse
This was due to incorrect pixel clamping, which bounced the height
of the actor between values. Just remove pixel clamping, as Clutter
will correctly do it for us.

https://bugzilla.gnome.org/show_bug.cgi?id=689243
2012-11-29 16:43:47 -05:00
Jasper St. Pierre
b4f5f1e461 scroll-view-fade: Fade gradients when near edges
Rather than sharply transitioning to gradients, fade them out when
near the edge of the scroll view.

https://bugzilla.gnome.org/show_bug.cgi?id=689249
2012-11-29 16:17:09 -05:00
Jasper St. Pierre
69347fff09 scroll-view-fade: Only calculate the ratios if they're needed
This prevents some calculations being done for poor drivers with
bad optimizers.

https://bugzilla.gnome.org/show_bug.cgi?id=689249
2012-11-29 16:17:09 -05:00
Jasper St. Pierre
5c439f4e9c scroll-view-fade: Do the offset math in the shader
This doesn't (or shouldn't) change the visual appearance of the fade
effect, but does do all the testing math inside the shader, rather
than on the CPU. This will make fading the offset much easier in
the future.

https://bugzilla.gnome.org/show_bug.cgi?id=689249
2012-11-29 16:17:09 -05:00
Jasper St. Pierre
c84236ed73 scroll-view-fade: Use GLSL 1.20
GLSL 1.20 is a better language, and we'll rely on it in future updates.
This doesn't have any additional constraints, since GLSL 1.20 was
standardized before GLSL-supporting drivers came out.

https://bugzilla.gnome.org/show_bug.cgi?id=689249
2012-11-29 16:17:09 -05:00
Jasper St. Pierre
ae1a3a0cb2 scroll-view-fade: Clean up GLSL
Basic cleanup of what we're doing already. This moves a bunch
of the "inside the fade area" checks to the top, before doing
any calculations.

https://bugzilla.gnome.org/show_bug.cgi?id=689249
2012-11-29 16:17:09 -05:00
Jasper St. Pierre
b3fea016f1 scroll-view-fade: Put the shader in another file
This doesn't make any changes to the shader outside of adding
a header; it simply makes changes in the future easier to edit.

https://bugzilla.gnome.org/show_bug.cgi?id=689249
2012-11-29 16:17:09 -05:00
Giovanni Campagna
14fd0eb73e StWidget: don't dispose the theme node when destroyed
Theme nodes are interned and shared with other widgets, so they cannot
be disposed, otherwise we blow useful resources, and in particular we
break the parent-child chain.

https://bugzilla.gnome.org/show_bug.cgi?id=689029
2012-11-26 22:59:22 +01:00
Stéphane Démurget
c48a246ccb panel: programmatic anim. control of AnimatedIcon
The AnimatedIcon does not have an API for controlling the animation but
relies on the :visible property changes to start and stop a timeout used
to update the frame.

This has the inconvenient of having a side effect when visible is set to
true multiple times, and is not really the API expected from such
component. Also, there is a race if it is displayed before the images
are loaded: there is no child yet and thus we get this._frame = NaN
which leads to a crash.

Switch to a play/stop API instead, and add a load event callback to the
TextureCache.load_slice_image to exactly know when we can start using
the images.

https://bugzilla.gnome.org/show_bug.cgi?id=687583
2012-11-17 22:26:55 +01:00
Adel Gadllah
d8540819af st-theme-node-drawing: Group multiple cogl_rectangle calls
Calling cogl_rectangles is more efficent then using multiple cogl_rectangle calls.

https://bugzilla.gnome.org/show_bug.cgi?id=688475
2012-11-16 19:28:47 +01:00
Simon McVittie
52036871d1 StThemeNode: add a trivial-case short cut to all comparisons for equality
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-11-15 17:08:33 +00:00
Simon McVittie
4fc6a804f5 st_widget_recompute_style: short-circuit if the theme node is the same
It appears to be somewhat common for st_widget_style_changed() to be
called when no style-relevant attributes have, in fact, changed. Now that
we cache theme nodes, we're likely to get the same theme node back from
the cache. If we do, we don't need to waste time asking whether its
geometry and painting are equal to itself: we can just note that nothing
really changed and get on with our lives.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-11-15 17:08:31 +00:00
Simon McVittie
08d2ca300a st_theme_node_copy_cached_paint_state: allow self-assignment
If you copy a theme node's paint state into itself, it should be an
inexpensive no-op. What actually happened was that we destroyed the
old paint state, re-initialized to blank, then copied the blank state
back into itself. In the process, we lost (for instance) the textures
for rounded corners.

Until I introduced the texture cache, this never actually happened,
because when st_widget_recompute_style() calls st_widget_get_theme_node(),
we'd always get a fresh theme node. Now, we get a theme node T back
from the cache, notice that paint_equal(T, T) is true, short-circuit
slightly by copying its drawing state into itself, and destroy drawing
state that we still needed.

I'm going to fix this in recompute_style() too, but as a general
principle, self-assignment ought to be harmless.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-11-15 17:07:42 +00:00
Simon McVittie
dc2ec0a8f9 Keep similar theme nodes so we don't have to recompute CSS so often
Because we calculate and cache CSS properties once per StThemeNode,
and only a certain set of attributes can affect the CSS properties,
it's advantageous for as many widgets as possible to share a single
StThemeNode. Similarly, if a widget changes state and then changes back
(e.g. gaining and losing the :hover pseudo-class), it should ideally
get its original StThemeNode back again when it returns to the old
state.

Here, I'm using the StThemeContext as the location for a cache.
StThemeNodes are currently never freed: this seems OK for Shell's usage
(a finite number of IDs, classes, pseudo-classes and types).

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-11-14 19:24:42 +00:00
Simon McVittie
2cfed952bb Remove unsplit element classes and pseudo-classes
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-11-14 19:24:31 +00:00
Simon McVittie
a7da137778 st_theme_node_equal: use split (pseudo-)classes
This is a prerequisite for getting rid of the unsplit versions.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-11-14 19:24:30 +00:00
Simon McVittie
5ae2f87ce9 Use pre-split element classes and pseudo-classes to optimize matching
In my testing this cuts the longest time to dispatch(), when showing the
calendar menu for the first time, from 604 to 442 milliseconds,
while reducing additional_selector_matches_style() from 32% to 13% of
CPU time used.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-11-14 19:24:26 +00:00
Simon McVittie
c4f6619fbd Store CSS classes and pseudo-classes pre-split in the StThemeNode
Tokenizing every time we want to evaluate CSS seems a poor plan.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687465
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
2012-11-14 19:23:40 +00:00
Adel Gadllah
50f96d1c9c Stop using clutter alpha
It is deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=688089
2012-11-11 17:13:38 +01:00
Thomas Wood
2d763bd033 st-entry: Change the pointer cursor on enter/leave events
Change the pointer cursor to an i-beam when it is inside the ClutterText.

https://bugzilla.gnome.org/show_bug.cgi?id=687130
2012-11-06 11:47:49 +00:00
Jasper St. Pierre
73b4a0ef5f st-theme: Optimize string_in_list
Rather than using a complicated set of function calls across
library boundaries and our own scanning logic, use strtok(),
which glibc already provides, and is probably much more optimized.

https://bugzilla.gnome.org/show_bug.cgi?id=687465
2012-11-05 15:10:31 -05:00
Florian Müllner
d3ba002313 st: Remove unused methods
This reverts commits cd024e21f0 and dc9ad8df80.

https://bugzilla.gnome.org/show_bug.cgi?id=679268
2012-10-17 23:25:56 +02:00
Florian Müllner
d54f7b13fb st-widget: Keep background-image and border-image updated
Currently we miss changes to a file referenced in background-image
or border-image.
Connect to the StTextureCache::texture-file-changed signal to keep
up with file changes and update the drawing state if necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=679268
2012-10-17 23:25:56 +02:00
Florian Müllner
9c8b75206c st-texture-cache: Add texture-file-changed signal
For textures loaded from files, the cache might hide image changes
by keeping the data of a previous version around indefinitely. For
instance AccountsService will notify of avatar changes, but as new
image is copied over the old one, we will continue to use the old
image data.
Install a file monitor for each file resource we load and clear
the corresponding data from the cache on changes, emitting the
new StTextureCache::texture-file-changed signal.

https://bugzilla.gnome.org/show_bug.cgi?id=679268
2012-10-17 23:25:56 +02:00
Florian Müllner
15273c7f22 st: Canonicalize URLs in stylesheets
Make _st_theme_resolve_url() a bit smarter by canonicalizing the
resulting path (e.g. resolving references to /./ and /../).

https://bugzilla.gnome.org/show_bug.cgi?id=679268
2012-10-17 23:25:56 +02:00
Florian Müllner
0ea8217c55 st: Fix handling of file:// URIs in _st_theme_resolve_uri()
https://bugzilla.gnome.org/show_bug.cgi?id=679268
2012-10-17 23:03:07 +02:00
Jasper St. Pierre
b7acb1d488 st-texture-cache: Remove load_icon_name
With the St.Icon bug fixed, we have removed the last use of load_icon_name.
Celebration time!
2012-10-16 11:01:25 -04:00
Florian Müllner
487749c25b st-entry: Force a relayout if necessary
ClutterText will only queue a relayout after font changes if it has
any contents other than the empty string. As a result, its height
request may change after the first character has been entered. To
avoid this visual glitch, force a relayout on actual font changes.

https://bugzilla.gnome.org/show_bug.cgi?id=685534
2012-10-15 23:01:42 +02:00
Florian Müllner
4a92d7d1b2 st-im-text: Chain up to parent first in dispose()
The actor's GtkIMContext is freed in dispose and reset in unrealize - as
ClutterActor's dispose will unrealize the actor if necessary, chaining
up to the parent after clearing the im context will result in warnings
if the actor is still realized, so chain up first.

https://bugzilla.gnome.org/show_bug.cgi?id=686016
2012-10-12 14:56:34 +02:00
Jasper St. Pierre
5b4553ff0c Revert "st-texture-cache: Remove load_icon_name"
This reverts commit 8b6df2e23f.

I shouldn't be going around removing API in minor releases.
Sorry about that.
2012-10-02 21:40:40 -03:00
Jasper St. Pierre
8b6df2e23f st-texture-cache: Remove load_icon_name
With the St.Icon bug fixed, we have removed the last use of load_icon_name.
Celebration time!
2012-10-02 18:42:42 -03:00
Florian Müllner
cd024e21f0 st-widget: Add method to clear background-image
For performance reasons, resources required to paint a widget are
aggressively cached; we know of at least one case where our caching
prevents updating the used background-image correctly, so add explicit
API to clear all associated cache data.

https://bugzilla.gnome.org/show_bug.cgi?id=679268
2012-09-24 22:03:05 +02:00
Florian Müllner
c4c470c1f3 st-theme-node: Add method to invalidate drawing state
StThemeNode caches its resources aggressively to keep the required
work on paint to a minimum - right now, resources are only recreated
on allocation changes.
In order to update the background-image property correctly when the
underlying file changes, resources need to be recreated without a
size change, so add an explicit method for that.

https://bugzilla.gnome.org/show_bug.cgi?id=679268
2012-09-24 22:03:05 +02:00
Florian Müllner
dc9ad8df80 st-texture-cache: Add API to remove cache data
The current API assumes that image data loaded from files remains
valid during the life time of the shell. This assumption is mostly
valid for image files we provide ourselves (with the exception being
designers working on those files), but not necessarily for "external"
files - provide API to explicitly remove cached data associated with
a URI for those cases.

https://bugzilla.gnome.org/show_bug.cgi?id=679268
2012-09-24 22:03:04 +02:00
Jasper St. Pierre
8ee74e5661 st-theme: Fix extension ordering with !important
Extensions need to have priority over !important styles too.

https://bugzilla.gnome.org/show_bug.cgi?id=684163
2012-09-17 17:03:59 -03:00
Florian Müllner
94c1d5a18c focus-manager: Make groups "refcounted"
Rather than unconditionally removing a focus root in remove_group(),
decrement a counter that add_group() increments, and only actually
remove a focus root when the counter drops to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=682243
2012-09-15 00:17:44 +02:00
Florian Müllner
49df72ceda st-im-text: Replace key-* handler with captured-event
When using an input method like IBus, the IM is expected to process
key events before anything else. Currently this doesn't always work
as expected, as the event filtering is done in the default handlers
of the key-press and key-release events, e.g. only after other
handlers have been run.
To allow the IM to filter events earlier, move the code to a
captured-event handler instead.

https://bugzilla.gnome.org/show_bug.cgi?id=658325
2012-09-12 18:50:26 +02:00
Giovanni Campagna
09e3aed770 St: don't focus hidden actors
If an actors is not mapped (visible and all parents visible), then don't
allow navigating focus to it.
This fixes a regression in the keyboard navigation of the panel with
invisibile items.

https://bugzilla.gnome.org/show_bug.cgi?id=683529
2012-09-10 21:23:25 +02:00
Florian Müllner
6b016c2528 st-texture-cache: Fix stretched textures
st_texture_cache_load_from_raw() enforces a square ClutterTexture,
resulting in the texture being stretched if the passed in image
data has a different width:height ratio.
Add padding in those cases as we already do when loading from pixbufs.

https://bugzilla.gnome.org/show_bug.cgi?id=683483
2012-09-06 13:56:43 +02:00
Jasper St. Pierre
7e343f11f2 st-bin: Make sure not to allocate hidden children 2012-09-04 18:42:44 -03:00
Jasper St. Pierre
79bfea5970 st-widget: Unset hover when setting track_hover to FALSE
https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-03 02:51:22 -03:00
Jasper St. Pierre
50f8ae6fc7 st-bin: Don't allocate a hidden actor
https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-03 02:51:22 -03:00
Giovanni Campagna
a76cc79f88 ScreenShield: add a drop shadow to the animated arrows
Introduce a StShadowHelper to manage drop shadows from JS (which
cannot use Cogl directly), and use it in a new StWidget-derived
JS class to draw the arrow.

https://bugzilla.gnome.org/show_bug.cgi?id=682285
2012-09-01 16:38:51 +02:00
Daiki Ueno
77ea16e18f st-im-text: Support surrounding-text
https://bugzilla.gnome.org/show_bug.cgi?id=683015
2012-08-31 02:16:42 +02:00
Rui Matos
85d993386a st-im-text: Simplify dispose
There's no need to disconnect signal handlers on a private object that
we are destroying.
2012-08-31 02:16:42 +02:00
Jasper St. Pierre
c21b1e5fe0 st: Remove StIconType
GTK+ works by explicitly specifying a -symbolic suffix for all icons.
Do the same here.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 16:41:09 -03:00
Daiki Ueno
ee6086373b st-im-text: Support pre-edit
Use clutter_text_set_preedit_string() to wedge pre-edit text
into ClutterText.

https://bugzilla.gnome.org/show_bug.cgi?id=664041
2012-08-29 14:46:52 +02:00
Giovanni Campagna
d3b0d23d8f StIcon: deprecate StIcon:icon-name and StIcon:icon-type
Reroute setting those properties to a GIcon. API users are expected
to create GIcon directly now.
The advantage is that from a StIcon you can now create a similar one
by accessing :gicon.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 01:13:23 +02:00
Alejandro Piñeiro
a1ecf459b3 a11y: exposing the proper button role while using toggle_mode on St.Button
https://bugzilla.gnome.org/show_bug.cgi?id=682366
2012-08-27 10:43:35 +02:00
Dan Winship
c540cb5e16 st-scroll-bar: use clutter_grab_pointer()
StScrollBar was intercepting motion events by using captured-event on
the stage, which required additional dirty tricks, which required
additional hacks. Simplify it by just using clutter_grab_pointer()
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=671001
2012-08-19 18:41:51 -04:00
Alejandro Piñeiro
190f2f82ac a11y: allow navigation on non reactive items
At this moment non-reactive items are being used in
several cases as non-sensitive, but they still
require keyboard navigation.

https://bugzilla.gnome.org/show_bug.cgi?id=667439
2012-08-17 17:32:16 +02:00
Jasper St. Pierre
7dbc78c95f st-theme-node: Add repeating backgrounds
Add support for the CSS "background-repeat" property. Currently, this
only supports on/off, rather than allowing tiling in each individual
dimension. It is supported for both the cogl and cairo rendering paths.

https://bugzilla.gnome.org/show_bug.cgi?id=680801
2012-08-03 12:27:20 -03:00
Jasper St. Pierre
3ffa1e35e8 st-theme-node: Clean up
Replace some faulty indentation, group some booleans to reduce
a bit of memory usage

https://bugzilla.gnome.org/show_bug.cgi?id=680801
2012-08-03 12:27:20 -03:00
Florian Müllner
247566ca1d st-scroll-bar: Fix build warnings
Introduced by commit aa120e0902
2012-08-01 17:38:45 +02:00
Florian Müllner
aa120e0902 st-scroll-bar: Add support for :active
Add the :active pseudo class to the handle while it is dragged.

https://bugzilla.gnome.org/show_bug.cgi?id=680974
2012-08-01 14:53:48 +02:00
Jasper St. Pierre
75e49610cb st-theme: Make the custom stylesheets have higher priority
https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-07-24 06:11:21 -03:00
Jasper St. Pierre
414fe75d02 st-widget: Move reactivity tracking to StWidget, use "insensitive"
This lets use remove another few pieces of code that do the tracking
manually.

https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-07-24 06:11:21 -03:00