I personally use it on both, if you have a look at
my other branch you'll see that I've set it up so that it auto hides the tree in combo view when the tree view panel is active. I don't understand enough of the code to unify it all in a single GlassGui.py
Code: Select all
if FreeCAD.ParamGet("User parameter:BaseApp/Glass").GetBool("glassAuto",1):
setMode() # activate Glass mode
if dock.isVisible():
mw.findChild(QtGui.QWidget,'Combo View').findChild(QtGui.QWidget, 'propertyTab').parent().parent().setSizes([0,1]) # look for the property editor parent (is a QSplitter) and apply sizes to hide treeview
Code: Select all
def setVisibility():
"""Toggle visibility."""
dock.toggleViewAction().trigger()
if dock.isVisible():
mw.findChild(QtGui.QWidget,'Combo View').findChild(QtGui.QWidget, 'propertyTab').parent().parent().setSizes([0,1]) # look for the property editor parent (is a QSplitter) and apply sizes to hide treeview
else:
mw.findChild(QtGui.QWidget,'Combo View').findChild(QtGui.QWidget, 'propertyTab').parent().parent().setSizes([mdi.geometry().height()/2,mdi.geometry().height()/2]) # look for the property editor parent (is a QSplitter) and apply sizes to show treeview
I have no idea if this is the best way to do that, I made the code based on how
SplitPropEditor Macro resizes it.
If Tree View is made default in Glass I would suggest it adopts this behavior (IMO FreeCAD itself should have this behavior for both Tree and Property panels but that's beyond me).
Now something I have no idea how to implement but would find very useful is to auto deactivate Glass mode when a spreadsheet is open as it doesn't work very well with it. Ideally, it would turn back on when leaving the spreadsheet.
Another thing is that when no stylesheet is set for FreeCAD the tabs in combo view are black, at least in Manjaro KDE, I use a stylesheet on windows so I don't know right now if it has the same behavior.
- with stylesheet
- Screenshot_20200330_102157.png (29.45 KiB) Viewed 4564 times
- without stylesheet
- Screenshot_20200330_102233.png (29.72 KiB) Viewed 4564 times
I don't know if this is solvable but it would be nice if it was.