From 3bdb1f570c4e6d3a15b8c58163ad3e16f9ee06c7 Mon Sep 17 00:00:00 2001 From: Vadim Vergasov Date: Mon, 26 Aug 2019 22:11:00 +0300 Subject: [PATCH] Fixed button location --- .cproject | 9 ++++++++- CHANGELOG | 4 ++-- inc/watercleaner.h | 1 + src/watercleaner.c | 10 +++++++++- tizen-manifest.xml | 4 ++-- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.cproject b/.cproject index 79c72b9..4795937 100644 --- a/.cproject +++ b/.cproject @@ -460,6 +460,13 @@ - + + + + + + + + diff --git a/CHANGELOG b/CHANGELOG index 4fd432d..2c4ada6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -Trying to make icon in Popup. -Few minor fixes. --Added sound of current system ringtone. --Now spinner is in focus, so no clicks on screen now. +-Added check for Tizen Version to prevent incorrect UI in Tizen 4. + diff --git a/inc/watercleaner.h b/inc/watercleaner.h index 5c272dc..8f3b6e7 100644 --- a/inc/watercleaner.h +++ b/inc/watercleaner.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/src/watercleaner.c b/src/watercleaner.c index 51766dd..c40fe73 100644 --- a/src/watercleaner.c +++ b/src/watercleaner.c @@ -186,11 +186,19 @@ static void create_base_gui(appdata_s *ad) { elm_grid_pack(ad->grid, ad->label, 35, 45, 30, 10); evas_object_show(ad->label); + char *version; + system_info_get_platform_string("http://tizen.org/feature/platform.version", + &version); + char *button_text = i18n_get_text("Clean"); ad->button = elm_button_add(ad->grid); elm_object_text_set(ad->button, button_text); elm_object_style_set(ad->button, "bottom"); - elm_grid_pack(ad->grid, ad->button, 30, 90, 40, 10); + if (version[0] == '4') { + elm_grid_pack(ad->grid, ad->button, 30, 85, 40, 10); + } else { + elm_grid_pack(ad->grid, ad->button, 30, 90, 40, 10); + } evas_object_smart_callback_add(ad->button, "clicked", clicked_cb, ad); evas_object_show(ad->button); evas_object_show(ad->win); diff --git a/tizen-manifest.xml b/tizen-manifest.xml index c16b06d..d1014cd 100644 --- a/tizen-manifest.xml +++ b/tizen-manifest.xml @@ -1,6 +1,6 @@ - - VadVergasov + + VadVergasov This app will help you to clean the watches after swimming.