mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 19:45:08 +00:00
WindowServer: Don't highlight disabled menu items when hovered
This commit is contained in:
parent
ed0553fe10
commit
d3c21163a5
1 changed files with 3 additions and 6 deletions
|
@ -137,15 +137,12 @@ void WSMenu::draw()
|
|||
for (auto& item : m_items) {
|
||||
if (item.type() == WSMenuItem::Text) {
|
||||
Color text_color = Color::Black;
|
||||
if (&item == m_hovered_item) {
|
||||
if (&item == m_hovered_item && item.is_enabled()) {
|
||||
painter.fill_rect(item.rect(), Color::from_rgb(0xad714f));
|
||||
painter.draw_rect(item.rect(), Color::from_rgb(0x793016));
|
||||
text_color = Color::White;
|
||||
if (!item.is_enabled())
|
||||
text_color = Color::from_rgb(0xb5a195);
|
||||
} else {
|
||||
if (!item.is_enabled())
|
||||
text_color = Color::MidGray;
|
||||
} else if (!item.is_enabled()) {
|
||||
text_color = Color::MidGray;
|
||||
}
|
||||
Rect text_rect = item.rect().translated(stripe_rect.width() + 6, 0);
|
||||
if (item.is_checkable()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue