Commit Graph

95 Commits

Author SHA1 Message Date
Florian Müllner
1d77914316 dash: Make iconSize property public
As elements in the dash are scaled to accommodate a growing number
of items, the icon size used may end up rather small. In that case,
dragging items to the dash which are significantly larger than items
in the dash is getting clumsy, so it makes sense for some components
to synchronize the size of drag actors with the currently used icon
size in the dash. To enable other components to do this, make the icon
size a public property.

https://bugzilla.gnome.org/show_bug.cgi?id=639428
2011-02-12 23:32:57 +01:00
Florian Müllner
165f4e38b7 dash: Don't unnecessarily animate icon size changes
We already skip animations for item additions/removals while the
overview is hidden or when initially filling the dash (to avoid
an odd zoom effect when showing), apply the same logic to animations
of icon size changes.
2011-02-10 00:09:02 +01:00
Florian Müllner
7372308270 dash: Increase the maximum icon size
With the labels removed from dash items, we can potentially use
a larger icon size, so add 64 to the list of icon sizes and use
it by default.
2011-02-09 23:51:46 +01:00
Florian Müllner
026f598c37 dash: Skip animations while the overview is hidden
If a window is closed, the list of running applications may change
while the overview is hidden. Animating dash changes is pointless
in this case, so update the dash without animations in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=636156
2011-02-09 22:16:45 +01:00
Florian Müllner
9bbf293898 dash: Avoid "zoom" effect when first shown
The dash is created empty and the initial set of items is added
before it's shown for the first time. As the additions of items
is now animated, this results in a slightly odd effect when all
items zoom in at once. So special-case the first time _redisplay()
is called and skip animations in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=636156
2011-02-09 22:16:45 +01:00
Florian Müllner
d6020f1402 dash: Animate item and size changes
In general, all changes in the shell interface should be backed
by animations to give the interface a more natural feel and provide
feedback of what's happening. Currently the dash violates that
principle, as items simply appear/disappear or change size abruptly,
so add animations for application list and icon size changes.

https://bugzilla.gnome.org/show_bug.cgi?id=636156
2011-02-09 22:16:45 +01:00
Florian Müllner
29e97a5f88 dash: Wrap items in a scale-aware container
Clutter containers only take their children's size into account, but
not their scale. As we want the dash to change its size smoothly
when zooming items in/out, we wrap each item in a custom container
which does consider the child's scale.

https://bugzilla.gnome.org/show_bug.cgi?id=636156
2011-02-09 22:16:45 +01:00
Florian Müllner
2b84554d91 dash: Don't empty dash on changes
When the list of applications in the dash changes, all items are
removed and new ones added. While this approach is nice and simple,
it does not work if we want to animate changes. So rather than
replacing the old list of applications with the new one, figure
out the changes and only apply those.

https://bugzilla.gnome.org/show_bug.cgi?id=636156
2011-02-09 22:16:40 +01:00
Florian Müllner
a0584b9c30 dash: Take remove target into account for icon size
Previously the icon size was only adjusted due to changes in the list
of application icons displayed, not when showing or hiding the remove
target. As a result, the remove target could end up cut off, so take
this case into account and adjust the icon size when showing or hiding
the remove target.

https://bugzilla.gnome.org/show_bug.cgi?id=636156
2011-02-09 21:36:55 +01:00
Florian Müllner
5aab878e75 dash: Calculate icon size changes without reallocation
The current approach to adjust the icon size of dash items is rather
expensive: the size of each item is changed from largest to smallest,
until the height of the dash fits the maximum available height, so
quite some ClutterTextures are created and disposed.
A better approach is to calculate the required size beforehand and
only change the icon size when necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=636156
2011-02-09 21:36:55 +01:00
Florian Müllner
4d474e2f9c dash: Hide item labels
With the current dash layout of a single column, nearly every icon
label ends up ellipsized, even at the largest allowed icon size.
Not showing any labels appears to be the cleanest approach in this
case, so disable them in the dash.

https://bugzilla.gnome.org/show_bug.cgi?id=636156
2011-02-09 21:36:55 +01:00
Owen W. Taylor
3c593fc056 Don't check for Workspaces.WindowClone for window drops
When checking the type of a DND source, instead of checking
'instanceof Workspaces.WindowClone' accept any actor with realWindow
and metaWindow properties. This will be useful to support a separate
type of actor dragged from workspace thumbnails.

https://bugzilla.gnome.org/show_bug.cgi?id=640996
2011-02-08 19:43:20 -05:00
Maxim Ermilov
e3acaa05be Remove st_container_remove_all & rewrite st_container_destroy_children
1. Both functions leaked the nodes in priv->children
2. st_container_remove_all wasn't properly updating first_child and last_child
3. remove_all() is almost never right since it won't cause signal handlers
   on the children to be removed. In the rare cases where it might be needed
   the caller can simply use clutter_container_remove().
https://bugzilla.gnome.org/show_bug.cgi?id=640781
2011-02-01 23:41:21 +03:00
Adel Gadllah
d442494f3a Dash: Remove unused properties 2011-01-14 21:25:06 +01:00
Florian Müllner
38fb51a99e app-display: Expose BaseIcon params in AppWellIcon
AppWellIcon is used both in the dash and view selector. As the dash
requires manual sizing, it is not possible to set the icon size used
in the view selector in the CSS, but icons will use the default size
(unless set manually as in the dash).

Expose the params parameter of BaseIcon and enable manual resizing
only for AppWellIcons in the dash.

https://bugzilla.gnome.org/show_bug.cgi?id=639428
2011-01-13 18:27:23 +01:00
Adel Gadllah
cff503922c DashDND: Don't allow positioning before or after self
Don't allow the icon to be dropped immediately next to
itself.

https://bugzilla.gnome.org/show_bug.cgi?id=637104
2011-01-06 14:31:45 +01:00
Florian Müllner
b59daac6f3 dash: Improve DND to dash and allow reordering
Show a positional indicator where a new favorite will be added and
make the favorites re-orderable. Also allow the removal of favorites
using drag-and-drop according to the mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:54 +01:00
Florian Müllner
48fff0e96b Use the old dash code to implement the view selector
The view selector is a tabbed interface with a search entry. Starting
a search switches focus to the results' tab, ending a search moves the
focus back to the previously selected tab. Activating a normal tab
while a search is active cancels the search.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:53 +01:00
Florian Müllner
e6bb06a7cc search-display: Move SearchResults to a separate file
With the new layout, search results will be displayed in an independent
view like window previews, applications and possible future additions;
it does not make much sense keeping it with the switching logic, so move
the code to its own file.

Also remove the dash-prefix from the relevant style classes.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:53 +01:00
Florian Müllner
3e4f744e56 dash: Reimplement the dash based on AppWell code
The new dash implementation is a single-column vertical sidebar,
whose items are scaled dynamically to fit the available height.
If the height is still exceeded after scaling down to a minimum
item size, excess items are cut off.
The now unused old dash implementation is renamed to OldDash, as
its code will be used as a base for the new view selector element.

https://bugzilla.gnome.org/show_bug.cgi?id=634948
2010-11-29 16:35:47 +01:00
Tor-björn Claesson
039229f340 Make it possible to register new search providers for the dash after it has been created.
Factors out meta creation from SearchResults._init to SearchResults.createProviderMeta(provider).

Adds Dash.addSearchProvider(provider).

https://bugzilla.gnome.org/show_bug.cgi?id=625954
2010-08-19 18:04:30 -04:00
Siegfried-Angel Gevatter Pujals
5cb2ea04f7 MoreLink: Ignore calls to activate() if the actor isn't visible
This fixes (another time) the bug about the "Recent Items" label
being clickable when there are no items.

https://bugzilla.gnome.org/show_bug.cgi?id=582037
2010-07-27 16:54:58 +02:00
Florian Müllner
4632db177a Clean up unused includes
Some late spring cleaning ...
2010-07-19 01:46:01 +02:00
Marina Zhurakhinskaya
40c7d3763b Remove the cursor from the search entry when it doesn't have focus
We should not be showing the cursor in the search entry in the overview
if the user's input will be appearing elsewhere, such as in the run dialog,
in the Looking Glass console, or in the notification's response field.
2010-06-28 18:13:45 -04:00
Dan Winship
df13408973 [dash] remove a bunch of dead code in the dash
The dash has lots of unused code left over from earlier designs. Kill
it.

https://bugzilla.gnome.org/show_bug.cgi?id=621582
2010-06-15 12:00:41 -04:00
Dan Winship
a4befeba53 De-duplicate "actor contains actor" code
Add _st_actor_contains() in st-private for use within St, and
monkey-patch in a Clutter.Actor.contains() for use by javascript, and
then replace all the duplicate implementations with one or the other
of those.

https://bugzilla.gnome.org/show_bug.cgi?id=621197
2010-06-11 10:05:46 -04:00
Florian Müllner
88be8e87ac [Overview] Fade dash menus
As the design calls for smooth transitions whenever possible, use
a similar fade effect for the all-apps and more-docs menus as for
the panel menus.

https://bugzilla.gnome.org/show_bug.cgi?id=620775
2010-06-09 17:07:10 +02:00
Florian Müllner
d96d07af10 [searchEntry] Correct some erroneous hover states
As the search entry captures the pointer when activated, the hover
state is not updated properly when the activation is cancelled
(either by clicking outside the entry or by hitting Escape).
Update the state manually in these cases.

https://bugzilla.gnome.org/show_bug.cgi?id=611095
2010-06-08 20:47:39 +02:00
Florian Müllner
a57a34c540 [linearView] Zoom out when dragging an item from the dash
When dragging windows in linear view, the workspace zooms out to
allow moving the window to other workspaces. Enable the same
behaviour for items dragged from the dash.

https://bugzilla.gnome.org/show_bug.cgi?id=618055
2010-05-27 12:12:10 +02:00
Marina Zhurakhinskaya
703b21cef0 Don't use double quotes for things that don't need to be translated
This is our convention.

The only exceptions are double quotes for words in comments that give
them a special meaning (though beware that these quotes are not truly
necessary most of the time) and double quotes that need to be a part
of the output string.
2010-05-13 16:00:38 -04:00
Dan Winship
2320c393c9 Replace all remaining BigBoxes with StBoxLayouts or StBins
Also, remove a lot of cruft from genericDisplay.js leftover from
previous St-ifications, and remove the pre-gtk-2.16 hacks from the
status tray in panel.js (which are much less needed with the
nearly-all-black panel anyway).

https://bugzilla.gnome.org/show_bug.cgi?id=614516
2010-04-06 09:13:51 -04:00
Dan Winship
909b5ec43c [StWidget] add list-like methods for style_class and pseudo_class
Since style_class and pseudo_class are space-separated lists of names,
add new methods to add and remove individual names rather than just
re-setting the entire name.

Update existing code to use the new pseudo-class methods where
appropriate. In some cases, this may result in actors having multiple
pseudoclasses where previously they only had one at a time, but there
don't seem to be any visible differences.

(There are some places that could usefully use the new style_class
methods as well, but this patch doesn't change them.)

Also, update test-theme.c to test the new methods.

https://bugzilla.gnome.org/show_bug.cgi?id=604943
2010-03-24 09:40:37 -04:00
Florian Müllner
22bf4c8a93 [Overview] Make menu sizes relative to workspace area
Instead of setting a fixed size in the CSS which only works well
with a limited range of screen resolutions, assign a relative
size in the code.

While this takes away some flexibility from theme authors, it is in
line with most elements in the overview (workspaces area, dash).

Also expose the menu panes vertical alignment, so that more-apps aligns
to the workspaces area's top and more-docs to the bottom.

https://bugzilla.gnome.org/show_bug.cgi?id=610872
2010-03-18 01:43:05 +01:00
Florian Müllner
9f68786547 Update more-docs to look more like more-apps
Disable horizontal scrolling and remove the close button. Update
the CSS to match more-apps.

https://bugzilla.gnome.org/show_bug.cgi?id=612452
2010-03-16 22:22:05 +01:00
Dan Winship
3ce89e3c80 Add missing semicolons noted by jslint
Taken from a patch by Lex Hider on the mailing list
2010-03-15 09:50:05 -04:00
Florian Müllner
858a6bf827 [Overview] Update look and feel of the search field
Port the search entry to CSS and update look and feel according to
the latest design.

https://bugzilla.gnome.org/show_bug.cgi?id=611095
2010-03-11 21:22:31 +01:00
Colin Walters
22948b3d39 Merge St.TextureCache and Shell.TextureCache
Brute force merge these two by essentially replacing St.TextureCache
with a (renamed) Shell.TextureCache.

One function was added for convenience, namely "st_texture_cache_load_file_simple".
St.TextureCache had a function to load a texture from a filename, and it
returned NULL on error but only half the callers actually checked this.  This
function is better.

https://bugzilla.gnome.org/show_bug.cgi?id=607500
2010-03-05 16:19:40 -05:00
Colin Walters
fbb88da134 [search] Fix activation of results from custom renderers
The previous commit broke activation when selecting an actor
from a custom renderer.  Fix this by explicitly defining a method
activateSelected on the search renderer.
2010-03-04 15:12:06 -05:00
Colin Walters
83f11870da Use AppWellIcon for search results
Switch to using an application icon as per design.

We need to drop the 4 pixels padding to ensure we fit 3 icons.

There was a typo where getVisibleCount should have been getVisibleResultsCount.

https://bugzilla.gnome.org/show_bug.cgi?id=610740
2010-03-04 14:08:13 -05:00
Maxim Ermilov
690be611ee Implement newer design for "more apps" view
Replace the old GenericDisplay-based system with one which reuses
the WellGrid class and uses a new scrolling container.

https://bugzilla.gnome.org/show_bug.cgi?id=609015
2010-02-19 15:39:26 -05:00
Florian Müllner
97e19d7d4a Adjust behavior of search results to match app well
Currently, activating a search result always opens a new window. Change
this behavior, so that if an application has open windows, the most
recently used one is activated instead.

Also change the implementation of dnd of search results to allow providers
to treat results activated via dnd differently.

https://bugzilla.gnome.org/show_bug.cgi?id=610027
2010-02-16 23:50:35 +01:00
Florian Müllner
67e70df0c9 [dash] Enable DND of search results
Allow dragging search results to a specific workspace to launch them
on that workspace; the drag icon is the icon from the search result.

https://bugzilla.gnome.org/show_bug.cgi?id=609218
2010-02-10 17:11:45 +01:00
Colin Walters
5202dd5157 [dash] Change section titles to match 20091114 mockup
Documents is changed to Items, and add "& Devices" to Places.

https://bugzilla.gnome.org/show_bug.cgi?id=605491
2010-01-07 18:33:00 -05:00
Colin Walters
69c8aef6c2 Show "No matching results" if that's the case
This also fixes backtracking from no matching results.

https://bugzilla.gnome.org/show_bug.cgi?id=606209
2010-01-06 16:20:01 -05:00
Florian Müllner
6e1a791273 Allow clicking on any part of section header to browse
This is more intuitive, though we need to make the whole thing feel more like a button.

https://bugzilla.gnome.org/show_bug.cgi?id=596985
2009-12-20 01:06:24 +01:00
Colin Walters
4394bc3e40 [dash] Avoid infinite recursion in keynav 2009-12-18 10:39:02 -05:00
Colin Walters
b7646d18ae Add search.js, rebase search system on top
The high level goal is to separate the concern of searching for
things with display of those things; for example in newer mockups,
applications are displayed exactly the same as they look in the
AppWell.

Another goal was optimizing for speed; for example,
application search was pushed mostly down into C, and we avoid
lowercasing and normalizing every item over and over.

https://bugzilla.gnome.org/show_bug.cgi?id=603523
2009-12-18 10:07:22 -05:00
Colin Walters
2f1ca7bf28 Remove ShellButtonBox, button.js; Use St.Clickable in panel.js
StClickable replaces ShellButtonBox.  Reduce the number of
button-like things by deleting button.js.

To do so, add CSS style for the actitivies button.

https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-23 14:33:49 -05:00
Colin Walters
8c59bc71b0 [dash] Switch to using StWidget gradients
https://bugzilla.gnome.org/show_bug.cgi?id=602131
2009-11-20 19:51:46 -05:00
Colin Walters
fec2ea5e9c [dash] Convert pane close to St.Button, avoiding release event propagation
The workspaces was handling the release event after closing the pane,
catch it before closing by using St.Button.
2009-11-12 13:09:20 -05:00