From 64baea16935376ec5c851cd6b791401691b86e19 Mon Sep 17 00:00:00 2001 From: Vit Stanislav Date: Sun, 15 Jan 2012 15:30:59 +0100 Subject: [PATCH] Workspace: Set a maximum scale for window clones If there's a single small window (e.g. empathy chat) in the overview, it looks usable, because it's as big as outside of the overview, but when you start to type, overview search is launched, which is confusing. Fix that by setting maximum scale for window clones to 0.7 https://bugzilla.gnome.org/show_bug.cgi?id=646704 --- js/ui/workspace.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index fffa7c313..519e9b809 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -23,6 +23,8 @@ const WINDOW_DND_SIZE = 256; const SCROLL_SCALE_AMOUNT = 100 / 5; +const WINDOW_CLONE_MAXIMUM_SCALE = 0.7; + const LIGHTBOX_FADE_TIME = 0.1; const CLOSE_BUTTON_FADE_TIME = 0.1; @@ -964,7 +966,7 @@ const Workspace = new Lang.Class({ let scale = Math.min((width - buttonOuterWidth) / rect.width, (height - buttonOuterHeight - captionHeight) / rect.height, - 1.0); + WINDOW_CLONE_MAXIMUM_SCALE); x = Math.floor(x + (width - scale * rect.width) / 2);