UN-GCPDS / qt-material

Material inspired stylesheet for PySide2, PySide6, PyQt5 and PyQt6
https://qt-material.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
2.22k stars 240 forks source link

Disabled menu item colors not handled correctly. #115

Open robochopbg opened 1 month ago

robochopbg commented 1 month ago

pyhton 3.10 / pyside6 - 6.7.1 Windows 10

Diasabled menu item colors are all wrong. The text looks fine and greyed out. The mouseover or item selected is wrong color, it should also be a lighter color including the rightarrow image.

menu1 menu2

robochopbg commented 1 month ago

Well for anyone else who also has this issue here is the fix. You will need to edit this file in the qt_materials folder - material.css.template

Under this section add this code last in this block / ------------------------------------------------------------------------ / / Menu Items /

/ Add this block to handle the hover over disabled item / QComboBox::item:disabled:selected, QCalendarWidget QMenu::item:disabled:selected, QMenu::item:disabled:selected { color: {{secondaryTextColor|opacity(0.3)}}; background-color: {{primaryColor|opacity(0.1)}}; }

and then under this section add the following code just under the code that says QMenu::right-arrow:selected

/ ------------------------------------------------------------------------ / / QMenu /

/* Add this block to handle the right arrow disabled state QMenu::right-arrow:disabled { image: url(icon:/disabled/rightarrow.svg); }

as you see now it's fixed

menu3 menu4