trim: trim some stuff

This commit is contained in:
Alastair Poole 2021-01-24 14:15:17 +00:00
parent a2c1ecb5bb
commit 973f95b94f
4 changed files with 10 additions and 21 deletions

View File

@ -346,14 +346,11 @@ _win_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info
{
Animate *ad;
Ui *ui;
Evas_Coord x = 0, y = 0;
ad = data;
ui = ad->ui;
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
ui->cpu.x = x;
ui->cpu.y = y;
evas_object_geometry_get(obj, &ui->cpu.x, &ui->cpu.y, NULL, NULL);
}
static void

View File

@ -312,14 +312,11 @@ _win_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info
{
Ui_Data *pd;
Ui *ui;
Evas_Coord x = 0, y = 0;
pd = data;
ui = pd->ui;
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
ui->disk.x = x;
ui->disk.y = y;
evas_object_geometry_get(obj, &ui->disk.x, &ui->disk.y, NULL, NULL);
}
static void
@ -453,7 +450,6 @@ _btn_icon_state_set(Evas_Object *button, Eina_Bool reverse)
elm_icon_standard_set(icon, evisum_icon_path_get("go-up"));
elm_object_part_content_set(button, "icon", icon);
evas_object_color_set(icon, 255, 255, 255, 255);
evas_object_show(icon);
}

View File

@ -397,9 +397,7 @@ _content_get(void *data, Evas_Object *obj, const char *source)
elm_object_text_set(lb, buf);
evas_object_geometry_get(lb, NULL, NULL, &ow, NULL);
if (ow > w)
{
evas_object_size_hint_min_set(pd->btn_pid, w, 1);
}
evas_object_size_hint_min_set(pd->btn_pid, w, 1);
}
rec = evas_object_data_get(lb, "rec");
evas_object_size_hint_min_set(rec, w, 1);
@ -454,7 +452,7 @@ _content_get(void *data, Evas_Object *obj, const char *source)
elm_object_text_set(lb, buf);
evas_object_geometry_get(lb, NULL, NULL, &ow, NULL);
if (ow > w)
evas_object_size_hint_min_set(pd->btn_size, w, 1);
evas_object_size_hint_min_set(pd->btn_size, w, 1);
}
rec = evas_object_data_get(lb, "rec");
evas_object_size_hint_min_set(rec, w, 1);

View File

@ -56,15 +56,16 @@ _sort_cb(const void *p1, const void *p2)
static void
_sensors_refresh(Ui_Data *pd)
{
sensor_t **ss;
sensor_t **sensors;
int n;
ss = system_sensors_thermal_get(&n);
sensors = system_sensors_thermal_get(&n);
if (!sensors) return;
for (int i = 0; i < n; i++)
pd->sensors = eina_list_append(pd->sensors, ss[i]);
pd->sensors = eina_list_append(pd->sensors, sensors[i]);
free(ss);
free(sensors);
pd->sensors = eina_list_sort(pd->sensors, n, _sort_cb);
@ -221,14 +222,11 @@ _win_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info
{
Ui_Data *pd;
Ui *ui;
Evas_Coord x = 0, y = 0;
pd = data;
ui = pd->ui;
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
ui->sensors.x = x;
ui->sensors.y = y;
evas_object_geometry_get(obj, &ui->sensors.x, &ui->sensors.y, NULL, NULL);
}
static void