TabBar

Need help, or want to share a macro? Post here!
triplus
Posts: 4866
Joined: Mon Dec 12, 2011 4:45 pm

Re: TabBar

Postby triplus » Sun Apr 17, 2016 1:24 pm

Status update:

I wanted to release some code this weekend but implementing ToolBar mode represented too big of an challenge. I wanted to implement this mode in the most seamless way (end user) possible ATM but too much toolbar flickering prevented me to do that in the end. As i couldn't bring it down to reasonable level for now. For this to work out the code in master would probably need to be adapted first.

Anyway therefore i started to focus on the next possible approach and it seems this one will work out!

P.S. After i will implement and released current code base i will probably wait a bit before doing any additional work. As i am not sure on how will Python side of FreeCAD look like after FreeCAD migrates to Qt 5!
pablogil
Posts: 505
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: TabBar

Postby pablogil » Mon Apr 18, 2016 6:43 am

Thanks for the update, we will wait for this next possible approach :)

Cheers!
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Posts: 4866
Joined: Mon Dec 12, 2011 4:45 pm

Re: TabBar

Postby triplus » Thu Apr 21, 2016 9:06 pm

Bar and ToolBar mode

  • Improved alphabetical sorting (autoload and selector list)
  • Ability to turn off selector menu (Workbench toolbar)
  • Added style sheet rule for checked QToolButtons
  • General Preferences Tab:
  • Moved tab/selector style modes to Style tab
  • Added TabBar mode (default)
  • Added Bar mode
  • Added Selector only sub-mode to Bar mode
  • Added ToolBar mode
  • Added Compact menu sub-mode to ToolBar mode
  • Added mode specific quick menu behaviour
  • TabBar toolbar removed from local/external toolbar list
  • Added global TabBar settings reset button

Selector Mode.png
Selector Mode.png (33.27 KiB) Viewed 1393 times


Bar Mode.png
Bar Mode.png (42.63 KiB) Viewed 1393 times


Bar Mode Selector Only.png
Bar Mode Selector Only.png (12.56 KiB) Viewed 1393 times


ToolBar Mode.png
ToolBar Mode.png (12.85 KiB) Viewed 1393 times


ToolBar Mode Compact Menu.png
ToolBar Mode Compact Menu.png (29.82 KiB) Viewed 1393 times
pablogil
Posts: 505
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: TabBar

Postby pablogil » Fri Apr 22, 2016 9:58 am

Awesome update!!
I really, really like it.

It works flawlessly with my last stylesheet version (the one where I have styled QToolButton:checked):
tabbar_toolbar.PNG
tabbar_toolbar.PNG (61.87 KiB) Viewed 1358 times

I wonder if it would be a good idea to internally style the toolbar so that the buttons appear to be specific to switch workbenches...

I have also paid attention to your internal styles and I have some suggestions. I'll explain them next week when I have time. They are suggestions to update the styles so that they work with any style that the user has set. ;)
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Posts: 4866
Joined: Mon Dec 12, 2011 4:45 pm

Re: TabBar

Postby triplus » Fri Apr 22, 2016 6:06 pm

pablogil wrote:Awesome update!!
I really, really like it.


Yay! ;)

A word or two about ToolBar (selector) mode. I think i managed to find the solution that in general works good. Selecting Arch/Draft WB and changing workbench isn't as optimal as i would like it to be. But i feel this is something to resolve in master. I might look into it (distant future).

I wonder if it would be a good idea to internally style the toolbar so that the buttons appear to be specific to switch workbenches...


Could be. Whenever possible i try to leave the styling to follow platform specific style.

I have also paid attention to your internal styles and I have some suggestions. I'll explain them next week when I have time. They are suggestions to update the styles so that they work with any style that the user has set. ;)


Suggestions welcomed.
triplus
Posts: 4866
Joined: Mon Dec 12, 2011 4:45 pm

Re: TabBar

Postby triplus » Sun Apr 24, 2016 1:20 pm

Show or Hide Toolbars

  • Added support to show or hide workbench toolbars
  • Added show or hide control to quick menu
  • Adapted the behaviour for toolbar selector mode
  • Added quick menu to TabBar toolbar (selector mode)

Toolbars ShowHide.png
Toolbars ShowHide.png (23.93 KiB) Viewed 1233 times
pablogil
Posts: 505
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: TabBar

Postby pablogil » Thu Apr 28, 2016 9:33 am

I have been using the ToolBar mode and it rocks, anyway I think the "compact menu" should be placed to the right as it's the "less important" menu. I mean, if someone has a custom workbench list, they will be most important ones and the full list (compact menu) is less important.

Well, maybe the smarter solution is not to place it to the left or right but to let the user decide by adding a Preference option, don't you think?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Posts: 4866
Joined: Mon Dec 12, 2011 4:45 pm

Re: TabBar

Postby triplus » Thu Apr 28, 2016 10:16 am

pablogil wrote:I have been using the ToolBar mode and it rocks, anyway I think the "compact menu" should be placed to the right as it's the "less important" menu. I mean, if someone has a custom workbench list, they will be most important ones and the full list (compact menu) is less important.


Actually once you start doing real work with FreeCAD you notice it becomes important. Therefore the decision was made for it to list all workbenches and to be there. And to provide other possibilities for customization as additional option. ;)

Well, maybe the smarter solution is not to place it to the left or right but to let the user decide by adding a Preference option, don't you think?


I will evaluate this.
pablogil
Posts: 505
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: TabBar

Postby pablogil » Mon May 16, 2016 8:16 pm

Hi triplus,

I'm finishing a special style for TabBar QToolBar and I'm having trouble creating different styles when it is placed horizontal and vertical. I of course know it's possible to set QToolBar:horizontal or QToolBar:vertical but it doesn't work properly if i want to style their QToolButtons differently...
Is it possible to you to change its ID if docked horizontally and vertically?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Posts: 4866
Joined: Mon Dec 12, 2011 4:45 pm

Re: TabBar

Postby triplus » Mon May 16, 2016 8:54 pm

pablogil wrote:Is it possible to you to change its ID if docked horizontally and vertically?


Will check and report (but it might take some time to do that as currently i have little free time). Note that i plan to change menu button mode and the change will likely affect styling.