uwerat / qskinny

A lightweight framework on top of the Qt scene graph and only few classes from Qt/Quick. It is usable from C++ and/or QML.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QskTabBar reimplementation

uwerat opened this issue · comments

commented

At the moment QskTabBar is a composite made of QskTabButtons, what does not match the philosophy of QSkinny to prefer scene graph node composition. I'm not sure if there is a use case for a QskTabBar beside of being a part of QskTabView - so it is a valid consideration if we shouldn't put everything into QskScrollView.

With QskSegmentedBar, we have a very similar control - the main difference between seems to be, that a tab bar can be scrolled.

In a first step we want to to remove QskTabButton and reimplement QskTabBar using scene graph node composition. If we come to the conclusion, that there is no need for a standalone QskTabBar we will move code inside of QskTabView.

Maybe something to take into consideration: We have the use case where the spacing between tab buttons depends on its number, e.g. for many tab buttons the spacing is smaller than for few ones.

So in our case it would help if the layouting was that flexible; I am not sure the QskSegmentedBar allows for this as of now...

On Windows, a tab has an icon for display, and another one for closing it, see below or at https://www.figma.com/file/NAWMapFlXnoOb86Q2H5GKr/Windows-UI-(Community)?node-id=29551-10384&t=ctlCpKRzYp2X4cvs-0 .

So this seems to be another difference to the segmented bar...

image

I wonder if we can subclass from QskSegmentedBar and implement things like the close button above in the subclass...