Dark and Light FreeCAD stylesheets (v1.8a)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Dark and Light FreeCAD stylesheets (v1.1)
@microelly2
That's great! thank for including them in your loader =)
@wmayer
I don't understand how you suggets it's possible to solve it... is it something the user should do, the stylesheet designer or FreeCAD coder?
I guess the best and more reliable approach would be to be something inside FreeCAD, but don't know if it's possible due to the Qt API you referred...
That's great! thank for including them in your loader =)
@wmayer
I don't understand how you suggets it's possible to solve it... is it something the user should do, the stylesheet designer or FreeCAD coder?
I guess the best and more reliable approach would be to be something inside FreeCAD, but don't know if it's possible due to the Qt API you referred...
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: Dark and Light FreeCAD stylesheets (v1.1)
By setting the cwd to the qss directory just shows that Qt loads image files relative to this cwd -- nothing more.I don't understand how you suggets it's possible to solve it... is it something the user should do, the stylesheet designer or FreeCAD coder?
I guess the best and more reliable approach would be to be something inside FreeCAD, but don't know if it's possible due to the Qt API you referred...
But setting the cwd to this directory is NOT a solution because at runtime this again can change to any other directory and then newly created widgets again will fail to load the image files.
A quick and dirty solution could be to use a certain string as prefix and then replace this string with the actual directory name.
Re: Dark and Light FreeCAD stylesheets (v1.1)
Using QDir::setSearchPaths is a proper solution for this issue. Inside FreeCAD this search path can be set to the qss directories and inside the .qss file you have to use the qss prefix.
Example:
Example:
Code: Select all
QMdiArea[showImage="true"] {
background-image: url(qss:images/background_freecad.png);
background-position: center;
background-repeat: no-repeat;
}
Re: Dark and Light FreeCAD stylesheets (v1.1)
git commit 72abf54
Now you have to replace all occurrences of "[PATH_TO_IMAGES]" with "qss:images" inside the .qss files.
Now you have to replace all occurrences of "[PATH_TO_IMAGES]" with "qss:images" inside the .qss files.
Re: Dark and Light FreeCAD stylesheets (v1.1)
Great solution!wmayer wrote:git commit 72abf54
Now you have to replace all occurrences of "[PATH_TO_IMAGES]" with "qss:images" inside the .qss files.
I'll try it out this weekend but I really like it. That way it will work on all OS and the user won't need to edit any file, just install the stylesheets (place the files in the correspondent folder).
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
-
- Posts: 255
- Joined: Mon May 19, 2014 1:14 pm
- Location: Vouzela - Portugal
Re: Dark and Light FreeCAD stylesheets (v1.1)
hello,
great job, congratulations.
I've been testing, but I have a problem, the snap buttons are narrow and wide, this is normal or is it some bug
thank you,
Renato
OS: Ubuntu 15.04
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5086 (Git)
Build type: None
Branch: master
Hash: 4f5534a87a7e2d224022ff98729a341bf57e7f9e
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
great job, congratulations.
I've been testing, but I have a problem, the snap buttons are narrow and wide, this is normal or is it some bug
thank you,
Renato
OS: Ubuntu 15.04
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5086 (Git)
Build type: None
Branch: master
Hash: 4f5534a87a7e2d224022ff98729a341bf57e7f9e
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
my native language is not English, please excuse me any incorrectness, I apologize for any inconvenience caused, thank you
Re: Dark and Light FreeCAD stylesheets (v1.1)
Hello,Renato Rebelo wrote:hello,
great job, congratulations.
I've been testing, but I have a problem, the snap buttons are narrow and wide, this is normal or is it some bug
thank you,
Renato
OS: Ubuntu 15.04
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5086 (Git)
Build type: None
Branch: master
Hash: 4f5534a87a7e2d224022ff98729a341bf57e7f9e
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Yes, it's a bug. I'll try to reproduce it and let you know, it seems easy to fix.
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: Dark and Light FreeCAD stylesheets (v1.1)
@ Renato
Have you changed "size of toolbar icons" in the Preferences/General? I see they are not perfectly sized so I can improve them but I don't get the exact size a proportions you get in the screenshot you provided me...
Any other custom configuration you have in Ubuntu?
Have you changed "size of toolbar icons" in the Preferences/General? I see they are not perfectly sized so I can improve them but I don't get the exact size a proportions you get in the screenshot you provided me...
Any other custom configuration you have in Ubuntu?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
-
- Posts: 255
- Joined: Mon May 19, 2014 1:14 pm
- Location: Vouzela - Portugal
Re: Dark and Light FreeCAD stylesheets (v1.1)
These are my settings
thank you,
Renato
thank you,
Renato
my native language is not English, please excuse me any incorrectness, I apologize for any inconvenience caused, thank you
Re: Dark and Light FreeCAD stylesheets (v1.1)
Excellent work pablogil, congrats!