[SOLVED] QPalette::Link for Constraint Formulas in Property Editor (NOTE: restart required)

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

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor

Post by Kunda1 »

MisterMaker wrote: Sat Oct 01, 2022 7:48 pm It seems that it needs a Freecad restart to make this stick.
Ooof that's frustrating. Nice catch! Can you provide a screenshot of the result?
We need to add this to the preference pack documentation.
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
MisterMaker
Posts: 746
Joined: Mon Sep 21, 2020 7:41 am
Contact:

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor

Post by MisterMaker »

Kunda1 wrote: Sun Oct 02, 2022 1:13 pm
MisterMaker wrote: Sat Oct 01, 2022 7:48 pm It seems that it needs a Freecad restart to make this stick.
Ooof that's frustrating. Nice catch! Can you provide a screenshot of the result?
We need to add this to the preference pack documentation.
Image
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor

Post by Kunda1 »

Thanks @MisterMaker! What's your ETA on pushing the changes to https://github.com/MisterMakerNL/Extrem ... mmits/main

Can you do me a favor and when you do, please add a comment above the .qss code linking to this thread and explaining that a restart is needed for this to take place. That way I can send other stylesheet devs directly to your code. Let me know?

Edit: I notated the source and pinged wmayer https://github.com/FreeCAD/FreeCAD/comm ... #r85614248
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
MisterMaker
Posts: 746
Joined: Mon Sep 21, 2020 7:41 am
Contact:

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor (NOTE: restart required)

Post by MisterMaker »

While we are at it, I got this from Axeia on discord:
see https://forum.freecadweb.org/viewtopic.php?f=34&t=72294

Code: Select all

QTableView::item{
    color: gray;
}
This sets the text color in spreadsheets to white.
Super simple but it is missing in every dark theme that needs it.
@kunda1 ETA1 is couple hours ago, with a lot of other fixes.
Last edited by MisterMaker on Mon Oct 03, 2022 8:21 am, edited 1 time in total.
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor

Post by pablogil »

MisterMaker wrote: Sat Oct 01, 2022 7:48 pm
MisterMaker wrote: Tue Sep 20, 2022 1:18 pm Hey, I needed this.
But this does not work properly not in 0.20.1 and in 0.21.
When I change stylesheet it set the color correctly, but as soon as I exit the settings it pops back too blue.
See: https://files.gitter.im/587a69a0d73408c ... 4IfIdI.gif
Wanted to make a issue about this but after starting Freecad up and checking it, it worked.
It seems that it needs a Freecad restart to make this stick.
Btw not a single other Dark theme has this:

Code: Select all

QLabel[haslink="true"] {
  color: orange;
}
Nice catch!!
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor (NOTE: restart required)

Post by wmayer »

Currently only ProDark.qss uses the haslink property of a QLabel:
QLabel[haslink="true"] {
color: #55aaff;
}
Because this is still blue color it can be hardly distinguished from the default link color.

So, I change it to

Code: Select all

QLabel[haslink="true"] {
  color: orange;
}
and rebuild FreeCAD.

Now I create a standard box in the Part wb and set an expression to a property. Because no style sheet is set the item is shown in blue color. After activating the ProDark style sheet and quitting the preferences the item is shown in orange. I don't have to restart FreeCAD therefore!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor (NOTE: restart required)

Post by Kunda1 »

wmayer wrote: Mon Oct 03, 2022 1:22 pm and rebuild FreeCAD.
Hi @wmayer, do you mind clarifying what you mean by 'rebuild' here? Thanks!
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
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor (NOTE: restart required)

Post by wmayer »

Kunda1 wrote: Mon Oct 03, 2022 3:05 pm
wmayer wrote: Mon Oct 03, 2022 1:22 pm and rebuild FreeCAD.
Hi @wmayer, do you mind clarifying what you mean by 'rebuild' here? Thanks!
It means to copy the file from the source to the build directory.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor (NOTE: restart required)

Post by Kunda1 »

wmayer wrote: Mon Oct 03, 2022 5:07 pm It means to copy the file from the source to the build directory.
Pardon my ignorance here, are you saying that the dev needs to run make to rebuild FreeCAD ?
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: 5553
Joined: Thu Apr 05, 2018 5:15 pm

Re: [SOLVED] QPalette::Link for Constraint Formulas in Property Editor (NOTE: restart required)

Post by adrianinsaval »

werner was probably editing the stylesheet in FreeCAD's source code repo so he does need to rebuild or manually copy the edited stylesheet to get it in his build. For external stylesheets rebuilding FreeCAD is not required at all.
Post Reply