You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a lot of things that the Tab class is missing, at least some of these should be added. The fixed tab width will definitely be added to v0.7 v0.8 while an tab with images is very likely to be added as well.
Fixed tab width
The width of the tab currently depends on its contents. A consequence of this implementation was that the setSize function is empty and Tab cannot be scaled like other widgets. Adding a fixed tab width will solve this problem. The setSize function will set the total width and the tab height, the individual tab width becomes total width / nr of tabs. But setting a specific tab width might be wanted as well in which case the total width still has to be variable like it is now.
Hover state
It might be a nice addition to also have a different color on hover like ListBox has for its items.
Minimum tab width
Right now you can set a maximum tab width but not a minimum. The minimum is actually set to 2 * distance to side, but it should be more flexible and thus the user should be able to specify this value himself.
Edit: The following features are not be part of the rewrite. They could still be added in the future, but this issue will not remain open until then.
Images in tabs
Every tab currently contains a Label, but it should be possible to store a Picture in it. Since both versions behave very similar but they are hard to combine, they should probably be split in two classes which inherit from a base tab class which does most of the work. The question then becomes if it is possible to have a Tab class that contains an image with text next to it.
Enlare selected tab
It should be possible to enlarge the currently selected tab, especially when there is a fixed tab size. When no tabs are selected then then selecting a tab might increase the total width or decrease the individual tab widths, but in most cases one tab will already be selected and thus changing tab does not changes the total size. Making it larger vertically should also be possible but then the question becomes in which direction it should expand. Should changing the bottom or top of the individual tab impact the reported top or height of the widget? First thought is no, but when inside a HorizontalLayout it might be needed to fully display.
New tab
An extra tab on the right could be optionally added to create a new tab. The user should have some way to set what the text of this tab is. Since he will probably want to do something when the tab opens it could perhaps be set in the callback that the user gets instead of having to add another setter.
Close button
Adding an optional close button to each tab might be wanted in some cases.
Dragging
The should be an option to allow reordering tabs by dragging them.
The text was updated successfully, but these errors were encountered:
There are a lot of things that the Tab class is missing, at least some of these should be added. The fixed tab width will definitely be added to
v0.7v0.8 while an tab with images is very likely to be added as well.The width of the tab currently depends on its contents. A consequence of this implementation was that the setSize function is empty and Tab cannot be scaled like other widgets. Adding a fixed tab width will solve this problem. The setSize function will set the total width and the tab height, the individual tab width becomes total width / nr of tabs. But setting a specific tab width might be wanted as well in which case the total width still has to be variable like it is now.
It might be a nice addition to also have a different color on hover like ListBox has for its items.
Right now you can set a maximum tab width but not a minimum. The minimum is actually set to 2 * distance to side, but it should be more flexible and thus the user should be able to specify this value himself.
Edit: The following features are not be part of the rewrite. They could still be added in the future, but this issue will not remain open until then.
Every tab currently contains a Label, but it should be possible to store a Picture in it. Since both versions behave very similar but they are hard to combine, they should probably be split in two classes which inherit from a base tab class which does most of the work. The question then becomes if it is possible to have a Tab class that contains an image with text next to it.
It should be possible to enlarge the currently selected tab, especially when there is a fixed tab size. When no tabs are selected then then selecting a tab might increase the total width or decrease the individual tab widths, but in most cases one tab will already be selected and thus changing tab does not changes the total size. Making it larger vertically should also be possible but then the question becomes in which direction it should expand. Should changing the bottom or top of the individual tab impact the reported top or height of the widget? First thought is no, but when inside a HorizontalLayout it might be needed to fully display.
An extra tab on the right could be optionally added to create a new tab. The user should have some way to set what the text of this tab is. Since he will probably want to do something when the tab opens it could perhaps be set in the callback that the user gets instead of having to add another setter.
Adding an optional close button to each tab might be wanted in some cases.
The should be an option to allow reordering tabs by dragging them.
The text was updated successfully, but these errors were encountered: