Screen Tabs (ala 2.8 workspace buttons)

Hi %username%
Because blender has only state switches so-called “radio buttons”, I tried to write a simple addon for implementing a screen tabs switch feature. Script is rough at the moment, and I think that I am not on a right way with realization.
2.8 tabs:


My implementation (using my blender config):


My implementation (using default blender config, bug with duplicate names):


Also there is a way to replace dropdown menu with screens tabs by modifying [scripts\startup\bl_ui\space_info.py] to make it more nice looking. But I think it is not very convenient way comparing to addon.
This is more of a learning/experimental scripting. I’m pretty new to writing addons.
Will appreciate any help!
Link to script

1 Like

So, there is a solution for customizing existing UI in Blender.
It’s pretty simple. All you need is write your implementation of class you want to replace ant simply register it! Blender automatically replace its class with yours.

For example in my case:

class INFO_HT_header(Header):
	#Your implementation of UI

def register():
	bpy.utils.register_class(INFO_HT_header)

def unregister():
	bpy.utils.unregister_class(INFO_HT_header)

        #There your need to register original class to replace it back
	bpy.utils.register_class(bl_ui.space_info.INFO_HT_header)