Commit Graph

102 Commits

Author SHA1 Message Date
Sander Dijkhuis
1f31e80c47 Bug 584609 - Zoom the whole overlay when showing or hiding
Instead of only transforming the active workspace, create a
zooming effect when showing or hiding the overlay. This makes
the transitions simpler: the workspaces are now fixed to the
overlay actor group and will not slide over the Dash.

overlay.js: Add zoom animations, fade in/out Dash during those,
    remove obsolete Dash clipping and stacking logic, add public
    get[Scale|Position]() and getZoomedIn[Scale|Position]()
    functions.
workspaces.js: Remove zoom animations, add fade animations for
    the remove button, add helper functions for the overlay
    zooming, keep the movement of windows linear to that of
    their workspaces, remove the updatePosition() and
    updateInOverlay() functions and fullSize variables that
    were left from the old overlay design.
2009-08-11 02:21:13 +02:00
Owen W. Taylor
26a074588b Bug 591114 - Remove expanded background
The "expanded background" that is behind the workspaces etc. in the overview
should be removed.  It isn't in the designs, it is distracting, and it breaks
the overview metaphor.

At least temporarily, just make the background of the overview black.
Change the pane popup to black as well, but keep a blue border so that
it is visually distinguished from the background.

Based on a patch by Colin Walters, with fixes from  Marina Zhurakhinskaya.
2009-08-10 17:25:05 -04:00
Marina Zhurakhinskaya
00cc32d95a Ignore clicks on hot corner during transition
It's both intuitive to go to the corner of the screen
and click the activities button at the same time.

Both actions bring up the overlay,  but combined
they cancel each other out.  This commit makes
clicking the hot corner not cancel the act of
going to the hot corner.

Based on a patch from Ray Strode.
2009-08-10 14:19:07 -04:00
Colin Walters
85b4b97b7b Rewrite Dash, remove hardcoded width/height from GenericDisplay
This patch is a near-total rewrite of the Dash.  First, the dash
code moves into a separate file, dash.js.

Inside dash.js, the components are more broken up into separate
classes; in particular there's now a Pane class and a MoreLink
class.  Instead of each section of the dash, when activated,
attempting to close all N-1 other sections, instead there
is the concept of a single "active pane", and when e.g. activating
the More link for documents, if we know there's an active pane
which happens to be the apps, close it.

Many redundant containers were removed from the dash, and all
manual width, height and x/y offsets are entirely gone.  We move
the visual apperance closer to the design by using the view-more.svg,
etc.

To complete the removal of height/width calculations from the dash,
we also had to do the same for GenericDisplay.  Also clean up
the positioning inside overlay.js so calculation of children's
positioning is inside a single function that flows from screen.width
and screen.height, so in the future we can stop passing the width
into the Dash constructor and call this once and work on screen
resizing.
2009-08-05 04:04:27 -04:00
Colin Walters
026f014d32 Bug 589937 - Raise clone on window activation
We had duplicate code in appDisplay and workspaces for handling activating
a window; unify that inside workspaces, add an API to Main.overlay to
access it from both contexts.

Also, explicitly raise the clone we're activating to the top
before starting the animation to leave the overlay.
2009-07-31 19:26:32 -04:00
Colin Walters
29ffa46d08 Move drawing functions from shell-global into new shell-drawing.c file
Just to avoid shell-global.c bloat.
2009-07-31 17:26:47 -04:00
Siegfried-Angel Gevatter Pujals
0a1aac862f Fix details pane repositioning
Two calls to _repositionDetails() were done too early,
before the visibility of the results pane had changed,
so they had no effect. Thus when a search was done while
a details pane was active, the pane with the results was
hidden by the details pane.

In addition to fixing this, move the two remaining calls to
the line after changing the results pane's visibility
to make it clearer why the calls are there.
2009-07-31 16:12:19 +02:00
Siegfried-Angel Gevatter Pujals
77c92d75d5 Toggle the info pane when clicking the info icon (#587550)
Now clicking on the information icon of the same item a second
time will hide the details pane. Clicking it another time will
show it again, etc.

This is achieved by adding a 'toggle-details' signal which
switches the visibility of the details pane.

Other than the necessary changes, function _selectIndex (in
genericDisplay.js) has been restructured a bit to avoid
duplicating checks.
2009-07-29 19:35:11 +02:00
Marina Zhurakhinskaya
9f4ccb83e3 Make dash background darker
Make dash background darker so that the blue color used for indicating
running apps can be visible. Use the dark blue (almost black) color from
Jeremy's mockup.

Make the dash height be the full screen height minus the height of the panel.
Don't use padding on top or on the bottom.

Remove the border from the main dash, but leave it for the results and details
panes. Make the border slightly transparent.

Make sure the details pane is correctly positioned by not applying the
additional padding when determining its x position.
2009-07-24 17:25:20 -04:00
Colin Walters
9d594d7f26 Always clear details pane when unsetting more mode
We don't want a detail pane hanging around for an item no
longer visible.
2009-07-13 11:01:50 -04:00
Colin Walters
2161e90cda Fixes for GenericDisplay
GenericDisplay wasn't quite completely converted to the ShellOverflowList
model.  Since the list now holds all actors, the indexing/wrapping
was incorrect.

Add a property which lets us keep track of how many items are displayed,
use this in genericDisplay.

Avoid setting selectedIndex to -2 when going up with no items.

If we're not displaying any results at all, don't attempt keynav (for now).
2009-07-13 11:01:49 -04:00
Owen W. Taylor
732573331a Fix DND to left side of the screen
Set the size of the Dash actor to 0x0 so that it doesn't
interfere with drag and drop.

http://bugzilla.gnome.org/show_bug.cgi?id=587899
2009-07-07 10:58:49 +01:00
Colin Walters
db630b2945 More for applications now displays a category list
Rework the previously extant Application category code to display
in the expanded list.  Add a "Frequent" category which corresponds
to the most_used_apps, and selected by default.

Instead of adding the background and shadow as expanded items to
the results/details panes as fixed, we slave the background/shadow
sizes to the results using notify::allocation.

Also clean up the code for sizing the details pane, using a common
function which adjusts its x position in one place.
2009-07-06 16:15:12 -04:00
Colin Walters
15e862f974 Switch GenericDisplay to ShellOverflowList for dynamic height
This converts GenericDisplay to totally dynamic layout, where
we display as many items as we can, and the rest cleanly overflow
into pages.

For now, remove multi-column; to readd this, we can pack multiple
display items into a single ShellOverflowList item.
2009-07-04 15:30:12 -04:00
Owen W. Taylor
bddcb40237 Fix expand flags for the contents of the Dash
Pack everything we don't want to expand with BigBoxPackFlags.NONE;
this fixes the More... button for the docs section ending up with
a gap underneath it.

Since the More... button for the docs now ends is right at the bottom
of the dash, add some padding to it.

http://bugzilla.gnome.org/show_bug.cgi?id=587720
2009-07-04 14:16:57 +01:00
Colin Walters
66ea19fbfb Switch to dynamic layout for Dash
Instead of laying out the dash contents "manually" and having
the content items explicitly passed their height, just give them
a set width.
2009-07-04 13:45:27 +01:00
Colin Walters
96a2747e0b Wire up search up/down
This is not a complete fix; the search selection will not cross
the apps/docs boundary.  But it's good enough until we have a more
final search design.
2009-07-02 01:04:40 -04:00
Marina Zhurakhinskaya
454ca09575 Make individual dash panes reactive instead of making the dash Group actor reactive
The width of a Group actor ends up including the width of its hidden children,
so we were getting a reactive object as wide as the details pane that was
blocking the clicks to the workspaces underneath it even when the details
pane was actually hidden.

Not making the dash Group actor reactive solves this problem. However, we
have to make individual parts of the dash reactive instead so that the clicks
are not passed to the transparent actor underneath them. That transparent
actor is used for dismissing the additional panes when the user clicks over
the workspaces area.
2009-06-30 19:45:56 -04:00
Marina Zhurakhinskaya
db52e024e8 Use a separate icon image as a drag actor instead of using the clone of the icon
Clutter no longer allows using a clone of an actor that is not a part of
the scene graph. This is what used to happen when we created a clone for
the icon of the item that was being dragged, and then closed the More panes
with the original item, removing the icon from the scene graph. This was
also when happened when the user hit Esc while dragging, which prompted the
overlay to close, removing the original icon from the scene graph.

Rename getIcon() methods to createIcon() to better reflect on the fact that
a new icon is created each time the method is called (we do use cache in
some cases).

Remove a stray log message in overlay.js

Fixes http://bugzilla.gnome.org/show_bug.cgi?id=585490
and http://bugzilla.gnome.org/show_bug.cgi?id=585489
2009-06-30 16:42:00 -04:00
Colin Walters
12f78a08cd Replace Dash application display with AppWell
The new class AppWell implements the application favorite well
in the Dash component.  The previous AppDisplay remains for use
in the More... mode now.

Delete DEFAULT_APPLICATIONS; this is now in GConf.

Rename getMostUsedApps to getTopApps since we now have the
idea of explicit favorites.

Delete some GenericDisplay-related calls from overlay related
to the seletion - we'll reimplement keyboard nav in a more
coherent way later.
2009-06-30 16:41:54 -04:00
Marina Zhurakhinskaya
5ca4b41063 Use a single ItemResults class instead of AppResults and DocResults
AppResults and DocResults classes were identical with an exception of
the display class they used and the text label for the results. Merged
them into a single ItemResults class that takes these two additional
arguments.
2009-06-30 15:38:18 -04:00
Marina Zhurakhinskaya
8b15724c2a Show and hide dash panes instead of adding and removing each time
Add results and details panes up-front, and show and hide them instead
of adding and removing them each time
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
587f04f807 Add a comment about the use of the transparent background and set its opacity to 0
Add a comment about the use of the transparent background to catch clicks
in the workspaces area when the dash panes are being displayed and dismiss
the dash panes.

Set opacity for the background to 0 instead of using a transparent background
color so that Clutter optimizes the drawing of the background actor.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
9faf161aae Fix up horizontal gradient code and its use
Fix up the comments about the horizontal gradient code and use 8x1 texture
instead of 8x8.

Make sure the values we assign to the three-stop horizontal gradient
require the use of the three stop gradient, with the middle value not being
right between the side values.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
3b56807e78 Display search results automatically
Display a pane with search results for both applications and documents
automatically when a search string is entered.

Allow viewing search results for the individual section when More link
for applications or documents is clicked.

Move text labels for the applications and documents sections into the
respective classes.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
d5882c0cd3 Add back search functionality
Enable typing in the search box and display results in the results pane.
This means that the user has to open the details pane for applications
or documents to view the results for now.

Connect Enter to launch the seleted item.

Connect Escape to clear search, remove results and details panes,
or exit overlay.
2009-06-30 15:38:17 -04:00
Siegfried-Angel Gevatter Pujals
c92268a615 Hide details panel by default
Don't show the details panel when the overlay is activated,
only when explicitly requested by clicking the info icon.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
e1fa61cd58 Fix the height allocated to the results sections
The results sections no longer include a label on top of them, so the
height of that label needs to be subtracted when specifying the height
for the sections. This ensures that display controls are positioned
correctly on the bottom of the section.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
98c5f35324 Select an item when information button is clicked, launch on single click
Clicking the information button for an item selects it (i.e. highlights it)
and shows details about the item.
Clicking the rest of the item area launches it.
Item does not become draggable if the dragging is started over the information
icon (i.e. if the user presses the information icon, but releases elsewhere).

Make sure we emit "activated" signal and close the overlay when an item from
one of the results displays is launched.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
e3291aa5ba Remove pop-up previews
Pop-up previews are not part of the new design and interfere with the information link.

Make sure details display for applications has the appropriate width set.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
fab13dbb89 Make sure at most one item is selected in the overlay
Make sure at most one item is selected in the overlay and we always show
a details pane for the selected item.

Improve the positioning of the search box.

Remove a duplicate variable DASH_PAD and use DASH_SECTION_PADDING everywhere instead.
2009-06-30 15:38:17 -04:00
Colin Walters
c0c79e59fc Split out separate AppResults, DocResults classes. Readd search as stub.
Avoid bloating the Dash class by separating out a bit more functionality.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
90b7d9a7fa Change selected item color and make sure only one item is selected at a time
A blue selected item color fits better with the new color scheme than a green one.

Only one item should be selected across all the displays we are showing.
2009-06-30 15:38:17 -04:00
Marina Zhurakhinskaya
662c995515 Display a pane with item details
Display a pane with item details, such as a full image previews, when an item is single clicked.

Add a placeholder information link that shows up when an item is moused over.
2009-06-30 15:38:16 -04:00
Marina Zhurakhinskaya
580794f3fb Display all recent documents in the results pane
Display all recent documents in the results pane, in addition to the first
few displayed in the main dash. All documents can be viewed with the help
of a paging control.
2009-06-30 15:38:16 -04:00
Marina Zhurakhinskaya
1154a1e8d7 Add a results pane in the overlay
Display the results pane above the workspaces. The results pane is somewhat
transparent and has a blue gradient background. The dash pane is slightly
transparent and also has a blue gradient background.

The results pane shows up when a More control is clicked. It disappears when
a Less control is clicked, an area outside of the dash area is clicked,
an item starts being dragged, or the overlay mode is exited.

Add shell_global_create_horizontal_gradient() to shell-global.[ch]
2009-06-30 15:38:16 -04:00
Colin Walters
837683004d Remove a lot of obsolete code from old Sideshow (now Dash) 2009-06-30 15:38:16 -04:00
William Jon McCann
360338fe07 Shorten overlay animation to 0.25 seconds
The animation time for the overlay is a bit long.  We're using 0.5 second.
From my quick tests of "another system" it takes about half that time to
animate.  The other system feels about right.

http://bugzilla.gnome.org/show_bug.cgi?id=583572
2009-06-02 13:43:34 -04:00
Dan Winship
062e1aa78b Reorganize overlay hiding/showing code
Rather than having main.js manage this, put it into overlay.js, and
have the overlay object emit signals that other code can watch to do
things when the overlay is showing/shown/hiding/hidden.
2009-05-07 16:41:07 -04:00
Owen W. Taylor
20e755023b Clean up underscores in function and variable names
Try to fix all places where we accidentally used foo_bar instead
of fooBar for function names, function parameters, and variables.

(Lucas Rocha pointed out one example.)

http://bugzilla.gnome.org/show_bug.cgi?id=581141
2009-05-04 13:50:49 -04:00
Marina Zhurakhinskaya
82cf98740a Bug 578178 – Show large previews for image files
Use the actual image from the file for expanded mode previews for image files. Use the pixbuf loader to set the appropriate image size as soon as the image is prepared, but before it is loaded, to avoid loading large images. Apply the pixbuf orientation setting so that the image is properly rotated. Preserve the original size of the image if its dimensions are smaller than the space available.

Make sure we provide the accurate available width for the details actor. This
width has to exclude the padding and border width. Also provide the available height for the details actor.
2009-04-28 15:35:36 -04:00
Sander Dijkhuis
7c8cb8450c Bug 578584 - Use the wallpaper for the overlay background
The overlay looks nicer with the root window pixmap drawn on the
background. It is scaled up to twice the size, with positioning
based on the rule of thirds.

The sideshow animations shown when entering or leaving the
overlay and toggling the extended view were implemented by
Marina Zhurakhinskaya. They replace the old method of having a
black rectangle behind the workspaces that partly covers the
sideshow during transitions.

configure.ac: Add gdk-x11, clutter-x11 and clutter-glx modules.
overlay.js: Add a root window pixmap actor, make sideshow width
    definitions more logical, replace the way the sideshow
    animates when entering or leaving the overlay.
workspaces.js: Remove the backdrop, add helper functions for the
    overlay transitions.
shell-global.[ch]: Add a method that creates an actor displaying
    the root window pixmap and returning clones of it.
2009-04-22 02:46:36 +02:00
Colin Walters
a5a2112b31 Cleanup of search entry layout
This will be useful for later fine tuning.  We avoid some hard coded
offsetting in favor of using box layout.
2009-04-13 14:45:58 -04:00
Colin Walters
f5aed5127b Bug 578430 - Followup fix for docs
This commit follows up on 6760de9965c32f9f75901d3699aa7f2cb086f856
and adds the corresponding fix for "Less...".
2009-04-09 11:01:41 -04:00
Colin Walters
7ae278f206 Bug 578430 - Docs section regression
This fixes a bad merge which broke the docs section.
2009-04-09 10:58:58 -04:00
Colin Walters
b199ca2518 Add missing "return true" from event handler 2009-04-08 16:06:11 -04:00
Colin Walters
0a9226f7f2 Add a menu display to applications
ShellAppMonitor now depends on gmenu to load menus.

Use the menu data from ShellAppMonitor to show a menu list.

GenericDisplay implementations can now have a sidebar area.  We
handle keystrokes such as left/right explicitly.

Some internal API changes to account for the fact that a display
can have another filter in addition to the search.
2009-04-07 17:07:35 -04:00
Marina Zhurakhinskaya
5fbc0d4a56 Bug 577338 – Show item details on click in the expanded view
Change the overlay behavior to display more details about an item on single
click and launch it on double click.

When the item is clicked on in the expanded view, the details are shown in the
area on the right that is allocated for showing details. The details pop-up is
not shown for the item that was clicked on, but it is shown for other items on
hover and for the item that was clicked if the mouse pointer is moved back to
it.

Both hovering and single clicking results in the details pop-up being shown in
the regular view. (Single clicking actually doesn't do anything in the regular
view, but the details pop-up is shown due to hovering within the time it takes
to perform a single click.)

The overlay now uses 3 columns on the wide screen for displaying items in the
expanded view. This allows keeping the size of the details area the same for
expanded and regular views.

Add shell_get_button_event_click_count() to shell-global.[hc] to retrieve
the click count for button press and release events.

Add selectedItemDetails public variable actor to the generic display to
contain the details of the selected item and be shown in the overlay when
it is in the expanded view mode.

Fix the bug when the sideshow section would loose selection in the expanded
view if it did not have any items, and would not regain it if it was repopulated
with some items (e.g. when the search string changes).

The sideshow no longer takes overlay parent and width as constructor arguments.
It is added to the overlay inside the overlay code and manages its own width
instead (which is ok, since it is pretty much a private class within overlay).

Clean up the way selection is moved when an item is launched in order to have
selection on click and activation on double click be implemented in a similar
fashion. An unneeded _activatedItem variable in generic display was removed,
and the selected item is activated instead when necessary. The flow of processing
signals changed so that generic display no longer waits for the selection from
a different sideshow section to be removed before selecting an item that was
clicked on. This removed the need for doActivate() function.
2009-03-31 14:12:33 -04:00
Sander Dijkhuis
2b9b600710 Bug 574702 - Give the panel a gradient background and shadow
The panel looks nicer when it is drawn as a semi-transparent gradient
above the background color.

shell-global.[ch]: Add a function that creates vertical gradient actors.
panel.js: Change the look of the panel and put the tray in a framed box.
overlay.js: Extend the overlay background to behind the panel.
2009-03-24 15:20:16 -04:00
Marina Zhurakhinskaya
dcc0f368bd Add tooltip delay to the preview pop-ups.
Showing previews after a delay allows the user to move the mouse around
the screen without triggering constant pop-ups.

Make sure we remove the pop-up when the user hits Escape and redisplay
the pop-up if we are updating the section results due to a change in space
allocated for it.

Rename protected variable _hasPreview to _showPreview in order to not have
the naming conflict with a new private variable _havePointer, which we
name in first person.
2009-03-21 10:37:15 -04:00