Commit Graph

70 Commits

Author SHA1 Message Date
Jasper St. Pierre
ad5572f275 tests: Remove JHBUILD_TYPELIBDIR
It's unused and crufty, and potentially security leak.
2012-08-07 11:51:12 -03:00
Florian Müllner
56adbda2dc build: Add missing file to Makefile 2012-08-03 17:41:56 +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
114fb4219b tests: Fix borders test
Bad merge

https://bugzilla.gnome.org/show_bug.cgi?id=680801
2012-08-03 12:27:20 -03:00
Jasper St. Pierre
985db40547 test-gapplication: Untabify, add modeline 2012-07-14 18:27:10 -04:00
Rico Tzschichholz
ff9088e42b tests: Fix make dist 2012-07-14 11:48:54 +02:00
Giovanni Campagna
464813ecbb Assorted test-gapplication fixes
Move this test toghether with the others, and set the appmenu
only after the application is registered (i.e. in startup)

https://bugzilla.gnome.org/show_bug.cgi?id=678978
2012-07-13 12:29:44 +02:00
Jasper St. Pierre
c7196a519f tests: Run each test in a function
As the global object of a context is rooted, if we want the GC to act
on these objects we need to take them out of the globals.

https://bugzilla.gnome.org/show_bug.cgi?id=678737
2012-06-24 19:20:48 -04:00
Jasper St. Pierre
0d82ce5210 tests: Don't use the default stage
https://bugzilla.gnome.org/show_bug.cgi?id=678737
2012-06-24 19:20:48 -04:00
Jasper St. Pierre
1983097d3a tests: Refactor background-size test to support non-square containers
https://bugzilla.gnome.org/show_bug.cgi?id=672321
2012-03-18 09:33:30 -04:00
Jasper St. Pierre
1c60aa58ae tests: Add a cogl rendering option to the background-size test
Right now we only test the cairo rendering path

https://bugzilla.gnome.org/show_bug.cgi?id=672321
2012-03-18 09:33:30 -04:00
Jasper St. Pierre
1626d9f9a4 tests: Fix font color for tests
Since the GNOME Shell style cleanup, all text is white. Fix that
in the test cases.

https://bugzilla.gnome.org/show_bug.cgi?id=672321
2012-03-18 09:33:29 -04:00
Owen W. Taylor
66c4881fd2 Add missing files to distribution 2012-01-04 12:39:37 -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
bbdce159fa Util: fix binary search exit condition
The loop can exit with an interval of length one or one of
length zero. In the first case it is correct to check which side
of the interval to return, in the second case no comparison should
be made (since there is only one possible value).
In practice, this usually results in one comparison more than needed,
but in some cases (when the position was past the end of the array),
would call the comparator with undefined.

https://bugzilla.gnome.org/show_bug.cgi?id=666614
2011-12-20 22:44:03 +01:00
Giovanni Campagna
09ab13cf04 Array: add capability to insert while keeping a specific order
Adds two new functions, Util.lowerBound and Util.insertSorted,
that take an array, a value and a comparator, and find the
first position at which the value can be inserted without
violating the order, in optimal time.

https://bugzilla.gnome.org/show_bug.cgi?id=666429
2011-12-19 16:54:46 +01:00
Florian Müllner
4c7cc94cdc build: Add test/unit/jsParse.js to Makefile
Commit 3941961f8b added the file without referencing it in the Makefile,
which breaks distcheck.
2011-11-22 15:34:22 +01:00
Jason Siefken
3941961f8b lookingGlass: Add tab-completion
https://bugzilla.gnome.org/show_bug.cgi?id=661054
2011-11-05 13:05:11 -04:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Owen W. Taylor
ed1f8ed339 Add missing test to Makefile.am 2011-09-20 17:15:41 -04:00
Adel Gadllah
247ad9d7ab scroll-view-sizing: Add tests for padding / borders
Add tests to verify that the fade works fine with borders and
padding.

https://bugzilla.gnome.org/show_bug.cgi?id=659159
2011-09-19 18:51:07 +02:00
Jasper St. Pierre
523e431ece tests: Add transition test
https://bugzilla.gnome.org/show_bug.cgi?id=658092
2011-09-15 13:27:12 -04:00
Owen W. Taylor
a42ae6fe3a tests/Makefile.am: add missing file to DISTCHECK 2011-09-14 18:55:52 -04:00
Dan Winship
6496205081 tests: add a unit test for Misc.findUrls()
https://bugzilla.gnome.org/show_bug.cgi?id=636252
2011-09-08 09:09:12 -04:00
Owen W. Taylor
60612cace9 Add markup.js to TEST_JS 2011-07-27 19:13:03 -04:00
Dan Winship
f03793b825 tests: add a test for MessageTray._fixMarkup
https://bugzilla.gnome.org/show_bug.cgi?id=650298
2011-07-27 09:29:03 -04:00
Dan Winship
0907f030b4 tests: fix up typelib include paths
The js modules have so many imports back and forth that it's pretty
much guaranteed that if you import even one of them, you'll end up
importing all of them, including ui.status.bluetooth and
ui.status.network. So fix up the typelib include paths the same way
gnome-shell-jhbuild does, so we can find everything.

https://bugzilla.gnome.org/show_bug.cgi?id=650298
2011-07-27 09:29:03 -04:00
Jasper St. Pierre
5bc1dede81 tests: Add tests for large rounded corners
https://bugzilla.gnome.org/show_bug.cgi?id=649513
2011-07-09 20:13:47 -04: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
Dan Winship
ae96b0c971 Use libmutter-wm, and build a real gnome-shell binary
Build gnome-shell as a binary linked against libmutter-wm, instead of
a module to be loaded by libmutter-wm. Move the majority of
initialization-type stuff from gnome_shell_plugin_start() into main().

We still build libgnome-shell as a shared library, so that the linker
doesn't discard all the methods that are never called from C.

https://bugzilla.gnome.org/show_bug.cgi?id=641724
2011-03-07 18:33:33 -05:00
Florian Müllner
51bfbca2f1 tests: Add a box-shadow test
The original support for CSS based shadows has been extended with
support for an optional spread radius and the 'inset' keyword,
so with the additional complexity a dedicated test case looks
appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=642334
2011-02-21 17:38:47 +01:00
Ray Strode
7d77802ba1 tests: show off translucent gradients
Right now border color is leaking through.
Demonstrate that.

https://bugzilla.gnome.org/show_bug.cgi?id=640465
2011-02-10 18:24:29 -05:00
Ray Strode
e727c184ef StThemeNode: Split -st-shadow into three attributes
Currently, "-st-shadow" can mean one of three very
different things:

1) shadow based on alpha of the background image
2) shadow the "border box" of the node
3) shadow applied to the content of a StIcon

It isn't well defined which of the above 3 cases
-st-shadow will mean for any given node, however.

This commit splits the property into three
different properties, "box-shadow",
"-st-background-image-shadow", and "icon-shadow"
to make it all very explicit.

https://bugzilla.gnome.org/show_bug.cgi?id=636976
2011-01-24 12:23:11 -05:00
Ray Strode
412c50b939 tests: showcase borders with non-solid backgrounds
This commit adds a few more examples to borders.js
that render borders with various combinations of
gradients, background images, shadows, and
border-images.

https://bugzilla.gnome.org/show_bug.cgi?id=636976
2011-01-24 12:23:11 -05:00
Adel Gadllah
00ba937171 StScrollView: Implement real fade effect
Implement an edge fade effect (top/bottom) using a
ClutterOffscreenEffect subclass, replacing the former
shadow hack.

https://bugzilla.gnome.org/show_bug.cgi?id=639460
2011-01-20 20:53:20 +01:00
Florian Müllner
e3aab2a90f tests: Fix scrolling in border.js and border-radius.js
In both tests the scrolled actor's width was fixed to the stage
width, so that the scroll bars ended up outside the visible area.

Fix by adding an outer container with a fixed width and expanding
the scroll view to fill the available area.
2010-12-16 18:09:03 +01:00
Florian Müllner
cb5c18c783 st-theme-node: Support non-uniform border widths
While non-uniform border widths were parsed correctly, an arbitrary
side's width was picked when painting, so that each border ended up
with the same width and the widths specified in CSS were ignored.

At least for sides between non-rounded corners, using a different
border width can be reasonable, for instance at screen edges.

Different border widths around rounded corners are kind of crack,
but then it would be lame not to support it ...

https://bugzilla.gnome.org/show_bug.cgi?id=607500
2010-12-13 18:15:00 +01:00
Owen W. Taylor
4800f63c3a Correct and simplify setting the GJS module path
We were going to great effort to include the normal directories in the
GJS search path and the code to to do this broke recently when
jsdir and jsnativedir were moved to gjs-internals-1.0.pc. However, it
was actually unnecessary since the standard directories are appended
to the default path.

(We continue to use a GNOME_SHELL_JS envvar separate from GJS_PATH
for the Shell to enable the somewhat unlikely case where someone wants
to invoke the shell specifying a GJS_PATH.)

https://bugzilla.gnome.org/show_bug.cgi?id=635367
2010-11-22 10:21:45 -05:00
Dan Winship
a2f4e196a1 Icon test case fixes
put a border around the "16px icon in 48px icon widget" test, to
verify that the icon is being centered correctly

add spacing and fix alignment for general prettiness

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 22:28:22 -05:00
Owen W. Taylor
af7ba00e97 StIcon: pass in the StThemeNode to get colorized symbolic icons
Use st_texture_cache_load_icon_name_for_theme() so that we get the
right colors for symbolic icons. The code refactoring to achieve this
also avoids constantly starting a new icon load each time we set
a property on initialization ... the icon is loaded only after we
have a #StThemeNode assigned.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:26 -05:00
Owen W. Taylor
439d7f036f Port StIcon from MX framework to St framework
Make StIcon compile and work in St.

Changes:

 * ::icon-type and st_icon_set_icon_type are added to allow
   specifying SYMBOLIC/FULLCOLOR for an icon.
 * Ability to set the icon name from the theme is removed; it
   wouldn't easily fit into our framework and two levels of
   abstraction between code and image doesn't seem that useful.
 * size CSS property is renamed from x-st-icon-size to icon-size
   to correspond to what we are doing elsewhere.
 * CSS and property based icon sizing are cleanly layered - if
   you set the icon-size property, the CSS size is ignored.
 * Add a simple JS test of StIcon.

https://bugzilla.gnome.org/show_bug.cgi?id=633865
2010-11-12 17:36:25 -05:00
Owen W. Taylor
c98103ffc8 Add run-js-test executable to run tests
ST makes use of GTK+ for input methods and for icon themes; therefore
we have need to initialize GTK+ in order to test these parts of Clutter.

Instead of LD_PRELOADING our module, use a separately compiled executable
that links to the UI components in GNOME Shell, initializes Clutter and
GTK+ and hooks them together.

Getting all the symbols from St and the GUI components exported for
use via GJS requires a bit of contortion: we need to actually link the
St convenience library into a shared library and link the executable
to that since there is no way with libtool to take a convenience library
and put all its symbols into an executable --whole-archive style.

https://bugzilla.gnome.org/show_bug.cgi?id=633657
2010-11-12 17:36:20 -05:00
Florian Müllner
3d2d396c09 st-theme-node: Support non-uniform border-radii
Non-uniform border-radii are already supported when using a gradient
background, this patch adds support for solid colors as well.

The currently applied technique of using corner textures and filling
the remaining area with rectangles is extended, so that each corner is
padded with rectangles to the size of the largest corner.

Add border-radius.js to test cases, to test non-uniform border-radii
with both solid color and gradient backgrounds.

https://bugzilla.gnome.org/show_bug.cgi?id=631091
2010-10-05 00:18:49 +02:00
Florian Müllner
a84e2e3307 [format] Add 'x' format specifier and field width
Sometimes it is useful to print numbers in hex format - add the
appropriate specifier. Also support a minimum field width to
pad the formatted string with spaces (or zeros if the width is
prefixed with '0').

https://bugzilla.gnome.org/show_bug.cgi?id=622597
2010-06-24 15:54:54 +02:00
Owen W. Taylor
af05a9e268 Add missing test case to distribution
scroll-view-sizing.js wasn't in Makefile.am
2010-03-23 14:12:32 -04:00
Owen W. Taylor
ffd25fe9e4 Fix size negotiation for StScrollView
StScrollable: Document how size negotation now works between the
  parent and scrollable child.

StBoxLayout: Adapt to the new contract for how size negotiation
  works; in particular, handle being allocated less than the
  minimum size when scrolled and treat the minimum size as the
  size of the scrolled area in instead of the natural size.

StScrollView: Substantially rewrite with fixes including:
 - Implement new size negotation contract; this allows us
   to determine scrollbar visibility without having to
   connect to the adjustment.
 - Implement all ALWAYS along with the existing NEVER/AUTO
 - When hiding and showing scrollbars and shadows, don't
   hide and show widgets, just turn on and off including them
   in pick and paint. This avoids queueing relayouts.
 - Cleanups for the code for connecting to adjustments,
   for changing policy, and for turning on and off shadows.

scroll-view-sizing.js: New test case for StScrollView, allowing
  resizing the scroll view interactively, changing the scrollbar
  policies and turning shadows on and off.

https://bugzilla.gnome.org/show_bug.cgi?id=611740
2010-03-11 15:08:48 -05:00
Colin Walters
fb9fd6925a [StScrollView] Fix incorrect assertion, defaults, and test case
The type we don't currently handle is _ALWAYS, my original use
of g_return_if_fail was wrong.

Also the default should be AUTOMATIC in the properties, not ALWAYS.

Finally the test case was still using the incorrect St.ScrollPolicy.

https://bugzilla.gnome.org/show_bug.cgi?id=609015
2010-02-22 12:06:56 -05:00
Colin Walters
18c5405b79 [StScrollView] Add support for GtkPolicyType for scrollbars
Previously we were hacking out the vertical scrollbar, this patch
allow us to sanely say in which directions we want to scroll.

Note this patch intentionally changes St to depend on GTK+ in the
API.  I believe this is a correct long term change where we should
view St as co-evolving with GTK+ rather than replacing or paralleling.

https://bugzilla.gnome.org/show_bug.cgi?id=609015
2010-02-19 15:37:40 -05:00
Dan Winship
f52744cfbc [StTable] fix x-align/y-align properties to be StAlign, not double
This puts it in sync with StBin and StBoxLayout

https://bugzilla.gnome.org/show_bug.cgi?id=609848
2010-02-16 14:06:39 -05:00
Colin Walters
73fd896f3c [tests/borders.js]
Shrink stage size to 640x480 to fit on netbook screen.

Make the area scrollable.

Add a few more tests.
2010-01-15 18:33:36 -05:00