Glass

A forum for research and development of the user interface of FreeCAD

Moderator: agryson

triplus
Posts: 9464
Joined: Mon Dec 12, 2011 4:45 pm

Re: Glass

Post by triplus » Thu Sep 05, 2019 1:37 pm

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?

OficineRobotica
Posts: 182
Joined: Thu Feb 21, 2019 8:17 am

Re: Glass

Post by OficineRobotica » Thu Sep 05, 2019 6:25 pm

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 1106 times

triplus
Posts: 9464
Joined: Mon Dec 12, 2011 4:45 pm

Re: Glass

Post by triplus » Fri Sep 06, 2019 12:29 pm

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
Posts: 7456
Joined: Thu Jan 05, 2017 9:03 pm

Re: Glass

Post by Kunda1 » Sun Sep 15, 2019 7:15 pm

Request to make the stylesheets more compatible with Glass
https://forum.freecadweb.org/viewtopic.php?f=34&t=39364
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features

adrianinsaval
Posts: 343
Joined: Thu Apr 05, 2018 5:15 pm

Re: Glass

Post by adrianinsaval » Mon Mar 30, 2020 2:43 am

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
Posts: 9464
Joined: Mon Dec 12, 2011 4:45 pm

Re: Glass

Post by triplus » Mon Mar 30, 2020 11:19 am

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.

adrianinsaval
Posts: 343
Joined: Thu Apr 05, 2018 5:15 pm

Re: Glass

Post by adrianinsaval » Mon Mar 30, 2020 2:36 pm

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.
Screenshot_20200330_102157.png
with stylesheet
Screenshot_20200330_102157.png (29.45 KiB) Viewed 381 times
Screenshot_20200330_102233.png
without stylesheet
Screenshot_20200330_102233.png (29.72 KiB) Viewed 381 times
I don't know if this is solvable but it would be nice if it was.

carlopav
Posts: 1354
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Glass

Post by carlopav » Mon Mar 30, 2020 3:28 pm

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
Posts: 9464
Joined: Mon Dec 12, 2011 4:45 pm

Re: Glass

Post by triplus » Sun Apr 19, 2020 7:04 pm

@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?

adrianinsaval
Posts: 343
Joined: Thu Apr 05, 2018 5:15 pm

Re: Glass

Post by adrianinsaval » Mon Apr 20, 2020 12:14 am

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