Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

A subforum for research and development of the user interface of FreeCAD

Moderator: agryson

triplus
Posts: 4982
Joined: Mon Dec 12, 2011 4:45 pm

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby triplus » Sat Apr 09, 2016 10:59 pm

derei wrote:Thank you, I was able to enable themes.


You're welcome.

I noticed that icons in dark themes are set more apart from each others (in toolbars), than is on default theme. I tried to look into the theme file, I saw only a 2px padding in the Toolbar section, but setting that to zero did only a partial fix.


Try to lower the padding and margin value.
User avatar
derei
Posts: 21
Joined: Thu Dec 17, 2015 7:10 pm
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby derei » Sun Apr 10, 2016 10:56 am

I reduced everything to the maximum. Reducing more I would have cut from the handle... there must be still something affecting the toolbar span.

See attached (there are still more 3 icons hidden)
2016-04-10_115324.jpg
2016-04-10_115324.jpg (32.06 KiB) Viewed 493 times
pablogil
Posts: 517
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby pablogil » Sun Apr 10, 2016 11:43 am

derei wrote:Thank you, I was able to enable themes.

I noticed that icons in dark themes are set more apart from each others (in toolbars), than is on default theme. I tried to look into the theme file, I saw only a 2px padding in the Toolbar section, but setting that to zero did only a partial fix.

How can I set the toolbar to have the same "density" as in default theme? (see attached for details).


I decided to add this padding and margin in order to try to homogenize styles across OSs (for instance, OSX have bigger separation between toolbar buttons than on Windows).

You can easily reset or change it finding this lines:

Code: Select all

QToolBar > QToolButton {
    margin: 2px;
    padding: 2px;
    border-radius: 3px;
}

And just commenting margin and padding (that way it will take your OS original ones):

Code: Select all

QToolBar > QToolButton {
    /*margin: 2px;*/
    /*padding: 2px;*/
    border-radius: 3px;
}


PS - there is a big top margin... is that due to a line with other toolbar buttons that don't appear on the screenshot or is a style "bug"?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
pablogil
Posts: 517
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby pablogil » Sun Apr 10, 2016 11:45 am

derei wrote:I reduced everything to the maximum. Reducing more I would have cut from the handle... there must be still something affecting the toolbar span.

See attached (there are still more 3 icons hidden)
2016-04-10_115324.jpg

Could you share more information about your OS and take a full screen resolution in order to try to guess where the glitch is?

Thanks
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
User avatar
derei
Posts: 21
Joined: Thu Dec 17, 2015 7:10 pm
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby derei » Sun Apr 10, 2016 12:20 pm

Thank you for the clear instructions. I will apply them in my template.

There is no glitch, is just the top menu bar that has the same color like the background. I like it this way, is more uniform.
My system is Win7x64 and I use FreeCAD 0.16 rev.6698
Full screenshot attached - you can see the top menu bar goint all the way
2016-04-10_131932.jpg
2016-04-10_131932.jpg (107.33 KiB) Viewed 486 times
pablogil
Posts: 517
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby pablogil » Sun Apr 10, 2016 3:48 pm

derei wrote:Thank you for the clear instructions. I will apply them in my template.

There is no glitch, is just the top menu bar that has the same color like the background. I like it this way, is more uniform.
My system is Win7x64 and I use FreeCAD 0.16 rev.6698
Full screenshot attached - you can see the top menu bar goint all the way
2016-04-10_131932.jpg


Hehehe, OK, now I understand =)
Then I guess everything is all right
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
User avatar
derei
Posts: 21
Joined: Thu Dec 17, 2015 7:10 pm
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby derei » Mon Apr 18, 2016 8:31 pm

What about this tiny white line?

2016-04-10_131932.jpg
2016-04-10_131932.jpg (127.07 KiB) Viewed 449 times
triplus
Posts: 4982
Joined: Mon Dec 12, 2011 4:45 pm

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby triplus » Mon Apr 18, 2016 9:07 pm

Another small feature you might add in the future:

Code: Select all

QToolButton:checked {}


For checked toolbuttons (toolbar).

P.S. You can observe such toolbutton in Fasteners WB (on toolbar) or you can wait a few days and observe it in TabBar.
pablogil
Posts: 517
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby pablogil » Tue Apr 19, 2016 10:58 am

Thanks @derei, thanks @triplus, I'll have a look at them ;)
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
pablogil
Posts: 517
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Postby pablogil » Tue Apr 19, 2016 11:03 am

sgrogan wrote:Hello pablogil,
I saw issue 2476
Indeed there was a flaw that did not pickup the new Gui sub-directory in the data directory on Windows. It should be fixed now. https://github.com/FreeCAD/FreeCAD/releases
I'm not signed up to Mantis, so if this is fixed for you the issue can be closed.
Please keep an eye on this when the Win RC builds are made for Win. I'm using a modified script provided by Peterl94 and he will probably be making the release. I'll try to get my modified script in git and make a pull request against his https://github.com/peterl94/FCAutoBuild
Thanks for the work :)


I have just checked that Windows x64 installer puts all stylesheet images inside /Stylesheets/ folder instead of /Stylesheets/images/ which make the style not to show the images... I'm reporting it as a but into the tracker, just posting it here in case you read it before.
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here