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.8a)
Sounds good.
Re: Dark and Light FreeCAD stylesheets (v1.8a)
From what your pic post showed, id guess that was it. But i cant verify, since i will be out / gone for 30 days.
Re: Dark and Light FreeCAD stylesheets (v1.8a)
Hi I tried this new feature on FC 0.16 windows latest and it is finepablogil wrote:Updated to version 1.8a
Then I tried to open some GUI Macro e.g.
http://www.freecadweb.org/wiki/index.ph ... oneConvert
or my kicad StepUp tools macro
and all text/buttons are with a bad/bigger font dimension
I use custom font size 120%, but in my macro I set font size, which seems not to be respected by the stylesheet
Is there anything I should add to the macro to give more compatibility to Stylesheets?
Maurice
OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6458 (Git)
Build type: Release
Branch: master
Hash: f4b288fcf87b0fbca7a7b38abddf6fcdff95ad24
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Re: Dark and Light FreeCAD stylesheets (v1.8a)
Could you share a picture with me?easyw-fc wrote:Hi I tried this new feature on FC 0.16 windows latest and it is finepablogil wrote:Updated to version 1.8a
Then I tried to open some GUI Macro e.g.
http://www.freecadweb.org/wiki/index.ph ... oneConvert
or my kicad StepUp tools macro
and all text/buttons are with a bad/bigger font dimension
I use custom font size 120%, but in my macro I set font size, which seems not to be respected by the stylesheet
Is there anything I should add to the macro to give more compatibility to Stylesheets?
Maurice
OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6458 (Git)
Build type: Release
Branch: master
Hash: f4b288fcf87b0fbca7a7b38abddf6fcdff95ad24
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Could you also share a link to download your macro and try it out?
Thanks
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: Dark and Light FreeCAD stylesheets (v1.8a)
you can find my macro atpablogil wrote: Could you share a picture with me?
Could you also share a link to download your macro and try it out?
https://sourceforge.net/projects/kicads ... t/download
the file is inside the demo prj
kicad-StepUp-tools.FCMacro
Re: Dark and Light FreeCAD stylesheets (v1.8a)
I have just had a look to the macro in FreeCAD and the code: I think the problem is that your GUI is "fixed", I mean, you have placed the buttons at a exact point in the window while the normal way to layout a window is using other QT elements that serve as containers in order to finally let your buttons and stuff to dinamicaly flow depending on the window size.
This is part of your code:
I know how to design a stylesheet using QT elements because it's quite similar than CSS (used for styling webs) but still don't know how C++ works and handle GUIs... anyway, I think it might be done using .ui files but I don't know how to do it. Check other macros which have a GUI window and get an idea from them...
This is part of your code:
Code: Select all
# RotateX button
RotateX = QtGui.QPushButton('Rotate X', self)
RotateX.clicked.connect(self.onRotateX)
RotateX.setMinimumWidth(100)
#RotateX.setAutoDefault(False)
RotateX.move(130, 20)
# RotateY button
RotateY = QtGui.QPushButton('Rotate Y', self)
RotateY.clicked.connect(self.onRotateY)
RotateY.setMinimumWidth(100)
#RotateY.setAutoDefault(False)
RotateY.move(130, 60)
# RotateZ button
RotateZ = QtGui.QPushButton('Rotate Z', self)
RotateZ.clicked.connect(self.onRotateZ)
RotateZ.setMinimumWidth(100)
#RotateZ.setAutoDefault(False)
RotateZ.move(130, 100)
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: Dark and Light FreeCAD stylesheets (v1.8a)
Hummm I don't think so...pablogil wrote:I have just had a look to the macro in FreeCAD and the code: I think the problem is that your GUI is "fixed", I mean, you have placed the buttons at a exact point in the window while the normal way to layout a window is using other QT elements that serve as containers in order to finally let your buttons and stuff to dinamicaly flow depending on the window size.
I have the same prob with the Macro clone convert
http://www.freecadweb.org/wiki/index.ph ... oneConvert
Re: Dark and Light FreeCAD stylesheets (v1.8a)
No he is right, you explicitly place your widgets with move which is a very bad idea. Once somebody changes the font size or changes the desktop style this fails as shown here. You need to use layouts which automatically adopt the positions of your Widgets dependend in the needed and available sizes. To get a feeling for this you can play with qdesigner.
Re: Dark and Light FreeCAD stylesheets (v1.8a)
wrong, I set the font size inside the Macroickby wrote:Once somebody changes the font size or changes the desktop style this fails as shown here.
you can test that changing your interface fonts
I have this issues only on stylesheets
M
Re: Dark and Light FreeCAD stylesheets (v1.8a)
Ok than not with font sizes, i overlooked that, but Buttons and Widgets sizes are also defined by Styles which define Border sizes and spaces. And those Change between every Operating System and even between one Operating System where the User can choose styles, like kubuntu. This is Why basically every qt GUI Code uses layouts. And every gui included in freecad does so too, all dialogs, the Task Bar boxes etc. If you want Cross Platform and cross style compatibility you need to use then too.