# Visual bugs with Dark theme in Molecule / Layers lists

**URL:** <https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756>\
**Category:** Design & Interface\
**Created:** [February 10, 2025, 10:29pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756 "2025-02-10T22:29:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [February 10, 2025, 10:29pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/1 "2025-02-10T22:29:16Z")

</div>

I’m unsure if this is a Mac bug, or more systematic…

A student uses Dark theme on a Mac. While most of the text is correctly white-text on black background, the molecule / filename list is not…

 ![Molecule List](https://discuss.avogadro.cc/uploads/default/original/2X/0/009921d3a6e20c527e49945d1fe6736d67889119.png)

And also, the icons in the Layer panel are dark-on-dark:

 ![Screenshot 2025-02-10 at 5.21.56 PM](https://discuss.avogadro.cc/uploads/default/original/2X/0/0adb3273739a5acb6fc124a56aebdacf4f330ef2.png)

So I guess the first question is whether the black-on-black text in the molecule lit happens on other systems?

Secondly, it would be great to have alternatives for light / dark versions (in SVG?) of the layer icons, e.g.

> <https://github.com/OpenChemistry/avogadrolibs/blob/8dca2dafb3643790566e42053f7a7ee33d278a91/avogadro/qtgui/icons/fallback/32x32/lock.png>

I know there are some good open source icon sets - I tried some image search and couldn’t find the original versions.

- lock
- lock open
- “…” dots
- eye icon
- black X to close a layer
- (maybe also the red X for “close” in the molecule list?)

---

<div class="post-metadata">

**Author:** ![matterhorn103](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/matterhorn103/32/1751_2.png) [@matterhorn103](https://discuss.avogadro.cc/u/matterhorn103)\
**Post date:** [February 10, 2025, 11:09pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/2 "2025-02-10T23:09:25Z")

</div>

Yes, the same occurs on Linux:

 ![image](https://discuss.avogadro.cc/uploads/default/original/2X/6/6dc1ea8749260f0c529a53300a7475ac96554703.png)  
 ![image](https://discuss.avogadro.cc/uploads/default/original/2X/d/db33607b5a1252505c371aaf15417e0a40ec2463.png)

The icons in the menus and the “file” toolbar are sourced from the OS theme and – on Linux with KDE at least – change to match my icon theme, giving it a native look and feel. For example, on my system:

 ![image](https://discuss.avogadro.cc/uploads/default/original/2X/e/e40b3f4d7c2519ebd0ed895482dfd02b41308e6f.png)  
 ![image](https://discuss.avogadro.cc/uploads/default/original/2X/9/92515fd4acb9256b99e44a3a26533ed7bad3d67f.png)

Looking at `avogadroapp/avogadro/mainwindow.cpp` it looks like this is achieved by using `QIcon::fromTheme("document-save-as")` etc.

Can we do the same for the icons in those panes?

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [February 10, 2025, 11:33pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/3 "2025-02-10T23:33:37Z")

</div>

> [@matterhorn103](#):
>
> Can we do the same for the icons in those panes?

Maybe, but I’d guess on Mac and Windows, we still need the “fallback” icons. Looks like someone posted the list for Linux:

> <https://gist.github.com/peteristhegreat/c0ca6e1a57e5d4b9cd0bb1d7b3be1d6a>

So we probably can re-use Close, but I think we need something for other icons, e.g.

> **[Eye Classic Solid Icon | Font Awesome](https://fontawesome.com/icons/eye?f=classic&s=solid)**
>
> Eye icon in the Solid style. Make a bold statement in small sizes. Available now in Font Awesome 6.

Or [Feather Icons](https://feathericons.com/?query=eye)

---

<div class="post-metadata">

**Author:** ![matterhorn103](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/matterhorn103/32/1751_2.png) [@matterhorn103](https://discuss.avogadro.cc/u/matterhorn103)\
**Post date:** [February 10, 2025, 11:57pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/4 "2025-02-10T23:57:52Z")

</div>

`list-add` (a plus) and `list-remove` (a cross) should be definitely fine then since they’re in the Qt list.

The KDE default Breeze icon theme also has, for example, things like:

- `view-visible`, aliased to `visibility` (an eye)
- `view-more` or `overflow-menu` (three dots)
- `lock`

As you mentioned there’s font-awesome and feather; some other icon sets that come to my mind or I have bookmarked in the past:

- [https://pictogrammers.com/](https://pictogrammers.com/) is where Material Design Icons live nowadays
- [https://phosphoricons.com/](https://phosphoricons.com/) are very nice
- Breeze (from KDE Plasma) could be a good open-source source of icons if you wanted
- Likewise the [GNOME icons](https://gitlab.gnome.org/Teams/Design/icon-development-kit) of course
- There are also some very nice third-party icon themes for KDE, I particularly like using [this guy’s](https://github.com/vinceliuice) themes

If you wanted to use a set like that, I think it’d be best to then use the same theme for all the icons in the interface, as it looks quite jarring if there’s a mixture of visual styles (and we already have at least two sets since we have our own tool icons).

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [February 11, 2025, 4:29pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/5 "2025-02-11T16:29:59Z")

</div>

Okay, I’m starting a pull request:

> <https://github.com/OpenChemistry/avogadrolibs/pull/1967>
>
> Developer Certificate of Origin
> Version 1.1
> 
> Copyright (C) 2004, 2006 The Lin…ux Foundation and its contributors.
> 1 Letterman Drive
> Suite D4700
> San Francisco, CA, 94129
> 
> Everyone is permitted to copy and distribute verbatim copies of this
> license document, but changing it is not allowed.
> 
> 
> Developer's Certificate of Origin 1.1
> 
> By making a contribution to this project, I certify that:
> 
> (a) The contribution was created in whole or in part by me and I
> have the right to submit it under the open source license
> indicated in the file; or
> 
> (b) The contribution is based upon previous work that, to the best
> of my knowledge, is covered under an appropriate open source
> license and I have the right under that license to submit that
> work with modifications, whether created in whole or in part
> by me, under the same open source license (unless I am
> permitted to submit under a different license), as indicated
> in the file; or
> 
> (c) The contribution was provided directly to me by some other
> person who certified (a), (b) or (c) and I have not modified
> it.
> 
> (d) I understand and agree that this project and the contribution
> are public and that a record of the contribution (including all
> personal information I submit with it, including my sign-off) is
> maintained indefinitely and may be redistributed consistent with
> this project or the open source license(s) involved.

My feeling is that as much as possible, we should use the system theme icons. Getting everything from one source is going to be tricky unless we hire someone to do the whole set.

BTW, it seems like your Layer panel has weird column widths. The first column should be the widest.

---

<div class="post-metadata">

**Author:** ![matterhorn103](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/matterhorn103/32/1751_2.png) [@matterhorn103](https://discuss.avogadro.cc/u/matterhorn103)\
**Post date:** [February 11, 2025, 10:57pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/6 "2025-02-11T22:57:07Z")

</div>

> [@ghutchis](#):
>
> Getting everything from one source is going to be tricky unless we hire someone to do the whole set.

Yes, sure, but my point is that it would still be better to use two sources than three.

The tool icons are cohesive and self-contained in one place, so while it’s not ideal that they are different to everything else, I’m not as worried about them not fitting in with a uniform design.

All the other non-tool icons used in the interface really ought to have the same visual style, though. Consistency is very important in good UI/UX design.

I’d love it if Avogadro used my system icon theme for the icons, but that should only happen if _all_ icons can be sourced from the system theme, otherwise it’s jarring.

---

<div class="post-metadata">

**Author:** ![matterhorn103](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/matterhorn103/32/1751_2.png) [@matterhorn103](https://discuss.avogadro.cc/u/matterhorn103)\
**Post date:** [February 11, 2025, 10:58pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/7 "2025-02-11T22:58:12Z")

</div>

> [@ghutchis](#):
>
> BTW, it seems like your Layer panel has weird column widths. The first column should be the widest.

Yes, I know. That’s just how it looks by default, though, I haven’t changed anything.

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [February 11, 2025, 11:23pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/8 "2025-02-11T23:23:08Z")

</div>

With that pull request, it should now use system icons for everything.

---

<div class="post-metadata">

**Author:** ![matterhorn103](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/matterhorn103/32/1751_2.png) [@matterhorn103](https://discuss.avogadro.cc/u/matterhorn103)\
**Post date:** [February 11, 2025, 11:40pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/9 "2025-02-11T23:40:33Z")

</div>

But your previous point was that not all those icons are universally available from the system theme?

> [@ghutchis](#):
>
> Maybe, but I’d guess on Mac and Windows, we still need the “fallback” icons. Looks like someone posted the list for Linux:

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [February 12, 2025, 12:31am UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/10 "2025-02-12T00:31:14Z")

</div>

> [@matterhorn103](#):
>
> But your previous point was that not all those icons are universally available from the system theme?

It looks pretty complete based on your comments. The pull request will try to pull from the system theme (e.g., `visibility` or `lock`) and go to a fallback otherwise.

Take a look if you like. I think it should be set. Certainly it fixes up the text colors.

---

<div class="post-metadata">

**Author:** ![brockdyer03](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/brockdyer03/32/2015_2.png) [@brockdyer03](https://discuss.avogadro.cc/u/brockdyer03)\
**Post date:** [February 14, 2025, 3:32pm UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/11 "2025-02-14T15:32:35Z")

</div>

It might be worth mentioning that currently Av2 doesn’t have dark mode on Windows right now. I believe @matterhorn103 indicated that the Qt6 upgrade will fix that, but for now it’s light mode all the way.

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [February 15, 2025, 3:49am UTC](https://discuss.avogadro.cc/t/visual-bugs-with-dark-theme-in-molecule-layers-lists/6756/12 "2025-02-15T03:49:13Z")

</div>

> [@brockdyer03](#):
>
> It might be worth mentioning that currently Av2 doesn’t have dark mode on Windows right now

Okay, I’ll see what I can do to get Windows packages with Qt6. Somehow 1.100 release build left out Open Babel, so it can’t be worse…
