Turning Zolko's theme in to a Preference Pack

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Turning Zolko's theme in to a Preference Pack

Post by wmayer »

Zolko wrote: Mon Sep 12, 2022 3:28 pm and if I use a separate Tree View and Property View, then I'll only have 1 tree instance, no ? So no performance hit, is that correct ?
Yes, that's correct. However, when changing this in the GUI you have to restart FreeCAD first because this change doesn't affect a running instance but only takes effect after a new start.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Turning Zolko's theme in to a Preference Pack

Post by Zolko »

wmayer wrote: Mon Sep 12, 2022 3:27 pm
For the sheer discoverability of FreeCAD (mostly for newcomers) I think that a separate TreeView and PropertyView is more appropriate. Experienced users who need all possible extra performance can later fine-tune their UI. A separate TreeView on the left is also what most (or all ?) other CAD software provide, it's a sort-of industry standard.
The topic has already been discussed a few times and ideally it should be possible that we don't have the fix layout of the current combo view but allow it the user to split the tab widget(s) to make the tree, property and task view independent dock widgets.
I just checked : if you have separate tree View and Property view panels, you can still stack them together in a single panel containing the Tree view, the Property view and the Task panel.

I don't know what has been discussed previously, but it seems to me that 1) having 2 tree-views is indeed useless and 2) having a separate tree-view allows all possible options. Therefore, I propose to remove that choice in the preferences and only leave a separate Tree View. If the user wants to stack it together with the property view to re-create the combo view, he can. Choosing "Combo View" restricts the possible options, while the separate Tree View allows all possible choices.

Could we reconsider that discussion and the decision ?


combo.png
combo.png (217.54 KiB) Viewed 1259 times



tv.png
tv.png (31.19 KiB) Viewed 1259 times
try the Assembly4 workbench for FreCAD — tutorials here and here
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Turning Zolko's theme in to a Preference Pack

Post by wmayer »

Therefore, I propose to remove that choice in the preferences and only leave a separate Tree View. If the user wants to stack it together with the property view to re-create the combo view, he can. Choosing "Combo View" restricts the possible options, while the separate Tree View allows all possible choices.
As far as I can see it's currently not possible to re-arrange the Task tab of the Combo View, the Property and Tree View in the same layout as the Combo View. What's possible is to re-arrange them as in your screen shot where all three appear as a separate tab. The disadvantage is that when selecting an object in the tree you always have to activate the Property View tab if you want to change a property.

The alternative is to put the Tree and Combo View to a common tab widget and put the Property View underneath. Now the disadvantage is that the height of the Task tab of the Combo View is limited and e.g. when editing a sketch you can only see two of the embedded task boxes.

So, a solution for this could be that we reduce the currently three modes to two modes:
  1. Make Tree, Property and Task View independent dock widgets
  2. Put Tree and Property View to a common dock widget and move the Task View to a separate dock widget
The second option allows it to arrange all views like in the current Combo View but you don't need a second Tree View.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Turning Zolko's theme in to a Preference Pack

Post by Kunda1 »

@realthunder have you encountered this in your branch? Could you weigh in?
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
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Turning Zolko's theme in to a Preference Pack

Post by Zolko »

wmayer wrote: Tue Sep 13, 2022 12:44 pm So, a solution for this could be that we reduce the currently three modes to two modes:
  1. Make Tree, Property and Task View independent dock widgets
  2. Put Tree and Property View to a common dock widget and move the Task View to a separate dock widget
OK for me. But I'd suggest to make option #1 the default, because I think that a separate tree-view on the left is what most other CAD programs provide.
try the Assembly4 workbench for FreCAD — tutorials here and here
user1234
Veteran
Posts: 3337
Joined: Mon Jul 11, 2016 5:08 pm

Re: Turning Zolko's theme in to a Preference Pack

Post by user1234 »

Zolko wrote: Tue Sep 13, 2022 1:10 pm I'd suggest to make option #1 the default, because I think that a separate tree-view on the left is what most other CAD programs provide.
+1 , i second that.

Greetings
user1234
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Turning Zolko's theme in to a Preference Pack

Post by wmayer »

Zolko wrote: Tue Sep 13, 2022 1:10 pm OK for me. But I'd suggest to make option #1 the default, because I think that a separate tree-view on the left is what most other CAD programs provide.
Would be OK for me.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Turning Zolko's theme in to a Preference Pack

Post by Zolko »

wmayer wrote: Tue Sep 13, 2022 1:49 pm
Zolko wrote: Tue Sep 13, 2022 1:10 pm OK for me.
Would be OK for me.
nice. I tried to find in the source code where this is set, but failed. I suspect 2 files where this could be coded, but changing the default booleans didn't bring any change:

~/src/Gui/MainWindow.cpp
~/src/Gui/Workbench.cpp

Code: Select all

DockWindowItems* StdWorkbench::setupDockWindows() const
{
    DockWindowItems* root = new DockWindowItems();
    root->addDockWidget("Std_ToolBox", Qt::RightDockWidgetArea, false, false);
    //root->addDockWidget("Std_HelpView", Qt::RightDockWidgetArea, true, false);
    root->addDockWidget("Std_TreeView", Qt::LeftDockWidgetArea, true, false);
...

Code: Select all

MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)
...
    bool treeView = false, propertyView = false;
    if (hiddenDockWindows.find("Std_TreeView") == std::string::npos) {
        //work through parameter.
...

This seems to be code you've written, could you point to where the default combo-view behavior is decided ?
try the Assembly4 workbench for FreCAD — tutorials here and here
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Turning Zolko's theme in to a Preference Pack

Post by wmayer »

This seems to be code you've written, could you point to where the default combo-view behavior is decided ?
It's not only me but a few others like RT.

It happens in MainWindow.cpp at line 390ff. There it accesses the parameter group "ComboView" and checks if the parameter "Enabled" is true or false. If the parameter doesn't exist true is used as default (line 394).

But note, the combo view is always created independent whether "Enabled" is true or false because this widget still delivers the Task panel.

This part of the code must be re-written to make things to work the way we have discussed today. I will have a look at this topic in the next couple of days. If you want you can also open a ticket and assign it to me.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Turning Zolko's theme in to a Preference Pack

Post by Zolko »

wmayer wrote: Tue Sep 13, 2022 12:44 pm As far as I can see it's currently not possible to re-arrange the Task tab of the Combo View, the Property and Tree View in the same layout as the Combo View
What layout would you be missing ? It seems to me that the "Combo View" puts the TreeView above the PropertyView a,d the TaskPanel behind (and I can't un-dock it, therefore the TaskPanel always hides the TreeView):

combo.png
combo.png (188.2 KiB) Viewed 1099 times

But if separated, you can place the TreeView above the PropertyView and put the TaskPanel on the other side:

TV+PV.png
TV+PV.png (211.92 KiB) Viewed 1099 times

Isn't this a better solution ?
try the Assembly4 workbench for FreCAD — tutorials here and here
Post Reply