Commit 9768b326 authored by o9000's avatar o9000

Remove unnecessary casts

parent b608cd59
......@@ -349,8 +349,8 @@ Imlib_Image scale_icon(Imlib_Image original, int icon_size)
icon_size,
icon_size,
launcher_alpha,
(float)launcher_saturation / 100,
(float)launcher_brightness / 100);
launcher_saturation / 100.0,
launcher_brightness / 100.0);
imlib_image_put_back_data(data);
imlib_context_set_image(icon_scaled);
......
......@@ -284,9 +284,9 @@ void init_panel_size_and_position(Panel *panel)
panel->area.height = 32;
}
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)
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)
panel->area.width = server.monitors[panel->monitor].width - panel->marginx;
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;
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
panel->area.height = panel->area.width;
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
panel->area.width = old_panel_height;
......
......@@ -1339,8 +1339,8 @@ void systray_render_icon_composited(void *t)
traywin->width,
traywin->height,
systray.alpha,
(float)systray.saturation / 100,
(float)systray.brightness / 100);
systray.saturation / 100.0,
systray.brightness / 100.0);
imlib_image_put_back_data(data);
systray_render_icon_from_image(traywin);
......
......@@ -316,8 +316,8 @@ void task_update_icon(Task *task)
task->icon_width,
task->icon_height,
panel->g_task.alpha[k],
(float)panel->g_task.saturation[k] / 100,
(float)panel->g_task.brightness[k] / 100);
panel->g_task.saturation[k] / 100.0,
panel->g_task.brightness[k] / 100.0);
imlib_image_put_back_data(data32);
}
if (panel_config.mouse_effects) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment