Icons of Select File window disappear with Dark themes

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

Moderator: agryson

User avatar
bitacovir
Posts: 1417
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Icons of Select File window disappear with Dark themes

Postby bitacovir » Sun Apr 04, 2021 1:00 pm

I just notice that the icons in the "select a file" window don't display under Dark Themes.
freecad_TsC0509Sqv.png
freecad_TsC0509Sqv.png (39.26 KiB) Viewed 348 times
freecad_0oJ4pxq1Fh.png
freecad_0oJ4pxq1Fh.png (36.87 KiB) Viewed 348 times
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 (Git)
Build type: Release
Branch: master
Hash: b2ca86d8d72b636011a73394bf9bcdedb3b109b7
Python version: 3.8.8
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project
User avatar
turn211
Posts: 136
Joined: Mon Feb 01, 2021 11:37 pm

Re: Icons of Select File window disappear with Dark themes

Postby turn211 » Tue Apr 06, 2021 3:04 pm

bitacovir wrote:
Sun Apr 04, 2021 1:00 pm
I just notice that the icons in the "select a file" window don't display under Dark Themes.
I'll check it out. How do I get to "select a file"?
User avatar
chennes
Posts: 831
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Icons of Select File window disappear with Dark themes

Postby chennes » Tue Apr 06, 2021 6:12 pm

They show for me (I am testing by using Tools->Save picture so I make sure I'm not getting the native dialog):

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.24642 +1 (Git)
Build type: Debug
Branch: openscadTrueProjection
Hash: 1b935db4664799e2d240c90078ddb2a1142aea13
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Chris Hennes
Pioneer Library System
User avatar
chennes
Posts: 831
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Icons of Select File window disappear with Dark themes

Postby chennes » Tue Apr 06, 2021 6:15 pm

bitacovir wrote:
Sun Apr 04, 2021 1:00 pm
I just notice that the icons in the "select a file" window don't display under Dark Themes.
It looks to me like they are in fact displaying, now that I look closer -- they are just very tiny. Or is that my imagination?
Chris Hennes
Pioneer Library System
User avatar
turn211
Posts: 136
Joined: Mon Feb 01, 2021 11:37 pm

Re: Icons of Select File window disappear with Dark themes

Postby turn211 » Tue Apr 06, 2021 8:04 pm

chennes wrote:
Tue Apr 06, 2021 6:15 pm
bitacovir wrote:
Sun Apr 04, 2021 1:00 pm
I just notice that the icons in the "select a file" window don't display under Dark Themes.
It looks to me like they are in fact displaying, now that I look closer -- they are just very tiny. Or is that my imagination?
Icons show as avertised (i would say 16px) on my Box testing with Tools->Save picture I looked in the stylesheets and there are no max-height limits. Anyone else?

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.24673 (Git)
Build type: Release
Branch: master
Hash: e66ed26769ce8affe0a4ed330ff0435f4802f05e
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/Canada (en_CA)
User avatar
chennes
Posts: 831
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Icons of Select File window disappear with Dark themes

Postby chennes » Tue Apr 06, 2021 8:09 pm

They appear to be in boxes with the theme applied -- is there a way to make it so they remain just the icons, as they are in the default? I don't know that in this window it makes sense to display the icons inside a button rectangle.
Chris Hennes
Pioneer Library System
User avatar
turn211
Posts: 136
Joined: Mon Feb 01, 2021 11:37 pm

Re: Icons of Select File window disappear with Dark themes

Postby turn211 » Tue Apr 06, 2021 8:19 pm

chennes wrote:
Tue Apr 06, 2021 8:09 pm
They appear to be in boxes with the theme applied -- is there a way to make it so they remain just the icons, as they are in the default? I don't know that in this window it makes sense to display the icons inside a button rectangle.
I looked. They are hardcoded as QToolButtons inside the Gui--FileOptionsDialog.
User avatar
chennes
Posts: 831
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Icons of Select File window disappear with Dark themes

Postby chennes » Tue Apr 06, 2021 8:33 pm

turn211 wrote:
Tue Apr 06, 2021 8:19 pm
I looked. They are hardcoded as QToolButtons inside the Gui--FileOptionsDialog.
So for them to appear different from other QToolButtons when a theme is applied, they need to be subclassed?
Chris Hennes
Pioneer Library System
User avatar
turn211
Posts: 136
Joined: Mon Feb 01, 2021 11:37 pm

Re: Icons of Select File window disappear with Dark themes

Postby turn211 » Tue Apr 06, 2021 8:43 pm

chennes wrote:
Tue Apr 06, 2021 8:33 pm
turn211 wrote:
Tue Apr 06, 2021 8:19 pm
I looked. They are hardcoded as QToolButtons inside the Gui--FileOptionsDialog.
So for them to appear different from other QToolButtons when a theme is applied, they need to be subclassed?
They could be called by their Object name and do the following to display the raw icon if it helps. All works fine on my box so hard to Debug.

Code: Select all

	Gui--FileOptionsDialog#QFileDialog QToolButton {
    	padding: 0px;
    	border: 0px;
   	margin: 0px;
}
User avatar
bitacovir
Posts: 1417
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Icons of Select File window disappear with Dark themes

Postby bitacovir » Wed Apr 07, 2021 11:27 am

chennes wrote:
Tue Apr 06, 2021 6:12 pm
They show for me (I am testing by using Tools->Save picture so I make sure I'm not getting the native dialog):
Sorry, I forgot to mention the actual command.
In DraftWB - Draft ShapeString command - In the panel, option "..." of Font file.
You are right that icons in other windows work fine. In my case too. But in this window icons are shown very tiny in dark themes.
::bitacovir::
===================================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

My personal web site
My GitHub repository
My old Blog
Mini Airflow Tunnel Project