diff options
| author | Mirco Müller <mirco.mueller@canonical.com> | 2012-03-13 13:20:30 -0400 |
|---|---|---|
| committer | Tarmac <> | 2012-03-13 13:20:30 -0400 |
| commit | 2e181eb105486ace10bf4c73b11f279e23fa11a6 (patch) | |
| tree | 192bd2241b8d9c813d6b74bc12499c4deb485132 /plugins | |
| parent | f392c49e1cd6c07c1c960bc4b34842660f7e89b5 (diff) | |
| parent | e88fe947dc101d016347126594d9ae2e19ec26de (diff) | |
Trying to understand how and where changes to an icons alpha- and saturation-value are taking place is material to get insane. By now I've spent many many many hours trying to get behind what's going on. I can't say I fully grasp
the intricate ways of icons opacity and saturation in class Launcher. As far as I can tell, there are four valid "cases" for the launcher icons in terms of alpha and saturation. To make it easier for you to follow, have a look at this table: alpha | saturation ------------------------------------------------------------------- | dash open | 0.5 | 0.0 | | dash closed | 1.0 | 1.0 | | drop-target (dragging & dash open) | 1.0 | 1.0 | | no drop-target (dragging & dash open) | 0.5 | 0.0 | ------------------------------------------------------------------- So alpha should never be outside [0.5 .. 1.0] and saturation should never be outside [0.0 .. 1.0]. From my investigation it is sufficient to protect only against the lower threshold, where alpha needs to be 0.5 and saturation 0.0 without fix: http://people.canonical.com/~mmueller/863230-issue-1.ogv with fix: http://people.canonical.com/~mmueller/after-fix-863230.ogv If anybody ever causes this to regress, I'll ... !. Fixes: https://bugs.launchpad.net/bugs/863230. Approved by Tim Penhey. (bzr r2104)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/Launcher.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/unityshell/src/Launcher.cpp b/plugins/unityshell/src/Launcher.cpp index f7dd213e1..6582bd147 100644 --- a/plugins/unityshell/src/Launcher.cpp +++ b/plugins/unityshell/src/Launcher.cpp @@ -902,6 +902,13 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon::Ptr icon, struct timespec co icon->GetIconType() == AbstractLauncherIcon::TYPE_DEVICE || icon->GetIconType() == AbstractLauncherIcon::TYPE_EXPO; + // trying to protect against flickering when icon is dragged from dash LP: #863230 + if (arg.alpha < 0.5) + { + arg.alpha = 0.5; + arg.saturation = 0.0; + } + if (_dash_is_open) arg.active_arrow = icon->GetIconType() == AbstractLauncherIcon::TYPE_HOME; else @@ -989,6 +996,13 @@ void Launcher::FillRenderArg(AbstractLauncherIcon::Ptr icon, if (drop_dim_value < 1.0f) arg.alpha *= drop_dim_value; + // trying to protect against flickering when icon is dragged from dash LP: #863230 + if (arg.alpha < 0.5) + { + arg.alpha = 0.5; + arg.saturation = 0.0; + } + if (icon == _drag_icon) { if (MouseBeyondDragThreshold()) |
