Tabs, tabs and more tabs! Tabs for User Preferences and Properties
Motivation
Currently, the User Preferences and the Properties space use buttons that behave like tabs, but don't look like them. A user should be able to expect what happens when he clicks such a button what is not given currently. Since we now have tabs in the UI, it is finally time to tackle this by adding tabs here, too.
Screenshots
Implementation details
- It seemed like a good idea to add a new ARegion type for tabs, which is called RGN_TYPE_TABS
- Tabs are drawn as a new button type called TAB what means, we can add tabs everywhere in the UI
- Feedback on mouse hover
- Tabs can now be created through Python by
layout.prop_tabs(data, property, text, text_ctxt, translate, icon, alignment, icon_only, separate)
- data, property, text, text_ctxt, translate, icon : Standart parameters.
- alignment: The direction to which the tabs will be aligned to. Enum in ['TOP', 'DOWN', 'LEFT', 'RIGHT'].
- icon_only: Draw only icons in tabs, no text (boolean, default "false").
- separate: Seperate tabs with some whitespace (boolean, default "true").
- You can "scroll" through the tabs by either using the mousewheel in the Tab's region, or by using CTRL + mousewheel in the entire Region/Space
- The tabs are themeable via the color parameters already existing for the toolbar tabs
- A small (but IMO nice) detail is that the region separators (the lines between the regions) are taking care of the active tab
- The header of the Properties Space is now aligned to the bottom and as its space isn't needed for the context switches anymore, it now contains the View menu and a pull down style context switcher









