[Feature Request] Allow resizing font and icons for the tree view

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
ToniTen
Posts: 240
Joined: Fri Sep 04, 2020 10:11 am

[Feature Request] Allow resizing font and icons for the tree view

Post by ToniTen »

Now that 0.20 is out, and that Assembly3 works nicely with upstream FreeCAD, I'm trying to move back to core from LinkStage3. I'm finding some QoL features that RealThunder has developed that certainly merit a discussion on porting them to core FreeCAD. This is one of them:
LinkBranchOptions.png
LinkBranchOptions.png (62.22 KiB) Viewed 2039 times
As you can see, from Preferences, on LinkBranch3, you can change icon size, font size and spacing for tree items. This is very helpful when working on large resolution screens (1440p/2096p), and works nicely without needing to enlarge other parts of the UI. Is this something that other people find useful?
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: [Feature Request] Allow resizing font and icons for the tree view

Post by mario52 »

Hi

you can obtain this with setStyleSheet()

Code: Select all

# changing font in report view and possibly other views also
# https://forum.freecadweb.org/viewtopic.php?p=344428#p344428

import PySide2
from PySide2 import QtWidgets, QtGui, QtCore

for wid in Gui.getMainWindow().findChild(QtWidgets.QDockWidget, "Combo View").findChildren(QtWidgets.QWidget):
    wid.setStyleSheet("icon-size: 30px; font-size: 22pt;")

resizeTextIcon00.png
resizeTextIcon00.png (57.96 KiB) Viewed 1883 times

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
paddle
Veteran
Posts: 1391
Joined: Mon Feb 03, 2020 4:47 pm

Re: [Feature Request] Allow resizing font and icons for the tree view

Post by paddle »

I agree, on some screens it can be too small.
Maybe we should ask @realthunder to make a PR on this feature to master? I don't see why it couldn't be merged.

I never used link branch, but I'd be curious to know what other qol features he has made that hasn't merged. I actually only know of the TNP.
User avatar
obelisk79
Veteran
Posts: 1061
Joined: Thu Sep 24, 2020 9:01 pm

Re: [Feature Request] Allow resizing font and icons for the tree view

Post by obelisk79 »

paddle wrote: Sat Aug 20, 2022 1:08 pm I never used link branch, but I'd be curious to know what other qol features he has made that hasn't merged. I actually only know of the TNP.
There are a lot. Many of the UI items are option based and would make a great addition to the main branch in my opinion. I've recently moved from linkstage to core, but there are several ui customizations I miss.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature Request] Allow resizing font and icons for the tree view

Post by Kunda1 »

Realthunder is neck deep in Topological naming code merge atm. Lets give him space so he is less distracted.
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
ToniTen
Posts: 240
Joined: Fri Sep 04, 2020 10:11 am

Re: [Feature Request] Allow resizing font and icons for the tree view

Post by ToniTen »

Indeed, I was mainly trying to elicit discussion on this feature, not necessarily asking for the improvement Realthunder did to imported into FreeCAD, as there might be better ways to do the same (I have no knowledge of the internals of FreeCAD). Until then, I guess changing the font size via Python will be my best option
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature Request] Allow resizing font and icons for the tree view

Post by Kunda1 »

I get it. I guess I'm feeling quite hyper-vigilant about Realthunder's attention bandwidth because TPN merge is super important. I know you didn't request RT's input directly. I think it's a valid Feature Request, thank you for bringing it 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
paddle
Veteran
Posts: 1391
Joined: Mon Feb 03, 2020 4:47 pm

Re: [Feature Request] Allow resizing font and icons for the tree view

Post by paddle »

Kunda1 wrote: Mon Sep 05, 2022 10:32 am I get it. I guess I'm feeling quite hyper-vigilant about Realthunder's attention bandwidth because TPN merge is super important. I know you didn't request RT's input directly. I think it's a valid Feature Request, thank you for bringing it up.
I said what I said because I thought TNP merging bottleneck was code reviewing/modifications by FC founders. I didn't thought Realthunder was all-in too.

TNP is indeed important. How well is that advancing btw?
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature Request] Allow resizing font and icons for the tree view

Post by Kunda1 »

paddle wrote: Tue Sep 06, 2022 11:28 am TNP is indeed important. How well is that advancing btw?
2nd patch was accepted and merged in toponaming branch (see issue #7435). Feel free to help test it and report issues.
But lets stay on-topic of this thread.
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
ToniTen
Posts: 240
Joined: Fri Sep 04, 2020 10:11 am

Re: [Feature Request] Allow resizing font and icons for the tree view

Post by ToniTen »

I have been using this python command for a while (I obviously changed the values to what I need), but I still feel that changing the default font size should be possible from the UI. I assume RealThunder is still in the process of merging his TNP solution?
Post Reply