mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 17:55:06 +00:00
FileManager+LibGUI: Draw the item text for desktop icons with shadow
This makes it look nice regardless of wallpaper or background color.
This commit is contained in:
parent
0fef901513
commit
2759d518b7
3 changed files with 10 additions and 1 deletions
|
@ -693,7 +693,12 @@ void AbstractView::draw_item_text(Gfx::Painter& painter, const ModelIndex& index
|
|||
},
|
||||
text_rect, item_text, font, alignment, elision);
|
||||
} else {
|
||||
painter.draw_text(text_rect, item_text, font, alignment, text_color, elision);
|
||||
if (m_draw_item_text_with_shadow) {
|
||||
painter.draw_text(text_rect.translated(1, 1), item_text, font, alignment, Color::Black, elision);
|
||||
painter.draw_text(text_rect, item_text, font, alignment, Color::White, elision);
|
||||
} else {
|
||||
painter.draw_text(text_rect, item_text, font, alignment, text_color, elision);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue