right-click for properties

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

right-click for properties

Post by Zolko »

Hello,

I very much like the tab-bar for workbench switching, it leaves much more space for the icons in the toolbar. On the other hand, I'm not a big fan of the Combo View, because it does 2 things, and none of them very well:
  • it shows the model tree, which the tree view does also, but in full height, not 1/2 height
  • it shows the properties of the selected object, but again at the width of the tree

When I look a the tree, I'd like it to be at maximum height so I don't have to scroll so much through the model tree, but I don't need it to be very wide. The Properties on the other hand needs to be wide, but it's not always used. One can enable the Properties window, but then it's always shown, even if not used and empty. I spend my time scrolling up and down, left and right, pushing the separators...

So I have a simple request: would it be possible to have a right-click behaviour as in many software, where right-clicking on an object would present "Properties" in the menu, and that would bring up the Properties window, that would disappear when done ("OK" "Apply" "Cancel"). And the properties window would remember the size and position used the previous time it was used, to accommodate the user's habits and screen layout. All widgets being equal, there is nothing wrong with them.

Thus, one could have only the combo view, pushing the separator all the way down to give it full height, and the properties window would only show when asked. When not used, there would be more place for the tree and the main window, and when called the properties window would be larger showing more infos. This right-click is a standard behaviour now on many software.

UI2.png
UI2.png (386.06 KiB) Viewed 7916 times
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: right-click for properties

Post by Zolko »

From my investigation, "Property View" is a type DockWindow, and doesn't have a corresponding Std_Command. There is a similar functionality, "Appearance", which does have a Std_SetAppearance in ~/src/Gui/CommandView.cpp

Code: Select all

DEF_STD_CMD_A(StdCmdSetAppearance)

StdCmdSetAppearance::StdCmdSetAppearance()
  : Command("Std_SetAppearance")
{
...

The code is actually in ~src/Gui/DlgDisplayPropertiesImp, and is of type QWidget (QDialog ?). I believe it's a QWidget wrapped into a QDialog.

PropertyView itself is splitted in 2 parts: there is a PropertyView of type QWidget, which does all the work, and a a PropertyDockView of type Gui::DockWindow which only wraps it into a dock window. I tried to add another wrapper, of type QDialog, but failed.

Code: Select all

class PropertyDlgView : public QDialog
{
    Q_OBJECT

public:
    PropertyDlgView(Gui::Document*  pcDocument, QWidget *parent=0);
    virtual ~PropertyDlgView();
};

Code: Select all

error: invalid use of incomplete type ‘class QDialog’
 class PropertyDlgView : public QDialog
                                ^~~~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:44:0,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qframe.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qsplitter.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QSplitter:1,
                 from /home/hubertz/Documents/3Dcad/FreeCAD/FreeCAD-LinkStage3_git/FreeCAD/src/Gui/CombiView.cpp:26:
/usr/include/x86_64-linux-gnu/qt5/QtGui/qwindowdefs.h:55:7: note: forward declaration of ‘class QDialog’
...

If someone can give it a try and create a PropertyDlgView ... once there is a a QDialog object, it should be possible to add the command to ~/src/Gui/CommandView.cpp, like the command SetAppearance:

Code: Select all

        dlg = new Gui::Dialog::DlgDisplayPropertiesImp(getMainWindow());

Code: Select all

        dlg = new Gui::Dialog::PropertyDlgView(getMainWindow());
try the Assembly4 workbench for FreCAD — tutorials here and here
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: right-click for properties

Post by triplus »

Zolko wrote: Tue Jan 29, 2019 2:28 pm I very much like the tab-bar for workbench switching, it leaves much more space for the icons in the toolbar.
Good to hear that.

As for the rest there is Tasks section in Combo View too. Not just Tree View and Property View. Tasks section can include all sorts of widgets and options. Tree View usually has some items nested and items having longer names. In Assembly 3 i have seen another column was added to the Tree View. Further increasing the need to reserve some width for such dock widget as Combo View. Therefore in current paradigm, Combo View, i am afraid that narrow just wouldn't do.

P.S. You can create a macro to toggle (show/hide) Property View panel over the Combo View panel if you like. And for it to have different geometry, compared to the Combo View.
Opus
Posts: 91
Joined: Wed Nov 08, 2017 5:36 pm

Re: right-click for properties

Post by Opus »

Zolko wrote: Tue Jan 29, 2019 2:28 pm When I look a the tree, I'd like it to be at maximum height so I don't have to scroll so much through the model tree, but I don't need it to be very wide. The Properties on the other hand needs to be wide, but it's not always used. One can enable the Properties window, but then it's always shown, even if not used and empty. I spend my time scrolling up and down, left and right, pushing the separators...
This was one of the objectives of the Ickby's alternative interface:
phpBB [video]


https://forum.freecadweb.org/viewtopic.php?f=34&t=23053
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: right-click for properties

Post by Zolko »

triplus wrote: Mon Feb 04, 2019 9:03 pm As for the rest there is Tasks section in Combo View too. Not just Tree View and Property View.
well, there are 2 tabs in the property view: one for "View" and one for "Data". Except that there is also an "Appearance" entry in the right-click menu, where it's possible to edit the "View" properties (colours, transparency...). I'm asking for this same functionality for the "Data" tab, even simpler, because the "Appearance" dialog is a custom UI widget, different from the "Vew" tab (even though it changes the same parameters), and for the "Data" properties a simple window with the exact same layout would be sufficient.

The "Appearance" dialog is defined in ~/src/Gui/DlgDisplayPropertiesImp.cpp|h|ui, the Property view widget in ~/src/Gui/PropertyView.cpp|h.

P.S. You can create a macro to toggle (show/hide) Property View panel over the Combo View panel if you like. And for it to have different geometry, compared to the Combo View.
that would be close to what I want. How would you do such a macro ?
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: right-click for properties

Post by MisterMaker »

4 years later, we still need this :)
Image
Last edited by MisterMaker on Mon Oct 16, 2023 2:35 pm, edited 1 time in total.
User avatar
obelisk79
Veteran
Posts: 1061
Joined: Thu Sep 24, 2020 9:01 pm

Re: right-click for properties

Post by obelisk79 »

If something like this is added, which I believe would be a good move, that right click menu has to be either better organized or condensed somehow; because it's too big which makes it less effective for regular use.
jwatkins672003
Posts: 65
Joined: Thu Nov 05, 2015 11:46 pm

Re: right-click for properties

Post by jwatkins672003 »

Personally, I use two monitors and put the panels on the second, lower quality, monitor. You can use SmartTVs today too via HDMI and they are readily available for free via all the regular apps like Craigslist.

Regardless, I do like Ikby's alternative interfacce, but used in conjunction with ModernUI, not as shown with the standard Win3.0 toolbars layout. I can't stand the method of pulling down a WB menu to scroll through 10 WBs to get the desired WB. LOL.
User avatar
MisterMaker
Posts: 739
Joined: Mon Sep 21, 2020 7:41 am

Re: right-click for properties

Post by MisterMaker »

But do you need the properties always on?
If you do so, why?
User avatar
bambuko
Veteran
Posts: 2161
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: right-click for properties

Post by bambuko »

Regardless of right for properties being added (I am not against it, it would be good move), I would not want to loose properties panel.
I have properties panel (and others) permanently on on one of the screens/monitors I use for the purpose.
Wouldn't want to be right clicking (abusing) the poor mouse every time I need it.... ;)
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
Post Reply