Skip to content
This repository has been archived by the owner on Mar 23, 2019. It is now read-only.

[SuperTabNavigator] patch for resizable close button, optional 'close all tabs' button in tabBar #348

Open
nicoulaj opened this issue Jun 19, 2011 · 0 comments

Comments

@nicoulaj
Copy link
Member

Originally filed by [email protected] on 2011-02-21T20:24:27

A patch (output of svn diff) to have two additional features:

(1) Resizable close button.

The old navigator has size hardcoded on 10 (pixels) those properties now are customizable.

It can be customized by using the patched flexlib and subclassing the SuperTabBar:

public class CustomSuperTabBar extends SuperTabBar {
public function CustomSuperTabBar() {
super();

    defaultTabProperties =  
        { 
        "closeButtonHeight": 17, 
        "closeButtonWidth": 17
        };
}

}

(2) Add a 'close all tabs' button in navigation bar (just left from popup button)

public class CustomSuperTabNavigator extends SuperTabNavigator {
public function CustomSuperTabNavigator() {
super();
// close all button is visible by default. If this is not desired, add:
// closeAllButtonEnabled = false;
}

override protected function createChildren():void {
    super.createChildren();
    closeAllButton.addEventListener(MouseEvent.CLICK,closeAllTabsHandler);
}

private function closeAllTabsHandler(event:MouseEvent):void {   
    // see SuperTabBar.onCloseTabClicked() how to close tabs...
    // you probably want to have a confirmation dialog before closing all.
}

}

Attached is the output of svn diff compared to trunk. Info and how it was generated:
C:\flexlib>svn info
Path: .
URL: http://flexlib.googlecode.com/svn/trunk
Repository Root: http://flexlib.googlecode.com/svn
Repository UUID: d9d5f27d-7529-0410-ab0a-a9f3ddeb9b35
Revision: 244
Node Kind: directory
Schedule: normal
Last Changed Author: wasbridge
Last Changed Rev: 244
Last Changed Date: 2011-02-08 09:35:36 +0100 (Tue, 08 Feb 2011)

svn diff > flexlib-svn-diff-close-button-dimensions-customizable-and-close-all-button.patch

Could this patch be merged into the trunk? If I get svn write access I'm willing to do this myself.

Thanks,

Kees

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant