all repos — tint2 @ 54d361cf4291e9b498e78051b08668e80790357c

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Button: mouse effects
o9000 mrovi9000@gmail.com
commit

54d361cf4291e9b498e78051b08668e80790357c

parent

153de1aa454059a787a8124765e3a47a8096b63c

1 files changed, 13 insertions(+), 1 deletions(-)

jump to
M src/button/button.csrc/button/button.c

@@ -438,8 +438,20 @@ {

Button *button = obj; if (button->frontend->icon) { - imlib_context_set_image(button->frontend->icon); // Render icon + Imlib_Image image; + if (panel_config.mouse_effects) { + if (button->area.mouse_state == MOUSE_OVER) + image = button->frontend->icon_hover ? button->frontend->icon_hover : button->frontend->icon; + else if (button->area.mouse_state == MOUSE_DOWN) + image = button->frontend->icon_pressed ? button->frontend->icon_pressed : button->frontend->icon; + else + image = button->frontend->icon; + } else { + image = button->frontend->icon; + } + + imlib_context_set_image(image); render_image(button->area.pix, button->frontend->iconx, button->frontend->icony); }