Glass

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Glass

Post by triplus »

realthunder wrote: Wed Sep 04, 2019 2:01 pm I think it is wmayer disabled it? Not sure though.
What i imagine happened is Werner disabled them by default, as discussed in that linked thread. Maintenance burden, for more tree/properties view panels, i guess represents an issue.

P.S. You likely would be able to add a parameter/checkbox, and when being enabled, for Tree view, Tasks panel and Property view to be placed in a set of separate dock widgets?
User avatar
OficineRobotica
Posts: 433
Joined: Thu Feb 21, 2019 8:17 am
Contact:

Re: Glass

Post by OficineRobotica »

Thank you guys , it worked. Are there any other hidden gems inside the parameter editor? lol. I'm using it for:
-refreshing the menu when using global menu
-setting up the stylesheet path when using the app image
-now for re enabling the tree and property view

Please do not ever remove the property editor from freecad :lol:
treeView.png
treeView.png (441.07 KiB) Viewed 5288 times
Check out my Youtube channel at: https://www.youtube.com/@OficineRobotica
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Glass

Post by triplus »

Good to hear that.

P.S. If there are no oppressing issues detected, likely the mentioned two panels should get enabled again, by default.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Glass

Post by Kunda1 »

Request to make the stylesheets more compatible with Glass
https://forum.freecadweb.org/viewtopic.php?f=34&t=39364
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
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Glass

Post by adrianinsaval »

triplus wrote:
Hi! I've made a PR to automatically activate Glass on startup, with a parameter to turn this off if desired (BaseApp/Glass/glassAuto). Please review.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Glass

Post by triplus »

adrianinsaval wrote: Mon Mar 30, 2020 2:43 am Hi! I've made a PR to automatically activate Glass on startup, with a parameter to turn this off if desired (BaseApp/Glass/glassAuto). Please review.
Thanks for making the PR, will review it tomorrow. Indeed i myself was thinking to tweak this behavior a bit.

P.S. And in this past couple of months, looking on how people use Glass module, is it OK to assume, most of you just want to use Tree view, instead of Combo view and to change the color of the text from Black to White? If yes i can try to make that the default behavior, although Tree view is disabled by default. I will likely make a few small changes in April, therefore what i am basically asking is what sort of small changes would benefit the people using Glass the most, feedback provided based on the actual usage.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Glass

Post by adrianinsaval »

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
with stylesheet
Screenshot_20200330_102157.png (29.45 KiB) Viewed 4563 times
without stylesheet
without stylesheet
Screenshot_20200330_102233.png (29.72 KiB) Viewed 4563 times
I don't know if this is solvable but it would be nice if it was.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Glass

Post by carlopav »

sorry for adding noise to the topic, but the configuration shown would be ideal to me too! (and to many others i guess)
follow my experiments on BIM modelling for architecture design
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Glass

Post by triplus »

@adrianinsaval

Sorry for the delay, have been occupied with other things in the past three weeks. Have just merged yours PR.

P.S. ATM i am adding some configuration functionality, for things like being able to position arbitrary dock. Should there be a button in preferences, to apply a stylesheet and background colors as customized by @OficineRobotica?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Glass

Post by adrianinsaval »

triplus wrote: Sun Apr 19, 2020 7:04 pm Sorry for the delay, have been occupied with other things in the past three weeks. Have just merged yours PR.
No problem! I'm glad to contribute at least small things :)
P.S. ATM i am adding some configuration functionality, for things like being able to position arbitrary dock. Should there be a button in preferences, to apply a stylesheet and background colors as customized by @OficineRobotica?
Nice! I don't see why not to the background functionality but I think it should use the color of the user defined stylesheet not a specif one.
Btw: have you seen realthunders's overlay mode? It's inspired by this module: https://forum.freecadweb.org/viewtopic.php?f=34&t=45349

EDIT: I added a way to toggle glass mode on or off with a button in super users macro for anyone interested.
Post Reply