Perform a different action on Main and Bottom Panel doubleClick event

There is a double click event attached to main and bottom panel TabBars which maximizes the widget area, like here:

I need the other functionalities of the TabBars as such but need to perform a different action on the double click event. How can I extend this TabBarRenderer class and override this protected method for my custom implementation logic? TIA.

[original thread by rhendricks]

You will need to rebind TabBarRendererFactory: