Icons: Add default icons (Use Apostolos E icons).
Minor formatting and use our own icons by Apostolos. He already created the application icon. These look fine with flat and dark theme.
This commit is contained in:
parent
bd588341a8
commit
14344e8bd2
2
AUTHORS
2
AUTHORS
|
@ -1,4 +1,4 @@
|
|||
Alastair Poole <netstar@gmail.com>
|
||||
|
||||
Icon:
|
||||
Icons:
|
||||
Apostolos Bartziokas <barz621@gmail.com>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1,2 @@
|
|||
install_data('go-up.png', 'go-down.png',
|
||||
install_dir: join_paths(dir_data, 'evisum/images'))
|
|
@ -1,2 +1,3 @@
|
|||
subdir('desktop')
|
||||
subdir('icons')
|
||||
subdir('images')
|
||||
|
|
|
@ -26,6 +26,7 @@ dir_locale = join_paths(dir_prefix, get_option('localedir'))
|
|||
##### config.h
|
||||
|
||||
cfg.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
cfg.set_quoted('PACKAGE_DATA_DIR', join_paths(dir_data, 'evisum'))
|
||||
configure_file(output: 'config.h', configuration: cfg)
|
||||
|
||||
subdir('src')
|
||||
|
|
42
src/bin/ui.c
42
src/bin/ui.c
|
@ -1,3 +1,4 @@
|
|||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "process.h"
|
||||
#include "disks.h"
|
||||
|
@ -12,6 +13,7 @@
|
|||
|
||||
static Eina_Lock _lock;
|
||||
|
||||
|
||||
void
|
||||
ui_shutdown(Ui *ui)
|
||||
{
|
||||
|
@ -110,6 +112,42 @@ _network_transfer_format(double rate)
|
|||
return strdup(eina_slstr_printf("%.2f %s", rate, unit));
|
||||
}
|
||||
|
||||
char *
|
||||
_path_append(const char *path, const char *file)
|
||||
{
|
||||
char *concat;
|
||||
int len;
|
||||
char separator = '/';
|
||||
#ifdef WIN32
|
||||
separator = '\\';
|
||||
#endif
|
||||
|
||||
len = strlen(path) + strlen(file) + 2;
|
||||
concat = malloc(len * sizeof(char));
|
||||
snprintf(concat, len, "%s%c%s", path, separator, file);
|
||||
|
||||
return concat;
|
||||
}
|
||||
|
||||
const char *
|
||||
_icon_path_get(const char *name)
|
||||
{
|
||||
char *path;
|
||||
const char *icon_path, *directory = PACKAGE_DATA_DIR "/images";
|
||||
icon_path = name;
|
||||
|
||||
path = _path_append(directory, eina_slstr_printf("%s.png", name));
|
||||
if (path)
|
||||
{
|
||||
if (ecore_file_exists(path))
|
||||
icon_path = eina_slstr_printf("%s", path);
|
||||
|
||||
free(path);
|
||||
}
|
||||
|
||||
return icon_path;
|
||||
}
|
||||
|
||||
static void
|
||||
_tab_misc_update(Ui *ui, results_t *results)
|
||||
{
|
||||
|
@ -848,9 +886,9 @@ _btn_icon_state_set(Evas_Object *button, Eina_Bool reverse)
|
|||
{
|
||||
Evas_Object *icon = elm_icon_add(button);
|
||||
if (reverse)
|
||||
elm_icon_standard_set(icon, "go-down");
|
||||
elm_icon_standard_set(icon, _icon_path_get("go-down"));
|
||||
else
|
||||
elm_icon_standard_set(icon, "go-up");
|
||||
elm_icon_standard_set(icon, _icon_path_get("go-up"));
|
||||
|
||||
elm_object_part_content_set(button, "icon", icon);
|
||||
evas_object_show(icon);
|
||||
|
|
Loading…
Reference in New Issue