Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package eden.shell.gui.components
{
    import mx.containers.TabNavigator;

    /**
     * Subclasses TabNavigator to make sure the tab bar is aligned to an exact pixel position, 
     * so users don't have to gouge out their eyes in order to use our products.
     *  
     * @author josh
     */
    public class EdenTabNavigator extends TabNavigator
    {
        //--------------------------------------------------------------------------
        //
        //  Constructor
        //
        //--------------------------------------------------------------------------

        public function EdenTabNavigator()
        {
            super();
        }
        
        //--------------------------------------------------------------------------
        //
        //  Painting
        //
        //--------------------------------------------------------------------------

        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
        {
            super.updateDisplayList(unscaledWidth, unscaledHeight);
            
            tabBar.move(Math.round(tabBar.x), tabBar.y);
        }
    }
}