PersistentToolbars

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

PersistentToolbars

Postby triplus » Wed Aug 10, 2016 10:04 pm

Currently FreeCAD only restores toolbar position for default workbench when FreeCAD is started. PersistentToolbars when installed should save/restore toolbar position for all workbenches.

PersistentToolbars.png
PersistentToolbars.png (20.28 KiB) Viewed 925 times


First release:

  • Define default behaviour and toolbar sorting
  • Manage Python based toolbars (Draft/Arch)
  • Implemented save and restore toolbars position logic

Code repository:

https://github.com/triplus/PersistentToolbars
User avatar
sgrogan
Posts: 3050
Joined: Wed Oct 22, 2014 5:02 pm

Re: PersistentToolbars

Postby sgrogan » Wed Aug 10, 2016 11:26 pm

part.PNG
part.PNG (80.26 KiB) Viewed 911 times
part_restart.PNG
part_restart.PNG (106.64 KiB) Viewed 911 times
PartDesign.PNG
PartDesign.PNG (149.57 KiB) Viewed 911 times
PartDesign_restart.PNG
PartDesign_restart.PNG (123 KiB) Viewed 911 times
User avatar
sgrogan
Posts: 3050
Joined: Wed Oct 22, 2014 5:02 pm

Re: PersistentToolbars

Postby sgrogan » Wed Aug 10, 2016 11:28 pm

draft.PNG
draft.PNG (97.3 KiB) Viewed 911 times
Draft_restart.PNG
Draft_restart.PNG (135.75 KiB) Viewed 911 times

Part is my default WB. It seems for me after quickly testing it works for everything BUT the default.
Great Project!!!

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8186 (Git)
Build type: Release
Branch: master
Hash: 137c951e7b397edf369300f6214b1a820f45742b
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
triplus
Posts: 4993
Joined: Mon Dec 12, 2011 4:45 pm

Re: PersistentToolbars

Postby triplus » Wed Aug 10, 2016 11:53 pm

sgrogan wrote:Part is my default WB. It seems for me after quickly testing it works for everything BUT the default.


Yes in the future i have 2 bigger goals on the todo list for PersistentToolbars:

  • Reduce flickering and try to bring it down to the level when PersistentToolbars isn't used.
  • Restore default workbench toolbar position when FreeCAD starts.

As for default workbench save/restore should still work but only after user changes workbench to another one and after back to the default one. In addition rearranging toolbars in default workbench (or global toolbars in other workbenches) will still (at least partially) be picked up by default FreeCAD restore behaviour.

I could probably resolve this easily by using timer but i am trying to find better approach and didn't find one yet:

viewtopic.php?f=10&t=16425#p129848

Therefore for now i decided it is time for interested FreeCAD users to start testing the save/restore logic if it does the job. As i feel that part is done. And to gather more feedback on what should be the default behaviour... Anyway it isn't "perfect" yet but hopefully it is already useful.

Great Project!!!


Thanks.
User avatar
sgrogan
Posts: 3050
Joined: Wed Oct 22, 2014 5:02 pm

Re: PersistentToolbars

Postby sgrogan » Thu Aug 11, 2016 12:08 am

triplus wrote:Reduce flickering and try to bring it down to the level when PersistentToolbars isn't used.

I have not experienced this.
triplus wrote:As for default workbench save/restore should still work but only after user changes workbench to another one and after back to the default one. In addition rearranging toolbars in default workbench will still (at least partially) be picked up by default FreeCAD restore behaviour.

I will try this. I've followed the tab bar and pie menu topics passively, but as most of the softwares I use don't have so it I don't miss it, I do see it's functionality though. This project gives FreeCAD something I personally am missing so I will try to support your efforts as much as possible. For me at least it makes FreeCAd more "comfortable".
triplus
Posts: 4993
Joined: Mon Dec 12, 2011 4:45 pm

Re: PersistentToolbars

Postby triplus » Thu Aug 11, 2016 10:07 pm

sgrogan wrote:
triplus wrote:Reduce flickering and try to bring it down to the level when PersistentToolbars isn't used.

I have not experienced this.


Will first check on Windows and some Linux desktop environments when i will start to work on it. I will likely do some work on PieMenu before tackling this.

I will try this. I've followed the tab bar and pie menu topics passively, but as most of the softwares I use don't have so it I don't miss it, I do see it's functionality though. This project gives FreeCAD something I personally am missing so I will try to support your efforts as much as possible. For me at least it makes FreeCAd more "comfortable".


Yes it is interesting as different users have different priorities. PersistentToolbars support is something that is occasionally mentioned (it has been like that for years) by users. If there would be no FreeCAD i guess there would be no projects like TabBar. If there wouldn't be TabBar i feel that there would not be projects like PersistentToolbars, PieMenu, Launcher... At least not from my side. ;)

Anyway trying to make default workbench play along when FreeCAD starts is priority when it comes to PersistentToolbars development. Hopefully i will be able to think of something that works good. Today i made a few prototypes and i guess one has potential. Will try to turn it in release material over the weekend.
User avatar
sgrogan
Posts: 3050
Joined: Wed Oct 22, 2014 5:02 pm

Re: PersistentToolbars

Postby sgrogan » Thu Aug 11, 2016 10:29 pm

triplus wrote:Anyway trying to make default workbench play along when FreeCAD starts is priority when it comes to PersistentToolbars development. Hopefully i will be able to think of something that works good. Today i made a few prototypes and i guess one has potential. Will try to turn it in release material over the weekend.

Great! For now I have set my default to the Start WB and having some disorder for the toolbars is not a problem. But when switching to the WB's that I use frequently having the toolbars consistent as I have set them is a convenience.
As always, when time, interest, and skill collide, good things happen :) And of course this is FreeCAD and "It's done when it's done"
triplus
Posts: 4993
Joined: Mon Dec 12, 2011 4:45 pm

Re: PersistentToolbars

Postby triplus » Sat Aug 13, 2016 2:21 pm

Changelog:

  • Restore toolbars for default workbench on FreeCAD start

P.S. I just added additional small commit to correctly connect to and activate mentioned support.
pablogil
Posts: 518
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: PersistentToolbars

Postby pablogil » Tue Aug 16, 2016 12:40 pm

Great module!

Working perfectly on macOS
Thanks!!
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Posts: 4993
Joined: Mon Dec 12, 2011 4:45 pm

Re: PersistentToolbars

Postby triplus » Tue Aug 16, 2016 4:30 pm

pablogil wrote:Great module!

Working perfectly on macOS
Thanks!!


You're welcome.