~tpeeters/ubuntu-ui-toolkit/tabBar-selectionMode-fix

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml

  • Committer: tpeeters
  • Date: 2013-11-19 15:03:31 UTC
  • Revision ID: tim.peeters@canonical.com-20131119150331-6wikyf2dgqh9xpo0
don't update the offset if it is NaN

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
 
120
120
                    // Use opacity 0 to hide instead of setting visibility to false in order to
121
121
                    // make fading work well, and not to mess up width/offset computations
122
 
                    opacity: isVisible() ? 1.0 : 0.0
 
122
                    opacity: isVisible() ? 1.0 : 0.3
123
123
                    function isVisible() {
124
124
                        if (selected) return true;
125
125
                        if (!styledItem.selectionMode) return false;
276
276
        }
277
277
 
278
278
        function updateOffset(newOffset) {
 
279
            print("new offset = "+newOffset);
 
280
            if (!newOffset) return;
279
281
            if (offset - newOffset < -1) newOffset = newOffset - 2;
280
282
            offset = newOffset;
281
283
        }