[09/04/22][LinkStage3][UI] VertUI / Midnight UI

Report observations made with the new Toponaming branch.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

[09/04/22][LinkStage3][UI] VertUI / Midnight UI

Post by Petrikas »

Hi all,

:!: [09/04/2022] Update: I have made an auxiliary theme called "Midnight" which is similar to VertUI, but includes many changes that might not be to everyone's taste. That can be found here: https://petrikas.gumroad.com/l/midnight
[17/10/2021] Realthunder has made really easy to edit/export/import configurations, installing VertUI has become really easy.
[19/07/2021] I've reached a point where I'm pretty happy with the Vertical UI project for FreeCAD Linkstage3, so I decided to share it.

Here's what the final UI looks like:
sc 2021-07-19 18_56_37.jpg
sc 2021-07-19 18_56_37.jpg (420.14 KiB) Viewed 13599 times
https://www.youtube.com/watch?v=1uMzNe8KwAw

Installation steps:

- Backup the FreeCAD User Folder (C:\Users\USER\AppData\Roaming\FreeCAD (Windows) & /home/USER/.FreeCAD (Linux))
- Download and extract VertUI
- Copy "Gui" to FreeCAD User Folder. Merge the contents if Gui folder already exists. Overwrite if you had VertUI already installed.
- Run FreeCAD Link
- Tools -> Edit Parameters
- Merge -> From File
- Select VertUI.FCParam
- Repeat that last 3 steps again*

*Loading parameters is still experimental. There are issues that can be fixed by simply re-merging VertUI.FCParam.
I have purposely avoided making a preset configuration, because I found it to be very inconsistent.

That's all. Enjoy.

Github: https://github.com/StudioPetrikas/FreeCADLink_VertUI
Last edited by Petrikas on Sat Apr 09, 2022 9:07 pm, edited 19 times in total.
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
User avatar
Petert
Posts: 124
Joined: Tue Dec 01, 2015 9:27 pm

Re: [LinkStage3][UI] Vertical UI for large screens (4K)

Post by Petert »

Great stuff!
I am a refugee from Fusion 360. Switched over to FreeCAD and am spreading the word. After years of very little progress I switched again to another solution. I wish you all the best!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [LinkStage3][UI] Vertical UI for large screens (4K)

Post by Kunda1 »

This looks awesome!

Good questions.
Petrikas wrote: Fri Feb 19, 2021 12:24 pm 1. If I was to share this UI, I've heard that some of the info about the toolbar is kept in Windows registry. Is there an easy way to unload layout data to a different file? How does that work in Linux? Mac?
This should be simpler on Linux/macOS. ModernUI may be a useful reference here. Although @HakanSeven12 thinks that modern UI may need to be coded in cplusplus to operate more optimally (need to find citation for this)
ref: https://forum.freecadweb.org/viewtopic. ... 90#p475117
Petrikas wrote: Fri Feb 19, 2021 12:24 pm 2. Copying Stylesheets to program files feels... dirty. Is there a way of loading Stylesheets from the user/appdata FreeCAD folder?
2. I'd love for the Addon Manager/Extension Manager to do this automagically eventually. But for now to make things simple for the user you add your theme to the FC source. But since LlnkStage3 differs from master, we may need some logic that differentiates between the 2 separate stylesheets. Sort of how realthunder solved the {user|system}.cfg issue by separating LinkStage3 config files in to their own files.
Petrikas wrote: Fri Feb 19, 2021 12:24 pm 3. This UI also requires another Add-on called Toolbar Style, for getting text and buttons in one. How would I bundle that together?
3. We need to work on this functionality so it would be automated. In theory we'd utilize the Addon Manager metafile and make the ToolbarStyle addon a dependency. But for now we'll need people to 'rough it' and download it independently.

Edit: added citation to ModernUI section
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: [LinkStage3][UI] Vertical UI for large screens (4K)

Post by Petrikas »

Kunda1 wrote: Fri Feb 19, 2021 2:28 pm This looks awesome!
Thanks! It definitely needs some polish, but so far it works at least.

The main reason I'm asking about sharing is that I'm planning on doing a couple (maybe more!) video tutorials on FreeCAD, Blender. It would be nice if I could show how to get this setup running.

So far I need to (mental check-list):

-Copy the Stylesheet
-Copy/Install Toolbar Style
-Copy Install a few registry keys (TBD on what to do on Mac/Linux)
-Copy Possibly copy over user.cfg (or show how to append/edit it)

This could probably be done with an installer, but I'm one of those people who will always trust a .zip more than .exe :D

Thanks for the help!
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
User avatar
Brodie
Posts: 9
Joined: Tue Nov 05, 2019 11:39 am
Location: Australia
Contact:

Re: [LinkStage3][UI] Vertical UI for large screens (4K)

Post by Brodie »


1. If I was to share this UI, I've heard that some of the info about the toolbar is kept in Windows registry. Is there an easy way to unload layout data to a different file? How does that work in Linux? Mac?
Most apps (including FreeCAD) on Linux have a folder in the .config folder where config files etc are stored. Think of it like the App Data folder on Windows.
I have no idea how it works on Mac, but I think you'll find on all 3 Operating systems, FreeCAD's user config is kept in their AppData/.config folder including their current themes etc.

If you made a separate file to keep any extra configuration data for your UI add-on you'd be able to use the same code to load and save on all 3 systems and also not interfere with the vanilla config files.

Could it just be QT storing information in the registry or perhaps it's just toolbar locations etc? Either way, imho, I'd opt for a file based method, then it's also easier for users to sync their setups between computers and even operating systems.
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: [LinkStage3][UI] Vertical UI for large screens (4K)

Post by Petrikas »

Brodie wrote: Fri Feb 19, 2021 3:01 pm Could it just be QT storing information in the registry or perhaps it's just toolbar locations etc? Either way, imho, I'd opt for a file based method, then it's also easier for users to sync their setups between computers and even operating systems.
It actually IS QT just storing toolbar locations in the registry. Such a simple thing shouldn't be in the registry in my opinion. Hence my search for a less invasive way of relaying the toolbar location information to another user.

However, I have 0 understanding of how QT works, I hoped someone faced the same issues I have and maybe made an add-on?

Right now if you just load the Stylesheet, you have to manually carry every toolbar to the right, which is a paaaaain!
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [LinkStage3][UI] Vertical UI for large screens (4K)

Post by sgrogan »

Petrikas wrote: Fri Feb 19, 2021 3:08 pm It actually IS QT just storing toolbar locations in the registry. Such a simple thing shouldn't be in the registry in my opinion. Hence my search for a less invasive way of relaying the toolbar location information to another user.
The Tux module handles this (using QT)
https://github.com/triplus/PersistentTo ... InitGui.py
The toolbar locations are stored in user.cfg
They are also accessible in the Gui from Tools > Edit Parameters > PersistentToolbars
From user.cfg

Code: Select all

 <FCParamGroup Name="PersistentToolbars">
        <FCParamGroup Name="User">
          <FCParamGroup Name="StartWorkbench"/>
          <FCParamGroup Name="TestWorkbench"/>
          <FCParamGroup Name="NoneWorkbench"/>
          <FCParamGroup Name="ArchWorkbench">
            <FCBool Name="Saved" Value="1"/>
            <FCText Name="Top">Break,File,Workbench,Macro,View,Arch tools,Break,Structure,Draft tray,Draft creation tools,Draft annotation tools,Draft modification tools</FCText>
            <FCText Name="Left"/>
            <FCText Name="Right">Break,Draft Snap</FCText>
            <FCText Name="Bottom"/>
          </FCParamGroup>
Don't know why Style Sheets are interfering with this
"fight the good fight"
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: [LinkStage3][UI] Vertical UI for large screens (4K)

Post by Petrikas »

sgrogan wrote: Fri Feb 19, 2021 3:35 pm The Tux module handles this (using QT)
https://github.com/triplus/PersistentTo ... InitGui.py
The toolbar locations are stored in user.cfg
They are also accessible in the Gui from Tools > Edit Parameters > PersistentToolbars
From user.cfg

Don't know why Style Sheets are interfering with this
Ah, called it! Someone did have an issue with this :D

This is very interesting, as it technically allows to have different layouts (i.e. for different monitors) and allow switching between them.
Now, if only that info would be written into a separate .cfg, like "layouts.cfg". Ideally you wouldn't want to lose all your shortcuts because you want to copy someone's layout. (I agree that just copy/pasting sections from the user.cfg also works, but people (including myself) are clumsy).

Also, if persistent toolbars are writing info into user.cfg, I don't think LinkStage3 loads that info as it uses link.user.cfg

I'll investigate this further. Thanks!
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [LinkStage3][UI] Vertical UI for large screens (4K)

Post by Kunda1 »

Petrikas wrote: Fri Feb 19, 2021 4:00 pm Now, if only that info would be written into a separate .cfg, like "layouts.cfg". Ideally you wouldn't want to lose all your shortcuts because you want to copy someone's layout. (I agree that just copy/pasting sections from the user.cfg also works, but people (including myself) are clumsy).
This is quickly presenting to be a problem as more theme-ers come forth customizing the FC interface but can't change all preferences unless they manually force overwriting user.cfg. We're going to need a workaround for that.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [LinkStage3][UI] Vertical UI for large screens (4K)

Post by Kunda1 »

Note: I found the ModernUI reference post: https://forum.freecadweb.org/viewtopic. ... 90#p475117
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply