~cairo-dock-team/ubuntu/precise/cairo-dock/3.0.0.0beta1

« back to all changes in this revision

Viewing changes to src/implementations/cairo-dock-hiding-effect.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2011-03-17 14:08:48 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20110317140848-b8efysl4ynhjm87k
Tags: 2.3.0~1-0ubuntu1
* New Upstream Version (LP: #723994)
* Upstream short ChangeLog:
 - Updated translations
 - Updated the integration of the new versions of kwin and compiz
 - Updated default theme
 - Fixed a few bugs
 - Updated the man
* debian/control:
 - Added suggests apps for cairo-dock-core (needed by the default theme)
 - Updated the description (from launchpad.net/cairo-dock)
 - Added cairo-dock-plug-ins as a new suggestion for cairo-dock-core
* debian/patches:
 - Updated the default theme to use default apps of Ubuntu Natty 
* Switch to dpkg-source 3.0 (quilt) format
* Removed the desktop-file-category patch (sync with debian packages)
* debian/rules:
 - Added a CMake flag to disable the gtk grip
 - No longer used simple-patchsys
* Updated the debian/watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <gtk/gtkgl.h>
40
40
#include <GL/glu.h>
41
41
 
42
 
#include "cairo-dock-animations.h"
43
 
#include "cairo-dock-load.h"
 
42
#include "cairo-dock-animations.h"  // definition of CairoDockHidingEffect
44
43
#include "cairo-dock-log.h"
45
44
#include "cairo-dock-draw-opengl.h"
46
 
#include "cairo-dock-internal-system.h"
47
45
#include "cairo-dock-backends-manager.h"
 
46
#include "cairo-dock-hiding-effect.h"
48
47
 
49
48
extern gboolean g_bUseOpenGL;
50
49
extern CairoDockGLConfig g_openglConfig;
83
82
 
84
83
static inline double _compute_y_offset (CairoDock *pDock, double fOffset)
85
84
{
86
 
        int N = (pDock->bIsHiding ? mySystem.iHideNbSteps : mySystem.iUnhideNbSteps);
 
85
        int N = (pDock->bIsHiding ? myBackendsParam.iHideNbSteps : myBackendsParam.iUnhideNbSteps);
87
86
        int k = (1 - fOffset) * N;
88
87
        double a = pow (1./pDock->iMaxDockHeight, 1./N);  // le dernier step est un ecart d'environ 1 pixel.
89
88
        return pDock->iMaxDockHeight * pow (a, k) * (pDock->container.bDirectionUp ? 1 : -1);
350
349
 
351
350
static inline double _compute_zoom (CairoDock *pDock, double fOffset)
352
351
{
353
 
        int N = (pDock->bIsHiding ? mySystem.iHideNbSteps : mySystem.iUnhideNbSteps);
 
352
        int N = (pDock->bIsHiding ? myBackendsParam.iHideNbSteps : myBackendsParam.iUnhideNbSteps);
354
353
        int k = fOffset * N;
355
354
        double a = pow (1./pDock->iMaxDockHeight, 1./N);  // le premier step est un ecart d'environ 1 pixels.
356
355
        return 1 - pow (a, N - k);