Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabled menu item colors not handled correctly. #115

Open
robochopbg opened this issue Jun 9, 2024 · 1 comment
Open

Disabled menu item colors not handled correctly. #115

robochopbg opened this issue Jun 9, 2024 · 1 comment

Comments

@robochopbg
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant