mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-04 10:18:51 +00:00
LibGUI+WindowServer: Tweak hover shadows slightly
Move the shadow 1 more pixel away from the unhovered icon location, making a total 2 pixel distance between the icon and the shadow. Also tweak the shadow color to be a darkened variant of the base color underneath the icon.
This commit is contained in:
parent
fe6a312714
commit
04f1f74b85
Notes:
sideshowbarker
2024-07-19 00:33:26 +09:00
Author: https://github.com/awesomekling
Commit: 04f1f74b85
2 changed files with 4 additions and 5 deletions
|
@ -65,8 +65,8 @@ void Button::paint_event(PaintEvent& event)
|
|||
if (is_being_pressed() || is_checked())
|
||||
painter.translate(1, 1);
|
||||
else if (m_icon && is_enabled() && is_hovered() && button_style() == Gfx::ButtonStyle::CoolBar) {
|
||||
auto shadow_color = palette().threed_shadow1();
|
||||
painter.blit_filtered(icon_location, *m_icon, m_icon->rect(), [&shadow_color](auto) {
|
||||
auto shadow_color = palette().button().darkened(0.7f);
|
||||
painter.blit_filtered(icon_location.translated(1, 1), *m_icon, m_icon->rect(), [&shadow_color](auto) {
|
||||
return shadow_color;
|
||||
});
|
||||
icon_location.move_by(-1, -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue