Rotate tabs of widgets 90 degrees and let user collapse sidebar

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by MisterMaker »

So I am not expecting anyone to do this. But I had an idea and thought I share it.
It's kinda ripped from Blender. But I think it will cleanup a bit of the Freecad ui.
I also did some research into QT and don't see any reasons why this wouldn't be possible.
I even wonder if I can achieve rotating the tabs already with theme settings.
Please let me know what you think of it.
side bars.png
side bars.png (85.13 KiB) Viewed 7009 times
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by MisterMaker »

Ok did some reading and I should be able to do this in the theme file by the following line:

Code: Select all

qproperty-tabPosition: East;
See more info: https://doc.qt.io/qt-5/qtabwidget.html#TabPosition-enum
Now I only need to figure out where I should put that line in the qss file.
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by MisterMaker »

I did not managed to get this too work, it sits in the docking widget instead of the normal widget and the docking widget doesn't seem to have a vertical option. Although this is what I think is going on with my very limited knowledge of Qt.

I did manage too too rotate the top menu 90 degrees, which kinda looked cool but broke in Linkstage so sadly for now I won't be using it.
If any one is interested in rotating the top headers you can use following code:

Code: Select all

QDockWidget {
qproperty-features:"DockWidgetVerticalTitleBar";*/
}
Looked like this:
FreeCAD_oC7b7Yy8jV.png
FreeCAD_oC7b7Yy8jV.png (499.1 KiB) Viewed 6862 times
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by MisterMaker »

Got this too work:
Image

Code: Select all

QTabWidget {
     qproperty-tabPosition: East
}
Had to be placed before the first tabbar entry.
Only a bit disappointing that the settings menu also changed
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by Jee-Bee »

I like the widget on 90 degrees on the sidebar (Specially with easy hiding) And i don't like it on the preference menus. It feels unusual
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by MisterMaker »

Jee-Bee wrote: Wed Jul 20, 2022 11:04 am I like the widget on 90 degrees on the sidebar (Specially with easy hiding) And i don't like it on the preference menus. It feels unusual
Yeah, that was not intentionally. I think you can address a single window with #name in the stylesheet but couldn't get it too work.
User avatar
obelisk79
Veteran
Posts: 1062
Joined: Thu Sep 24, 2020 9:01 pm

Re: Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by obelisk79 »

Shouldn't the overall goal be to maximize viewport/work area and minimize dead-space on the screen? In my mind, the rearrangement encroaches on the horizontal work space adding a large amount of unused 'white space' to the ui.

If the idea was to minimize mouse travel by avoiding making users click at the bottom left corner of the screen then perhaps just moving the tabs to the top would work instead.
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by MisterMaker »

Yeah but since everyone is on widescreens your vertical pixels are more valuable then your horizontal pixels.
But also I would like to have the tabs stick out from the window so you don't have useless black space underneath it, which maybe can be done with Linkstage overlay stuff?
I like them also on the side because it is out of the information in the windows so easily findable.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by adrianinsaval »

MisterMaker wrote: Wed Jul 20, 2022 11:37 am Yeah but since everyone is on widescreens your vertical pixels are more valuable then your horizontal pixels.
yeah but notice he said maximizing the viewport, if it's horizontal the tabs only take vertical space of the combo view, not the 3d view. Personally I agree with you and would like to have something like what KDE does in some of it's apps:
Captura de pantalla 2022-07-20 092438.png
Captura de pantalla 2022-07-20 092438.png (14.84 KiB) Viewed 6690 times
it does take some horizontal space from the viewport but it's minimal. If you are using realthunder's branch I would recommend switching the tree view mode to tree view and property view in settings and you'll at least get vertical tabs, I don't think it has a button for collapsing the dock though.
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: Rotate tabs of widgets 90 degrees and let user collapse sidebar

Post by MisterMaker »

adrianinsaval wrote: Wed Jul 20, 2022 1:29 pm
MisterMaker wrote: Wed Jul 20, 2022 11:37 am Yeah but since everyone is on widescreens your vertical pixels are more valuable then your horizontal pixels.
yeah but notice he said maximizing the viewport, if it's horizontal the tabs only take vertical space of the combo view, not the 3d view. Personally I agree with you and would like to have something like what KDE does in some of it's apps:
Captura de pantalla 2022-07-20 092438.png
it does take some horizontal space from the viewport but it's minimal. If you are using realthunder's branch I would recommend switching the tree view mode to tree view and property view in settings and you'll at least get vertical tabs, I don't think it has a button for collapsing the dock though.
This would be nice and modern.
Linkstage has actually issues with the title bars on the side, it keeps the icons straight. But I updated the preference pack and you can enable it to test it out, just look for vertical in the qss file.
Post Reply