I've been working on FreeCAD Linkstage3 Vertical UI for 4K screens for quite a while now (https://forum.freecadweb.org/viewtopic.php?f=8&t=55779) , I've been on a quest to make FreeCAD's interface less hostile and maximise the viewport's real-estate.
I have pushed it to a state where it may no longer limited to FreeCAD Linkstage3, nor 4K screens.
I personally use a laptop at 1920x1200 and a 4K external screen, therefore I really needed both resolutions to work on-the-fly.
4K screens can use 48px icon size, while 1080p screens can use 24px.
This is the current result (4K screens):
And 1080p screen: Improvements include - Improved tooltips, Aligned icons, new 'dropdown' indicator, locking/unlocking toolbars.
These improvements are all possible today, but right now it's a bit 'hacked together'.
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()
Problem: Currently, if you set your toolbars to the side, you will have a mess of a pile of Icons that are vertically and horizontally misaligned. This is generally bad UI design, and it feels awful. However, we must work within the QT limitations.
Solutions: First of all, we need an ability to lock/unlock toolbars (in order to hide the handles for moving toolbars, as they offset the toolbar). This, to my knowledge, is not currently user accessible.
Janky macro for turning on/off toolbar Locking:
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)
Separation is achieved with more contrasting icons (similarly to 'additive' and 'subtractive' tools)
Code: Select all
QToolBar::separator:vertical { height:0px; }
Code: Select all
QToolBar > QToolButton::menu-arrow {
background-image: url(qss:images_dark-light/expand_arrow.svg);
background-position: center center;
background-repeat: none;
subcontrol-origin: padding;
subcontrol-position: bottom left;
height: 10px;
}
Problem: While I personally use pie-menus for workbench selection, I switched because I found it very tedious to sift through the workbench dropdown and selecting the correct workbench. The dropdown selector prevents you from building muscle-memory and selecting workbench quickly. It also takes 2 clicks to switch the workbench. When using a vertical UI, the dropdown menu takes a full line across the screen, which is not practical
Solution: This one is pretty simple. Installing the Tab Bar addon from the addon manager. Solves all the the issues listed above and ties in nicely with the document tabs at the bottom.
So far that's all I got. There are a lot of things that I would still like to improve, but that's going to be me working on the stylesheet. I'd really love to see some of my suggestions implemented, as I do not have the coding knowledge needed to implement these changes into FreeCAD's code. All I can do now is make a janky add-on.
Hope you guys find this useful, let me know your thoughts.