feat: add animated focus transitions for window titles and taskbar colors
This commit is contained in:
+6
-4
@@ -46,6 +46,8 @@ void decorations_render(Client *client, bool focused)
|
||||
|
||||
void decorations_render_title_bar(Client *client, bool focused)
|
||||
{
|
||||
(void)focused;
|
||||
|
||||
if (client == NULL || client->frame == None) {
|
||||
return;
|
||||
}
|
||||
@@ -59,8 +61,8 @@ void decorations_render_title_bar(Client *client, bool focused)
|
||||
int title_height = config_get_title_height();
|
||||
int border = client->border_width;
|
||||
|
||||
unsigned long bg_color = focused ? colors->title_focused_bg : colors->title_unfocused_bg;
|
||||
unsigned long fg_color = focused ? colors->title_focused_fg : colors->title_unfocused_fg;
|
||||
unsigned long bg_color = client_get_animated_title_color(client);
|
||||
unsigned long fg_color = adjust_color_for_background(colors->title_focused_fg, bg_color);
|
||||
|
||||
XSetForeground(dpy, dwn->gc, bg_color);
|
||||
XFillRectangle(dpy, client->frame, dwn->gc,
|
||||
@@ -147,7 +149,7 @@ void decorations_render_buttons(Client *client, bool focused)
|
||||
}
|
||||
|
||||
Display *dpy = dwn->display;
|
||||
const ColorScheme *colors = config_get_colors();
|
||||
(void)focused;
|
||||
int title_height = config_get_title_height();
|
||||
int border = client->border_width;
|
||||
|
||||
@@ -160,7 +162,7 @@ void decorations_render_buttons(Client *client, bool focused)
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned long bg_color = focused ? colors->title_focused_bg : colors->title_unfocused_bg;
|
||||
unsigned long bg_color = client_get_animated_title_color(client);
|
||||
|
||||
XSetForeground(dpy, dwn->gc, bg_color);
|
||||
XFillRectangle(dpy, client->frame, dwn->gc, close_x, button_y, BUTTON_SIZE, BUTTON_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user