~cairo-dock-team/ubuntu/oneiric/cairo-dock-plug-ins/2.3.0-2.1

« back to all changes in this revision

Viewing changes to dock-rendering/src/rendering-parabole.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2011-04-20 20:46:51 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110420204651-ftnpzesj6uc7qeul
Tags: 2.3.0~1-0ubuntu1
* New Upstream Version (LP: #723995)
* Upstream short ChangeLog (since 2.3.0~0rc1):
 - Updated translations
 - Updated the integration of the new versions of kwin and compiz
    (Switcher, ShowDesktop, etc.)
 - Removed a lot of useless g_print
 - Updated a few plug-ins to fit with the new version of the API (gldit)
 - Fixed a few bugs
 - Updated MeMenu, MessagingMenu and Status-Notifier to works
    with the latest version of dbusmenu, etc.
* Switch to dpkg-source 3.0 (quilt) format
* debian/cairo-dock-plug-ins.install:
 - Added new files (interfaces for python, ruby, vala and mono)
* debian/control:
 - Added new dependences for new applets (sensors and zeitgeist)
    and new interfaces (python, valac, ruby and mono)
 - Updated the version of cairo-dock build-dependences
* debian/rules:
 - Added a new CMake flag to install python interface in debian/tmp
* Updated debian/watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
310
310
                //cd_debug ("=> %.2fx%.2f , %.2f", w, h, lambda);
311
311
        }
312
312
        
313
 
        pDock->iMaxDockHeight = h + pDock->iMaxIconHeight * sqrt (5./4.) * (1 + my_fParaboleMagnitude * g_fAmplitude);
314
 
        pDock->iMaxDockWidth = w + pDock->iMaxIconHeight * (.5+sqrt(5./4.)) * (1 + my_fParaboleMagnitude * g_fAmplitude);  // ce serait plutot MaxIconWidth mais bon ...
 
313
        pDock->iMaxDockHeight = h + pDock->iMaxIconHeight * sqrt (5./4.) * (1 + my_fParaboleMagnitude * myIconsParam.fAmplitude);
 
314
        pDock->iMaxDockWidth = w + pDock->iMaxIconHeight * (.5+sqrt(5./4.)) * (1 + my_fParaboleMagnitude * myIconsParam.fAmplitude);  // ce serait plutot MaxIconWidth mais bon ...
315
315
        
316
316
        pDock->iMaxDockWidth += pDock->iMaxLabelWidth;  // theta(0) = 0 => texte horizontal.
317
317
        double fOrientationMax = G_PI/2 - atan (my_fParaboleRatio * my_fParaboleCurvature);  // fCurve_ (W) se simplifie ici.
337
337
        //\____________________ On dessine le cadre.
338
338
        
339
339
        //\____________________ On dessine la ficelle qui les joint.
340
 
        if (myIcons.iStringLineWidth > 0)
341
 
                cairo_dock_draw_string (pCairoContext, pDock, myIcons.iStringLineWidth, FALSE, FALSE);
 
340
        if (myIconsParam.iStringLineWidth > 0)
 
341
                cairo_dock_draw_string (pCairoContext, pDock, myIconsParam.iStringLineWidth, FALSE, FALSE);
342
342
        
343
343
        
344
344
        //\____________________ On dessine les icones et leurs etiquettes, mais separement.
545
545
                return NULL;
546
546
        
547
547
        //\____________________ On calcule la projection du curseur sur la courbe.
548
 
        double fMaxScale =  1. + my_fParaboleMagnitude * g_fAmplitude;
 
548
        double fMaxScale =  1. + my_fParaboleMagnitude * myIconsParam.fAmplitude;
549
549
        double w = MAX (1, pDock->container.iWidth - pDock->iMaxLabelWidth - pDock->iMaxIconHeight * (.5+sqrt(5./4.)) * fMaxScale);
550
550
        double h = my_fParaboleRatio * w;
551
551
        double alpha = my_fParaboleCurvature, lambda = h / pow (w, alpha);
682
682
        //\____________________ On dessine le cadre.
683
683
        
684
684
        //\____________________ On dessine la ficelle qui les joint.
685
 
        if (myIcons.iStringLineWidth > 0)
686
 
                cairo_dock_draw_string_opengl (pDock, myIcons.iStringLineWidth, FALSE, FALSE);
 
685
        if (myIconsParam.iStringLineWidth > 0)
 
686
                cairo_dock_draw_string_opengl (pDock, myIconsParam.iStringLineWidth, FALSE, FALSE);
687
687
        
688
688
        //\____________________ On dessine les icones et leurs etiquettes, mais separement.
689
689
        GList *pFirstDrawnElement = (pDock->pFirstDrawnElement != NULL ? pDock->pFirstDrawnElement : pDock->icons);
701
701
                
702
702
                cairo_dock_render_one_icon_opengl (icon, pDock, fDockMagnitude, FALSE);
703
703
                
704
 
                if (icon->pTextBuffer != NULL)  // en opengl on dessine les etiquettes meme pendant le depliage.
 
704
                if (icon->iLabelTexture != 0)  // en opengl on dessine les etiquettes meme pendant le depliage.
705
705
                {
706
706
                        glPushMatrix ();
707
707
                        cairo_dock_translate_on_icon_opengl (icon, CAIRO_CONTAINER (pDock), 1.);
711
711
                        glTranslatef (icon->fWidth * icon->fScale/2, -icon->fHeight * icon->fScale/2, 0.);
712
712
                        
713
713
                        _cairo_dock_enable_texture ();
714
 
                        _cairo_dock_set_blend_over ();
 
714
                        ///_cairo_dock_set_blend_over ();
 
715
                        _cairo_dock_set_blend_alpha ();
715
716
                        _cairo_dock_set_alpha ((1 - pDock->fFoldingFactor) * (1 - pDock->fFoldingFactor));
716
717
                        
717
718
                        if (pDock->fAlign == 1)