From 90b7d9a7fa19bf03426d3ee6d229255132d7b494 Mon Sep 17 00:00:00 2001 From: Marina Zhurakhinskaya Date: Tue, 16 Jun 2009 16:30:42 -0400 Subject: [PATCH] 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. --- js/ui/genericDisplay.js | 2 +- js/ui/overlay.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/js/ui/genericDisplay.js b/js/ui/genericDisplay.js index c22848f6e..0cb2676d3 100644 --- a/js/ui/genericDisplay.js +++ b/js/ui/genericDisplay.js @@ -22,7 +22,7 @@ ITEM_DISPLAY_DESCRIPTION_COLOR.from_pixel(0xffffffbb); const ITEM_DISPLAY_BACKGROUND_COLOR = new Clutter.Color(); ITEM_DISPLAY_BACKGROUND_COLOR.from_pixel(0x00000000); const ITEM_DISPLAY_SELECTED_BACKGROUND_COLOR = new Clutter.Color(); -ITEM_DISPLAY_SELECTED_BACKGROUND_COLOR.from_pixel(0x00ff0055); +ITEM_DISPLAY_SELECTED_BACKGROUND_COLOR.from_pixel(0x4f6fadaa); const DISPLAY_CONTROL_SELECTED_COLOR = new Clutter.Color(); DISPLAY_CONTROL_SELECTED_COLOR.from_pixel(0x112288ff); const PREVIEW_BOX_BACKGROUND_COLOR = new Clutter.Color(); diff --git a/js/ui/overlay.js b/js/ui/overlay.js index 04f9113c6..1521d888d 100644 --- a/js/ui/overlay.js +++ b/js/ui/overlay.js @@ -364,6 +364,8 @@ Dash.prototype = { // no item in the doc display has the selection. me._docDisplay.unsetSelected(); me._docDisplay.hidePreview(); + me._resultsDocDisplay.unsetSelected(); + me._resultsDocDisplay.hidePreview(); }); this._docDisplay.connect('selected', function(docDisplay) { // We allow clicking on any item to select it, so if an @@ -371,6 +373,8 @@ Dash.prototype = { // no item in the app display has the selection. me._appDisplay.unsetSelected(); me._appDisplay.hidePreview(); + me._resultsDocDisplay.unsetSelected(); + me._resultsDocDisplay.hidePreview(); if (me._detailsPane.get_parent() == null) { me.actor.add_actor(me._detailsPane); me.emit('panes-displayed'); @@ -379,6 +383,10 @@ Dash.prototype = { me._detailsContent.append(me._docDisplay.selectedItemDetails, Big.BoxPackFlags.NONE); }); this._resultsDocDisplay.connect('selected', function(resultsDocDisplay) { + me._appDisplay.unsetSelected(); + me._appDisplay.hidePreview(); + me._docDisplay.unsetSelected(); + me._docDisplay.hidePreview(); if (me._detailsPane.get_parent() == null) { me.actor.add_actor(me._detailsPane); me.emit('panes-displayed');