USER_POS = res/po/ca.po res/po/fr.po res/po/nl.po res/po/sk.po res/po/ar.po res/po/hu.po res/po/da.po res/po/en.po res/po/ja_JP.po res/po/lt.po res/po/nb.po res/po/sv.po res/po/zh_TW.po res/po/fr_CA.po res/po/de.po res/po/fi.po res/po/zh_HK.po res/po/bg.po res/po/sr.po res/po/ga.po res/po/lv.po res/po/sl.po res/po/en_PH.po res/po/zh_CN.po res/po/uk.po res/po/ro.po res/po/eu.po res/po/it_IT.po res/po/kk.po res/po/ru_RU.po res/po/el_GR.po res/po/et.po res/po/is.po res/po/ka.po res/po/pt_BR.po res/po/cs.po res/po/pl.po res/po/gl.po res/po/hy.po res/po/en_US.po res/po/es_ES.po res/po/tr_TR.po res/po/pt_PT.po res/po/az.po res/po/ko_KR.po res/po/es_US.po res/po/mk.po res/po/uz.po res/po/hr.po
# User Defines
-USER_DEFS = TIZEN_DEPRECATION DEPRECATION_WARNING
+#############################################################################
+# Remove the user define to remove the quick buttons from quickpanel
+#############################################################################
+USER_DEFS = TIZEN_DEPRECATION DEPRECATION_WARNING \
+ ENABLE_QUICK_BUTTON_WIFI \
+ ENABLE_QUICK_BUTTON_BLUETOOTH \
+ ENABLE_QUICK_BUTTON_SOUND \
+ ENABLE_QUICK_BUTTON_DND \
+ ENABLE_QUICK_BUTTON_VC \
+ ENABLE_QUICK_BUTTON_SOFTKEY
+
USER_CPP_DEFS =
# User Undefines
#include "../../inc/quickpanel_def.h"
#include "color_classes.edc"
-#define QP_SETTING_H 224
+#define QP_SETTING_H 240
#define QP_SETTING_SEPERATOR_H 0
#define QP_VOICE_CONTROL_H 80
#define QP_ENABLE_VOICE_CONTROL_H ((QP_SETTING_H + QP_VOICE_CONTROL_H) / QP_SETTING_H)
}
}
}
- part{
- name: "background_2";
- type: IMAGE;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- align: 0.5 0.5;
- min: 1200 250;
- max: 1200 250;
- rel1 {
- relative: 40/1280 30/720;
- to: "base";
- }
- rel2 {
- relative: 1240/1280 280/720;
- }
- image {
- normal: "core_theme_bg_small.png";
- }
- }
- }
part{
name: "qp.base.rect.datetime";
type:SPACER;
type: SPACER;
scale: 1;
description { state: "default" 0.0;
- min: 0 56;
- max: -1 56;
+ min: 0 32;
+ max: -1 32;
fixed: 0 1;
rel1 {
to_y: "qp.base.setting.swallow";
image: "quick_button_icon_bg.png" COMP;
image: "quick_pressed_button_icon_bg.png" COMP;
image: "quick_dimmed_button_icon_bg.png" COMP;
+ image: "core_theme_bg_small.png" COMP;
}
#define ENABLE_COLOR_CLIP
-#define QP_SETTINGS_HEIGHT 224
+#define QP_SETTINGS_HEIGHT 240
#define QP_SETTING_SLIDER_SWALLOW_HEIGHT 32
#define QP_SETTING_SLIDER_SWALLOW_WIDTH 468
type: SPACER;
scale: 1;
description { state: "default" 0.0;
- min: 100 0;
+ min: 40 0;
fixed: 1 0;
rel1 {
relative: 0.0 0.0;
type: SPACER;
scale: 1;
description { state: "default" 0.0;
- min: 100 0;
+ min: 40 0;
fixed: 1 0;
rel1 {
relative: 1.0 0.0;
align: 1.0 0.0;
}
}
+ part { name: "setting.bg";
+ type: IMAGE;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1 { to: "setting.margin.left"; relative: 1.0 0.0; }
+ rel2 { to: "setting.margin.right"; relative: 0.0 1.0; }
+ image {
+ normal: "core_theme_bg_small.png";
+ }
+ }
+ }
part { name: "setting.margin.top";
type: SPACER;
scale: 1;
description { state: "default" 0.0;
- min: 0 32;
+ min: 0 24;
fixed: 0 1;
rel1 { to_x: "setting.margin.left"; to_y: "background"; relative: 1.0 0.0; }
rel2 { to_x: "setting.margin.right"; to_y: "background"; relative: 0.0 0.0; }
type: SPACER;
scale: 1.0;
description { state: "default" 0.0;
- min: 16 32;
- max: 16 32;
+ min: 76 32;
+ max: 76 32;
fixed: 1.0 1.0;
rel1 { to_x: "setting.margin.left"; to_y: "quickseting.volume_brightness.gap"; relative: 1.0 1.0; }
align: 0.0 0.0;
evas_object_show(scroller);
Evas_Object *bg_touch = elm_image_add(view);
+ elm_image_aspect_fixed_set(bg_touch, EINA_FALSE);
if (bg_touch != NULL) {
const char *bg_path = util_get_res_file_path(NOTIFICATION_LIST_BG_IMAGE);
elm_image_file_set(bg_touch, bg_path, NULL);
quickpanel_setting_module_icon_view_update_text(module);
}
+static int _support_get()
+{
+ // if don't want to support than return 0
+#ifdef ENABLE_QUICK_BUTTON_BLUETOOTH
+ return 1;
+#else
+ return 0;
+#endif
+
+}
+
+
QP_Module_Setting bluetooth = {
.name = "bluetooth",
.setting_pkgname = "ug-bluetooth-efl",
.lang_changed = _lang_changed,
.refresh = _refresh,
.icon_get = _icon_get,
+ .supported_get = _support_get,
.label_get = _label_get,
.view_update = _view_update,
.status_update = _status_update,
return EINA_TRUE;
}
+static int _support_get()
+{
+ // if don't want to support than return 0
+#ifdef ENABLE_QUICK_BUTTON_DND
+ return 1;
+#else
+ return 0;
+#endif
+
+}
+
QP_Module_Setting dnd = {
.name = "dnd",
.setting_pkgname = "org.tizen.setting-notification",
.refresh = _refresh,
.icon_get = _icon_get,
.label_get = _label_get,
+ .supported_get = _support_get,
.view_update = _view_update,
.status_update = _status_update,
.state_change = _state_change,
return EINA_TRUE;\r
}\r
\r
+static int _support_get()\r
+{\r
+\r
+#ifdef ENABLE_QUICK_BUTTON_SOFTKEY\r
+ return 1;\r
+#else\r
+ return 0;\r
+#endif\r
+\r
+}\r
+\r
QP_Module_Setting softkey = {\r
.name = "softkey",\r
.setting_pkgname = "org.tizen.setting-softkey",\r
.lang_changed = _lang_changed,\r
.refresh = _refresh,\r
.icon_get = _icon_get,\r
+ .supported_get = _support_get,\r
.label_get = _label_get,\r
.view_update = _view_update,\r
.status_update = _status_update,\r
_status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
}
+static int _support_get()
+{
+ // if don't want to support than return 0
+#ifdef ENABLE_QUICK_BUTTON_SOUND
+ return 1;
+#else
+ return 0;
+#endif
+
+}
+
+
QP_Module_Setting sound = {
- .name = "sound",
- .setting_pkgname = "org.tizen.setting-profile",
+ .name = "sound",
+ .setting_pkgname = "org.tizen.setting-profile",
.init = _init,
.fini = _fini,
.lang_changed = _lang_changed,
.refresh = _refresh,
.icon_get = _icon_get,
- .label_get = _label_get,
+ .supported_get = _support_get,
+ .label_get = _label_get,
.view_update = _view_update,
- .status_update = _status_update,
+ .status_update = _status_update,
.handler_longpress = _long_press_cb,
- .handler_press = _mouse_clicked_cb,
- .is_disable_feedback = 1,
+ .handler_press = _mouse_clicked_cb,
+ .is_disable_feedback = 1,
};
quickpanel_setting_module_icon_view_update_text(module);
}
+static int _support_get()
+{
+ // if don't want to support than return 0
+#ifdef ENABLE_QUICK_BUTTON_VC
+ return 1;
+#else
+ return 0;
+#endif
+
+}
+
+
QP_Module_Setting voicecontrol = {
.name = "voicecontrol",
.setting_pkgname = "org.tizen.voice-control-panel",
.lang_changed = _lang_changed,
.refresh = _refresh,
.icon_get = _icon_get,
+ .supported_get = _support_get,
.label_get = _label_get,
.view_update = _view_update,
.status_update = _status_update,
return EINA_TRUE;
}
+static int _support_get()
+{
+ // if don't want to support than return 0
+#ifdef ENABLE_QUICK_BUTTON_WIFI
+ return 1;
+#else
+ return 0;
+#endif
+
+}
+
QP_Module_Setting wifi = {
.name = "wifi",
.setting_pkgname = "wifi-efl-ug",
.lang_changed = _lang_changed,
.refresh = _refresh,
.icon_get = _icon_get,
+ .supported_get = _support_get,
.label_get = _label_get,
.view_update = _view_update,
.status_update = _status_update,
#endif
#define QUICK_SETTING_ICON_GAP 72
-#define QUICK_SETTING_GRID_WIDTH 1080
+#define QUICK_SETTING_GRID_WIDTH 1200
#define QUICK_SETTING_GRID_HEIGHT 140
#define GRID_WIDTH ELM_SCALE_SIZE(QUICK_SETTING_GRID_WIDTH)
quickpanel_setting_layout_set(ad->ly, container);
}
+static int _get_padding_of_icon(int item_count)
+{
+ if(item_count < 6)
+ return 120;
+ else
+ return 72;
+}
+
+static int _get_quick_setting_margin(int item_count, int padding)
+{
+ int items_area = QUICK_SETTING_ICON_WIDTH * item_count + padding * (item_count - 1);
+
+ return ((QUICK_SETTING_GRID_WIDTH - items_area) / 2);
+}
+
static void _view_icons_add(void *data)
{
int index = 0, total = 0;
retif(list_featured_icon == NULL, , "Invalid parameter!");
total = eina_list_count(list_featured_icon);
- int pos_x = 0, pos_y = 0;
+ DBG("Total nums of enabled featured for quick buttons: %d", total);
+ int padding = _get_padding_of_icon(total);
+ int margin = _get_quick_setting_margin(total, padding);
+ DBG("Quick Buttons Marging: %d \t Padding: %d", margin, padding);
+ int pos_x = margin, pos_y = 0;
EINA_LIST_FOREACH_SAFE(list_featured_icon, l, l_next, module) {
icon = quickpanel_setting_module_icon_create(module, grid);
quickpanel_setting_module_icon_add(module, icon, QP_SETTING_ICON_CONTAINER_FEATURED);
quickpanel_setting_icon_pack(grid, icon, pos_x, pos_y);
quickpanel_setting_module_icon_status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
index++;
- pos_x += (QUICK_SETTING_ICON_WIDTH + QUICK_SETTING_ICON_GAP);
+ pos_x += (QUICK_SETTING_ICON_WIDTH + padding);
}
eina_list_free(list_featured_icon);
total = eina_list_count(list_all_module);
DBG("total:%d", total);
- int pos_x = 0, pos_y = 0;
+ int padding = _get_padding_of_icon(total);
+ int margin = _get_quick_setting_margin(total, padding);
+ int pos_x = margin, pos_y = 0;
EINA_LIST_FOREACH_SAFE(list_all_module, l, l_next, module) {
if (index < num_featured) {
if ((icon = quickpanel_setting_module_icon_get(module,
quickpanel_setting_module_icon_add(module, icon, QP_SETTING_ICON_CONTAINER_FEATURED);
quickpanel_setting_icon_pack(grid, icon, pos_x, pos_y);
quickpanel_setting_module_icon_status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
- pos_x += (QUICK_SETTING_ICON_WIDTH + QUICK_SETTING_ICON_GAP);
+ pos_x += (QUICK_SETTING_ICON_WIDTH + padding);
}
DBG("all list:%s", module->name);
} else {