UI Improvements / Vertical UI Proposition

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
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: UI Improvements / Vertical UI Proposition

Post by Petrikas »

Some more improvements on @turn211 stylesheet. I've added a comment containing "VertUI" and changes done to the stylesheet, if you are curious.

Here's good ol' vanilla FreeCAD 0.20 @ 1080p:
freecad020.jpg
freecad020.jpg (385.73 KiB) Viewed 5851 times
FreeCAD Linkstage3 @ 1080p:
freecadlink.jpg
freecadlink.jpg (375.42 KiB) Viewed 5851 times
If you want to give the stylesheet and toolbars a go, copy over the stylesheet, and copy the expand_arrow.svg to the folder:

FreeCAD\data\Gui\Stylesheets\images_dark-light

Move your toolbars to the right first, then run this macro to lock them in place (to align the icons in a grid):

Code: Select all

from PySide2 import QtCore, QtGui, QtWidgets
import FreeCAD as App
import FreeCADGui as Gui

mw = Gui.getMainWindow()

for k in App.ParamGet("User parameter:BaseApp/Workbenches").GetString("Enabled").split(','):
    if k != "":
        Gui.activateWorkbench(k)
        tbs = mw.findChildren(QtWidgets.QToolBar)
        for t in tbs:
            if t.isMovable():
                t.setMovable(False) 
You can try the stylesheet without moving the toolbars to the right, just make sure to get rid of the WB dropdown and lock the toolbars in place with the script.

The macro takes a second, as it traverses through the WBs, but you only have to run it once every FreeCAD launch.

Feeling rather confident that we can get the UI to a state where people don't dismiss FreeCAD just based on its UI. Hoping these tweaks don't get dismissed.

[12/06/2020: updated with parameget, to traverse through active workbenches only]
Attachments
ProDark VertUI.zip
Fixed a weird glitch in the Taskpanel for Link users
(11.53 KiB) Downloaded 109 times
expand_arrow.svg
(2.22 KiB) Downloaded 111 times
Last edited by Petrikas on Sun Jun 13, 2021 8:19 pm, edited 4 times in total.
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: UI Improvements / Vertical UI Proposition

Post by Petrikas »

Fixed a couple of small issues with turn211's stylesheet, for both FreeCAD and FreeCAD Link, added a few lines to the stylesheet:

Code: Select all

QSint--ActionGroup QFrame > QWidget > QLabel {
	background-color: transparent;
}

QSint--ActionGroup QFrame > QWidget > QGroupBox > QLabel {
	background-color: transparent;
}
FreeCAD Before:
FreeCAD_before.jpg
FreeCAD_before.jpg (73.04 KiB) Viewed 5698 times
FreeCAD After:
FreeCAD_after.jpg
FreeCAD_after.jpg (57.37 KiB) Viewed 5698 times
Link Before:
Link_before.jpg
Link_before.jpg (117.78 KiB) Viewed 5698 times
Link After:
Link_after.jpg
Link_after.jpg (113.77 KiB) Viewed 5698 times
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: UI Improvements / Vertical UI Proposition

Post by Petrikas »

I'm also having a lot of issues with the Draft Tray. It's a "Godmode" toolbar that cannot be disabled (At least in Vanilla FreeCAD), and even if FreeCAD Link allows it to be disabled, it spawns again whenever the Draft Workbench is activated.

It's also the only toolbar that has text, and cannot be vertical-ized. It's really unwieldy as it does not conform to anything.
Can I report this as a bug?
Attachments
sc 2021-06-04 13_48_35.jpg
sc 2021-06-04 13_48_35.jpg (11.38 KiB) Viewed 5692 times
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: UI Improvements / Vertical UI Proposition

Post by Kunda1 »

I've seen something similar to this in the appimage but draft workbench wasn't loaded. Anyway, let's let @yorik know first since this is his 'baby' IIRC
yorik wrote: Ping
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: UI Improvements / Vertical UI Proposition

Post by Kunda1 »

Petrikas wrote: Fri Jun 04, 2021 10:36 am Fixed a couple of small issues with turn211's stylesheet, for both FreeCAD and FreeCAD Link, added a few lines to the stylesheet:
turn211 wrote: heads up
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
turn211
Posts: 162
Joined: Mon Feb 01, 2021 11:37 pm

Re: UI Improvements / Vertical UI Proposition

Post by turn211 »

Kunda1 wrote: Fri Jun 04, 2021 7:08 pm
Petrikas wrote: Fri Jun 04, 2021 10:36 am Fixed a couple of small issues with turn211's stylesheet, for both FreeCAD and FreeCAD Link, added a few lines to the stylesheet:
turn211 wrote: heads up
Cool! As I'm more into Architecture I totally miss some of the 3d elements. Looks good. The XYZ's look lonely. Maybe Text align right wood help.
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: UI Improvements / Vertical UI Proposition

Post by Petrikas »

I've released a video on how to set this UI up in FreeCAD Linkstage3 and added written instructions.
Forum post up in General discussion, as this is not related to the original FreeCAD.
https://forum.freecadweb.org/viewtopic.php?f=8&t=55779
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
User avatar
Malsasa
Posts: 6
Joined: Mon Jul 19, 2021 2:44 am
Location: Indonesia
Contact:

Re: UI Improvements / Vertical UI Proposition

Post by Malsasa »

Excellent, I like this UI modification.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: UI Improvements / Vertical UI Proposition

Post by carlopav »

Petrikas wrote: Wed May 19, 2021 1:34 pm Tooltips
Problem: For some reason, tooltips, by default only include the description of the tool, but not the name. And the same description is also reflected in the status bad (disabled in my screenshots, as I don't find there's any useful information for the amount of space it takes on the screen)

Solution: Include the tool's name in the tooltip in bold. Tool description can be placed below.
Currently achieved with this hacky macro:

Code: Select all

from PySide2 import QtCore, QtGui, QtWidgets
 
mw = Gui.getMainWindow()
 
class NewToolTips(QtCore.QObject):
    # Find Toolbars
    for tb in mw.findChildren(QtWidgets.QToolBar):
        # Find Toolbar Buttons
        for x in tb.findChildren(QtWidgets.QToolButton):
            # Tool Name
            TTTitle = f"<b><p style=\"font-size:20px\">{x.text()}</p></b>"
            # Tool description
            TTTooltip = f"<p style=\"font-size:16px\">{x.toolTip()}</p>"
            # Build the Tooltip
            ntt = (f"{TTTitle}{TTTooltip}")
            # Set the Tooltip
            x.setToolTip(ntt)
 
    # Run indefinitely        
    def run():
        for x in mw.findChildren(QtWidgets.QToolBar):
            NewToolTips(x)
 
NewToolTips.run()
Hello!
I was experimenting in including some of your improvements in the main branch :)
Here is for example the tooltip improvement: https://github.com/FreeCAD/FreeCAD/comp ... s?expand=1
C++ it's not my language, but it kinda works :)

Did you also experience some duplicated command names for some actions?
tooltip.gif
tooltip.gif (108.36 KiB) Viewed 4046 times
follow my experiments on BIM modelling for architecture design
User avatar
Petrikas
Posts: 122
Joined: Sat Dec 05, 2020 8:05 pm

Re: UI Improvements / Vertical UI Proposition

Post by Petrikas »

carlopav wrote: Sat Jul 31, 2021 11:41 am
Petrikas wrote: Wed May 19, 2021 1:34 pm Tooltips
Problem: For some reason, tooltips, by default only include the description of the tool, but not the name. And the same description is also reflected in the status bad (disabled in my screenshots, as I don't find there's any useful information for the amount of space it takes on the screen)

Solution: Include the tool's name in the tooltip in bold. Tool description can be placed below.
Currently achieved with this hacky macro:

Code: Select all

from PySide2 import QtCore, QtGui, QtWidgets
 
mw = Gui.getMainWindow()
 
class NewToolTips(QtCore.QObject):
    # Find Toolbars
    for tb in mw.findChildren(QtWidgets.QToolBar):
        # Find Toolbar Buttons
        for x in tb.findChildren(QtWidgets.QToolButton):
            # Tool Name
            TTTitle = f"<b><p style=\"font-size:20px\">{x.text()}</p></b>"
            # Tool description
            TTTooltip = f"<p style=\"font-size:16px\">{x.toolTip()}</p>"
            # Build the Tooltip
            ntt = (f"{TTTitle}{TTTooltip}")
            # Set the Tooltip
            x.setToolTip(ntt)
 
    # Run indefinitely        
    def run():
        for x in mw.findChildren(QtWidgets.QToolBar):
            NewToolTips(x)
 
NewToolTips.run()
Hello!
I was experimenting in including some of your improvements in the main branch :)
Here is for example the tooltip improvement: https://github.com/FreeCAD/FreeCAD/comp ... s?expand=1
C++ it's not my language, but it kinda works :)

Did you also experience some duplicated command names for some actions?
tooltip.gif
Hi!
There's a whole bunch of things that don't work with the tooltips I made... :
- Tooltips get refreshed (reset) every time a tool is used, tools that were disabled (gray) get a double name (like in your gif)
- Some tooltips already have a name in the tooltip, resulting in multiple names
- Tooltips that have formatting (break lines, etc.) get put in a single line
- Some tooltips have hard-coded hotkeys that don't change when you change the hotkey in the parameters.

Great job on implementing this! Not having toolnames is much worse than having double names :D
I sometimes make FreeCAD Tutorials | VertUI | MidnightUI
Post Reply