PersistentToolbars

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: PersistentToolbars

Post by triplus »

kkremitzki wrote:Thanks for your work on this. Hopefully it can be upstreamed into your Tux module because it increases the usability of FreeCAD a lot. So far I've had pretty good performance but if you want more testing of a dev branch I'd be glad to.
Placing algorithm itself should work good. The final result should be correctly placed toolbars.

But if you will look closer (create a few rows of toolbars in PartDesign and Sketcher workbench to spot the behaviour easier). When you switch between the workbenches a few times. Toolbars can for example pop up on top before being placed below. And that can easily result in a lot of flickering and unneeded temporarily toolbar area expansion. In FreeCAD 0.17 users will be switching between PartDesign and Sketcher workbench at every sketch edit operation. Therefore for this to work as a part of default experience i had to improve this behaviour. It was challenging and i gave up a few times. But now it seems i found a (few lines) solution to manage this reasonably well. Will try to finish the work and upload to GitHub this weekend.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: PersistentToolbars

Post by triplus »

Simplification and experience improvements
  • Simplified start logic (timer)
  • Removed default sorting functionality
  • Reduce potential flickering by managing hidden toolbars
https://github.com/triplus/PersistentToolbars

Hopefully some testing will be done. If everything will work as it should i will upstream the PersistentToolbars functionality in the following days.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: PersistentToolbars

Post by triplus »

PersistentToolbars module installed form my GitHub can continue to be used just like before. But it will now start only in FreeCAD 0.16 or lower:

https://github.com/triplus/PersistentToolbars

I made a pull request and when merged PersistentToolbars functionality should become part of the default FreeCAD experience in FreeCAD 0.17 and up.

https://github.com/FreeCAD/FreeCAD/pull/609

Data between both versions isn't shared. Note that in addition i added small piece of functionality to the upstreamed version. Developer can now have more control on where the toolbars should be positioned by default in the workbench. In for example Sketcher workbench InitGui.py file developer could add:

Code: Select all

try:
    import PersistentToolbars

    toolbars = ["Sketcher constraints",
                "Break",
                "Sketcher geometries"]

    PersistentToolbars.addRight("SketcherWorkbench", toolbars)
except ImportError:
    pass
Such preset data is deleted when FreeCAD is closed. Once user moves one of the toolbar custom toolbar layout will start to be used instead.
User avatar
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: PersistentToolbars

Post by pablogil »

That's great @triplus!

Thank you very much

PS - how is going PieMenu v2 development?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: PersistentToolbars

Post by triplus »

pablogil wrote:That's great @triplus!

Thank you very much
You're welcome.
PS - how is going PieMenu v2 development?
There is a list of things i plan to finish when it comes to FreeCAD. As i committed to achieving such goals in the past. It would likely be easier for me to just move on before doing that but what's done is done. PieMenu 2.0 is on the list. ;)

P.S. As for a bit longer version. There is massive amount of user control PieMenu 2.0 requires. And users shouldn't be aware of that. As things need to be made simple for the user. Developers want a piece of it. PieMenu 1.0 is too (code) complex to be upstreamed. The process of adding features and simplifying things at the same time represents challenge. And to resolve such challenge well that takes time. And as PieMenu 2.0 is not the only item on the list available time is distributed between all of the items on the list. What is important to know is time is invested and therefore results will come. After all 2 items on the list are now checked!
User avatar
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: PersistentToolbars

Post by pablogil »

Cool, cheers. ;)
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Post Reply