Remove unnecessary casts
This commit is contained in:
@@ -349,8 +349,8 @@ Imlib_Image scale_icon(Imlib_Image original, int icon_size)
|
|||||||
icon_size,
|
icon_size,
|
||||||
icon_size,
|
icon_size,
|
||||||
launcher_alpha,
|
launcher_alpha,
|
||||||
(float)launcher_saturation / 100,
|
launcher_saturation / 100.0,
|
||||||
(float)launcher_brightness / 100);
|
launcher_brightness / 100.0);
|
||||||
imlib_image_put_back_data(data);
|
imlib_image_put_back_data(data);
|
||||||
|
|
||||||
imlib_context_set_image(icon_scaled);
|
imlib_context_set_image(icon_scaled);
|
||||||
|
|||||||
@@ -284,9 +284,9 @@ void init_panel_size_and_position(Panel *panel)
|
|||||||
panel->area.height = 32;
|
panel->area.height = 32;
|
||||||
}
|
}
|
||||||
if (panel->fractional_width)
|
if (panel->fractional_width)
|
||||||
panel->area.width = (float)server.monitors[panel->monitor].width * panel->area.width / 100;
|
panel->area.width = server.monitors[panel->monitor].width * panel->area.width / 100;
|
||||||
if (panel->fractional_height)
|
if (panel->fractional_height)
|
||||||
panel->area.height = (float)server.monitors[panel->monitor].height * panel->area.height / 100;
|
panel->area.height = server.monitors[panel->monitor].height * panel->area.height / 100;
|
||||||
if (panel->area.width + panel->marginx > server.monitors[panel->monitor].width)
|
if (panel->area.width + panel->marginx > server.monitors[panel->monitor].width)
|
||||||
panel->area.width = server.monitors[panel->monitor].width - panel->marginx;
|
panel->area.width = server.monitors[panel->monitor].width - panel->marginx;
|
||||||
if (panel->area.bg->border.radius > panel->area.height / 2) {
|
if (panel->area.bg->border.radius > panel->area.height / 2) {
|
||||||
@@ -306,12 +306,12 @@ void init_panel_size_and_position(Panel *panel)
|
|||||||
}
|
}
|
||||||
int old_panel_height = panel->area.height;
|
int old_panel_height = panel->area.height;
|
||||||
if (panel->fractional_width)
|
if (panel->fractional_width)
|
||||||
panel->area.height = (float)server.monitors[panel->monitor].height * panel->area.width / 100;
|
panel->area.height = server.monitors[panel->monitor].height * panel->area.width / 100;
|
||||||
else
|
else
|
||||||
panel->area.height = panel->area.width;
|
panel->area.height = panel->area.width;
|
||||||
|
|
||||||
if (panel->fractional_height)
|
if (panel->fractional_height)
|
||||||
panel->area.width = (float)server.monitors[panel->monitor].width * old_panel_height / 100;
|
panel->area.width = server.monitors[panel->monitor].width * old_panel_height / 100;
|
||||||
else
|
else
|
||||||
panel->area.width = old_panel_height;
|
panel->area.width = old_panel_height;
|
||||||
|
|
||||||
|
|||||||
@@ -1339,8 +1339,8 @@ void systray_render_icon_composited(void *t)
|
|||||||
traywin->width,
|
traywin->width,
|
||||||
traywin->height,
|
traywin->height,
|
||||||
systray.alpha,
|
systray.alpha,
|
||||||
(float)systray.saturation / 100,
|
systray.saturation / 100.0,
|
||||||
(float)systray.brightness / 100);
|
systray.brightness / 100.0);
|
||||||
imlib_image_put_back_data(data);
|
imlib_image_put_back_data(data);
|
||||||
|
|
||||||
systray_render_icon_from_image(traywin);
|
systray_render_icon_from_image(traywin);
|
||||||
|
|||||||
@@ -316,8 +316,8 @@ void task_update_icon(Task *task)
|
|||||||
task->icon_width,
|
task->icon_width,
|
||||||
task->icon_height,
|
task->icon_height,
|
||||||
panel->g_task.alpha[k],
|
panel->g_task.alpha[k],
|
||||||
(float)panel->g_task.saturation[k] / 100,
|
panel->g_task.saturation[k] / 100.0,
|
||||||
(float)panel->g_task.brightness[k] / 100);
|
panel->g_task.brightness[k] / 100.0);
|
||||||
imlib_image_put_back_data(data32);
|
imlib_image_put_back_data(data32);
|
||||||
}
|
}
|
||||||
if (panel_config.mouse_effects) {
|
if (panel_config.mouse_effects) {
|
||||||
|
|||||||
Reference in New Issue
Block a user