#ifndef __AIR_SETTINGS_MENUMGR_H__
#define __AIR_SETTINGS_MENUMGR_H__
+#include <Elementary.h>
+
struct menumgr;
struct menumgr_info {
const char *title;
const char *style;
Eina_Bool disabled;
+ Evas_Object *progress_evas;
char *(*status)(void *data, int id);
+ float (*progress_value)(void);
void (*selected)(void *data, int id);
void (*selected_menu)(void *data, int id);
};
#ifndef __AIR_SETTINGS_PICTURE_H__
#define __AIR_SETTINGS_PICTURE_H__
+#include "common/menumgr.h"
+
#define PICTURE_MODE_STANDARD_STR "Standard"
#define PICTURE_MODE_MOVIE_STR "Movie"
settings_picture_mode settings_picture_get_picture_mode(void);
int settings_picture_get_contrast(void);
+float settings_picture_get_contrast_relative(void);
int settings_picture_get_brightness(void);
+float settings_picture_get_brightness_relative(void);
int settings_picture_get_max_brightness(void);
int settings_picture_get_sharpness(void);
+float settings_picture_get_sharpness_relative(void);
int settings_picture_get_color(void);
+float settings_picture_get_color_relative(void);
int settings_picture_get_tint_g(void);
+float settings_picture_get_tint_relative(void);
void settings_picture_set_screen_adjust(int adj);
int settings_picture_get_screen_adjust(void);
const char *settings_picture_get_screen_adjust_str(void);
#define PART_MENU_VALUE "part.menu.value"
#define PART_LIVE_TV_BTN "part.live.tv.btn"
#define PART_MORE_FAV_BTN "part.more.fav.btn"
+#define PART_MENU_PROGRESS "part.menu.progress"
#define PART_GUIDE "part.guide"
#define PART_GUIDE_2 "part.guide2"
#define STYLE_BASE_BTN "style.base.button"
#define STYLE_NORMAL_BTN "style.normal.button"
#define STYLE_STATUS_BTN "style.status.button"
+#define STYLE_PROGRESS_BTN "style.progress.button"
#define STYLE_OPTION_BTN "style.option.button"
#define STYLE_OPTION_LIST_BTN "style.option.list.button"
#define STYLE_CTXPOPUP "style.ctxpopup"
#define FONT_LIGHT "BreezeSans:style=Light"
/* Color */
-#define COLOR_ITEM_BG 255 255 255 255
+#define COLOR_ITEM_BG 191 191 191 255
#define COLOR_ITEM_FOCUS 0 119 246 255
#define COLOR_ITEM_BORDER 194 194 194 255
-#define COLOR_TEXT_ITEM 92 92 92 255
+
+
+#define COLOR_TEXT_ITEM 255 255 255 255
#define COLOR_TEXT_FOCUS 255 255 255 255
#define COLOR_TEXT_DISABLE 92 92 92 155
-#define COLOR_TEXT_VALUE 64 136 211 255
+#define COLOR_TEXT_VALUE 89 89 89 255
+#define COLOR_TEXT_VALUE_FOCUS 189 189 189 255
#define COLOR_TEXT_VALUE_DISABLE 64 136 211 155
+#define COLOR_TEXT_SLIDER 92 92 92 255
+#define COLOR_TEXT_SLIDER_VALUE 64 136 211 255
#define COLOR_TEXT_POPUP 104 104 104 255
#define COLOR_LINE_INSIDE 127 127 127 255
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#define SLIDER_VAL_MIN_REL_X 0.285
#define SLIDER_VAL_MAX_REL_X 0.915
#define SLIDER_VAL_STEP_REL_X 0.0063
rel1.to, "bg";
rel2 { to, "bg"; relative, 0.25 1.0; }
align, 0.5 0.5;
- color, COLOR_TEXT_ITEM;
+ color, COLOR_TEXT_SLIDER;
text {
font, FONT_REGULAR;
size, 32;
rel1 { to, "bg"; relative, SLIDER_VAL_MIN_REL_X SLIDER_VAL_REL_Y; }
rel2 { to, "bg"; relative, SLIDER_VAL_MIN_REL_X SLIDER_VAL_REL_Y; }
align, 0.5 0.5;
- color, COLOR_TEXT_ITEM;
+ color, COLOR_TEXT_SLIDER;
text {
font, FONT_LIGHT;
size, 28;
rel1 { to, "bg"; relative, SLIDER_VAL_MAX_REL_X SLIDER_VAL_REL_Y; }
rel2 { to, "bg"; relative, SLIDER_VAL_MAX_REL_X SLIDER_VAL_REL_Y; }
align, 0.5 0.5;
- color, COLOR_TEXT_ITEM;
+ color, COLOR_TEXT_SLIDER;
text {
font, FONT_LIGHT;
size, 28;
rel1 { to, "bg"; relative, SLIDER_VAL_MIN_REL_X SLIDER_VAL_REL_Y; }
rel2 { to, "bg"; relative, SLIDER_VAL_MIN_REL_X SLIDER_VAL_REL_Y; }
align, 0.5 0.5;
- color, COLOR_TEXT_VALUE;
+ color, COLOR_TEXT_SLIDER_VALUE;
text {
font, FONT_REGULAR;
size, 28;
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
group {
name, GRP_VIEW_POPUP_2BTNS;
parts {
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
group {
name, GRP_VIEW_POPUP_BUTTONS_LIST;
parts {
}
}
part {
- name, "elm.text";
- type, TEXT;
+ name, "bg.content";
+ type, SPACER;
scale, 1;
description {
state, "default" 0.0;
+ max, 388 254;
rel1.to, "bg";
rel2.to, "bg";
+ align, 0.5 0.5;
+ fixed, 1 1;
+ }
+ }
+ part {
+ name, "elm.text";
+ type, TEXT;
+ repeat_events, 1;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1.to, "bg.content";
+ rel2.to, "bg.content";
text {
font, FONT_LIGHT;
- size, 32;
+ size, 40;
align, 0.5 0.5;
}
color, COLOR_TEXT_ITEM;
color, COLOR_TEXT_DISABLE;
}
}
- part {
- name, "border_top";
- type, RECT;
- scale, 1;
- description {
- state, "default" 0.0;
- rel1.to, "bg";
- rel2 {
- to, "bg";
- relative, 1.0 0.0;
- }
- min, 0 1;
- align, 0.5 0.0;
- color, COLOR_ITEM_BORDER;
- fixed, 0 1;
- }
- }
- part {
- name, "border_left";
- inherit, "border_top";
- description {
- state, "default" 0.0;
- rel1 {
- to, "border_top";
- relative, 0.0 1.0;
- }
- rel2 {
- to, "bg";
- relative, 0.0 1.0;
- }
- min, 1 0;
- align, 0.0 0.5;
- fixed, 1 0;
- }
- }
- part {
- name, "border_right";
- inherit, "border_top";
- description {
- state, "default" 0.0;
- rel1 {
- to, "border_top";
- relative, 1.0 1.0;
- }
- rel2 {
- to, "bg";
- relative, 1.0 1.0;
- }
- min, 1 0;
- align, 1.0 0.5;
- fixed, 1 0;
- }
- }
- part {
- name, "border_bottom";
- inherit, "border_top";
- description {
- state, "default" 0.0;
- rel1 {
- to, "border_left";
- relative, 1.0 1.0;
- }
- rel2 {
- to, "border_right";
- relative, 0.0 1.0;
- }
- align, 0.5 1.0;
- }
- }
}
programs {
program {
group {
name, "elm/button/base/style.status.button";
inherit, "elm/button/base/style.normal.button";
- data.item, "focus_highlight" "on";
parts {
part {
- name, "bg.text";
- type, SPACER;
- scale, 1;
- description {
- state, "default" 0.0;
- min, 400 134;
- rel1 {
- to, "bg";
- relative, 0.5 0.5;
- }
- rel2 {
- to, "bg";
- relative, 0.5 0.5;
- }
- align, 0.5 0.5;
- fixed, 1 1;
- }
- }
- part {
name, "elm.text";
- type, TEXT;
- scale, 1;
description {
state, "default" 0.0;
- rel1.to, "bg.text";
- rel2.to, "bg.text";
- text {
- font, FONT_LIGHT;
- size, 32;
- align, 0.5 0.0;
- }
- color, COLOR_TEXT_ITEM;
+ rel2.relative, 1.0 0.4;
+ text.align, 0.5 1.0;
+ // the rest is inherited
}
description {
state, "focused" 0.0;
part {
name, PART_MENU_VALUE;
type, TEXT;
+ repeat_events, 1;
scale, 1;
description {
state, "default" 0.0;
- rel1.to, "bg.text";
- rel2.to, "bg.text";
+ rel1 {
+ to, "bg.content";
+ relative, 0.0 0.5;
+ }
+ rel2.to, "bg.content";
+
text {
font, FONT_LIGHT;
- size, 66;
- align, 0.5 1.0;
+ size, 40;
+ align, 0.5 0.0;
}
color, COLOR_TEXT_VALUE;
}
description {
state, "focused" 0.0;
inherit, "default" 0.0;
- color, COLOR_TEXT_FOCUS;
+ color, COLOR_TEXT_VALUE_FOCUS;
}
description {
state, "disabled" 0.0;
programs {
program {
name, "focused";
- signal, "elm,action,focus";
- source, "elm";
- action, STATE_SET "focused" 0.0;
- target, "bg";
- target, "elm.text";
target, PART_MENU_VALUE;
- transition, TRANSITION_FOCUS;
}
program {
name, "unfocused";
- signal, "elm,action,unfocus";
- source, "elm";
- action, STATE_SET "default" 0.0;
- target, "bg";
- target, "elm.text";
target, PART_MENU_VALUE;
- transition, TRANSITION_FOCUS;
}
program {
name, "disabled";
- signal, SIG_DISABLED;
- source, "elm";
- action, STATE_SET "disabled" 0.0;
- target, "elm.text";
target, PART_MENU_VALUE;
}
program {
}
group {
+ name, "elm/button/base/style.progress.button";
+ inherit, "elm/button/base/style.status.button";
+ parts {
+ part {
+ name, PART_MENU_PROGRESS;
+ type, SWALLOW;
+ repeat_events, 1;
+ scale, 1;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, "bg.content";
+ relative, 0.0 0.5;
+ }
+ rel2 {
+ to, "bg.content";
+ relative, 1.0 0.5;
+ }
+ min, 80 45;
+ align, 0.5 0.5;
+ fixed, 1 0;
+ }
+ }
+ part {
+ name, "elm.text";
+ description {
+ state, "default" 0.0;
+ rel1.to, PART_MENU_PROGRESS;
+ rel2 {
+ to, PART_MENU_PROGRESS;
+ relative, 1.0 0.0;
+ }
+ text.align, 0.5 1.0;
+ // the rest is inherited
+ }
+ description {
+ state, "focused" 0.0;
+ inherit, "default" 0.0;
+ color, COLOR_TEXT_FOCUS;
+ }
+ description {
+ state, "disabled" 0.0;
+ inherit, "default" 0.0;
+ color, COLOR_TEXT_DISABLE;
+ }
+ }
+ part {
+ name, PART_MENU_VALUE;
+ description {
+ state, "default" 0.0;
+ rel1 {
+ to, PART_MENU_PROGRESS;
+ relative, 0.0 0.8;
+ }
+ rel2.to, PART_MENU_PROGRESS;
+ }
+ description {
+ state, "focused" 0.0;
+ inherit, "default" 0.0;
+ color, COLOR_TEXT_VALUE_FOCUS;
+ }
+ description {
+ state, "disabled" 0.0;
+ inherit, "default" 0.0;
+ color, COLOR_TEXT_VALUE_DISABLE;
+ }
+ description {
+ state, "notavailable" 0.0;
+ inherit, "default" 0.0;
+ color, COLOR_TEXT_DISABLE;
+ }
+ }
+ }
+}
+
+group {
name, "elm/button/base/style.option.button";
data.item, "focus_highlight" "on";
images {
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
group {
name, "elm/ctxpopup/base/style.ctxpopup";
data.item, "focus_hightlight" "on";
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
styles {
/* Unfocused state */
style { name: "entry_ipaddr_style";
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
group {
name, "elm/progressbar/horizontal/style.channel.scan.progressbar";
parts {
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#define RADIO_SIZE 48 48
#define RADIO_FONT_SIZE 32
str = m->info[i]->status(m->data, m->info[i]->id);
if (!str) {
- elm_object_part_text_set(m->btn[i],
- PART_MENU_VALUE,
- STATUS_DEFAULT);
- elm_object_signal_emit(m->btn[i],
- SIG_NOTAVAILABLE, "");
+ elm_object_part_text_set(m->btn[i], PART_MENU_VALUE, STATUS_DEFAULT);
+ elm_object_signal_emit(m->btn[i], SIG_NOTAVAILABLE, "");
} else {
- elm_object_part_text_set(m->btn[i],
- PART_MENU_VALUE, str);
+ elm_object_part_text_set(m->btn[i], PART_MENU_VALUE, str);
free(str);
}
}
+ if (m->info[i]->progress_evas) {
+ elm_progressbar_value_set(m->info[i]->progress_evas, m->info[i]->progress_value());
+ }
}
}
elm_object_disabled_set(btn, info[i].disabled);
evas_object_size_hint_align_set(btn, 0, 0);
+ if (info[i].progress_value) {
+ info[i].progress_evas = utils_add_progressbar(btn, PART_MENU_PROGRESS, NULL);
+ if (!info[i].progress_evas) {
+ _ERR("Add progress bar failed.");
+ } else {
+ elm_progressbar_value_set(info[i].progress_evas, info[i].progress_value());
+ }
+ }
+
inputmgr_add_callback(btn, info[i].id, &_handler, m);
col = i % MAX_BTN_COL;
#define DEFAULT_SHARPNESS 100
#define DEFAULT_COLOR 100
#define DEFAULT_TINT_G 50
+#define CONTRAST_MIN_VALUE 0
+#define CONTRAST_MAX_VALUE 100
+#define BRIGHTNESS_MIN_VALUE 0
+#define SHARPNESS_MIN_VALUE 0
+#define SHARPNESS_MAX_VALUE 100
+#define COLOR_MIN_VALUE 0
+#define COLOR_MAX_VALUE 100
+#define TINT_MIN_VALUE 0
+#define TINT_MAX_VALUE 100
/* Display error:
void settings_picture_set_contrast(int val)
{
//@TODO: set contrast value
- if (val < 0 || val > 100) {
+ if (val < CONTRAST_MIN_VALUE || val > CONTRAST_MAX_VALUE) {
_ERR("Invalid contrast value: %d", val);
return;
}
return temp_contrast;
}
+float settings_picture_get_contrast_relative(void)
+{
+ if (CONTRAST_MAX_VALUE == CONTRAST_MIN_VALUE) {
+ _ERR("Contrast max and min values are equal");
+ return .0;
+ }
+ return (float)(settings_picture_get_contrast() - CONTRAST_MIN_VALUE)
+ / (CONTRAST_MAX_VALUE - CONTRAST_MIN_VALUE);
+}
+
int settings_picture_get_brightness(void)
{
- int max, curr;
+ int curr;
int ret = DEVICE_ERROR_NONE;
- max = settings_picture_get_max_brightness();
- if (max <= 0) {
- _ERR("Invalid max brightness value");
- return 0;
- }
-
ret = device_display_get_brightness(0, &curr);
if (ret != DEVICE_ERROR_NONE) {
_ERR("Failed to get current brightness: %s", get_error_message(ret));
return 0;
}
- return 100*curr/max;
+ return curr;
}
int settings_picture_get_max_brightness(void)
return max;
}
+float settings_picture_get_brightness_relative(void)
+{
+ int max, curr;
+
+ max = settings_picture_get_max_brightness();
+ if (max - BRIGHTNESS_MIN_VALUE == 0) {
+ _ERR("Brightness max and min values are equal");
+ return .0;
+ }
+
+ curr = settings_picture_get_brightness();
+
+ return (float)curr/(max - BRIGHTNESS_MIN_VALUE);
+}
+
int settings_picture_get_sharpness(void)
{
//@TODO: get sharpness
return temp_sharpness;
}
+float settings_picture_get_sharpness_relative(void)
+{
+ if (SHARPNESS_MAX_VALUE == SHARPNESS_MIN_VALUE) {
+ _ERR("Sharpness max and min values are equal");
+ return .0;
+ }
+ return (float)(settings_picture_get_sharpness() - SHARPNESS_MIN_VALUE)
+ / (SHARPNESS_MAX_VALUE - SHARPNESS_MIN_VALUE);
+}
+
int settings_picture_get_color(void)
{
//@TODO: get color
return temp_color;
}
+float settings_picture_get_color_relative(void)
+{
+ if (COLOR_MAX_VALUE == COLOR_MIN_VALUE) {
+ _ERR("Color max and min values are equal");
+ return .0;
+ }
+ return (float)(settings_picture_get_color() - COLOR_MIN_VALUE)
+ / (COLOR_MAX_VALUE - COLOR_MIN_VALUE);
+}
+
int settings_picture_get_tint_g(void)
{
//@TODO: get tint
return temp_tint_g;
}
+float settings_picture_get_tint_relative(void)
+{
+ if (TINT_MAX_VALUE == TINT_MIN_VALUE) {
+ _ERR("Tint max and min values are equal");
+ return .0;
+ }
+ return (float)(settings_picture_get_tint_g() - TINT_MIN_VALUE)
+ / (TINT_MAX_VALUE - TINT_MIN_VALUE);
+}
+
void settings_picture_set_screen_adjust(int adj)
{
screen_adj = adj;
.style = STYLE_STATUS_BTN,
.disabled = EINA_FALSE,
.status = _get_picture_mode,
+ .progress_value = NULL,
+ .progress_evas = NULL,
.selected = _selected,
.selected_menu = _selected_menu
},
{
.id = MENU_CONTRAST,
.title = STR_CONTRAST,
- .style = STYLE_STATUS_BTN,
+ .style = STYLE_PROGRESS_BTN,
.disabled = EINA_FALSE,
.status = _get_contrast,
+ .progress_value = settings_picture_get_contrast_relative,
+ .progress_evas = NULL,
.selected = _selected,
.selected_menu = _selected_menu
},
{
.id = MENU_BRIGHTNESS,
.title = STR_BRIGHTNESS,
- .style = STYLE_STATUS_BTN,
+ .style = STYLE_PROGRESS_BTN,
.disabled = EINA_FALSE,
.status = _get_brightness,
+ .progress_value = settings_picture_get_brightness_relative,
+ .progress_evas = NULL,
.selected = _selected,
.selected_menu = _selected_menu
},
{
.id = MENU_SHARPNESS,
.title = STR_SHARPNESS,
- .style = STYLE_STATUS_BTN,
+ .style = STYLE_PROGRESS_BTN,
.disabled = EINA_FALSE,
.status = _get_sharpness,
+ .progress_value = settings_picture_get_sharpness_relative,
+ .progress_evas = NULL,
.selected = _selected,
.selected_menu = _selected_menu
},
{
.id = MENU_COLOR,
.title = STR_COLOR,
- .style = STYLE_STATUS_BTN,
+ .style = STYLE_PROGRESS_BTN,
.disabled = EINA_FALSE,
.status = _get_color,
+ .progress_value = settings_picture_get_color_relative,
+ .progress_evas = NULL,
.selected = _selected,
.selected_menu = _selected_menu
},
{
.id = MENU_TINT,
.title = STR_TINT,
- .style = STYLE_STATUS_BTN,
+ .style = STYLE_PROGRESS_BTN,
.disabled = EINA_FALSE,
.status = _get_tint,
+ .progress_value = settings_picture_get_tint_relative,
+ .progress_evas = NULL,
.selected = _selected,
.selected_menu = _selected_menu
},
.style = STYLE_STATUS_BTN,
.disabled = EINA_FALSE,
.status = _get_screen_adj,
+ .progress_value = NULL,
+ .progress_evas = NULL,
.selected = _selected,
.selected_menu = _selected_menu
},
char con_str[5] = {0, };
int con_val = settings_picture_get_contrast();
- snprintf(con_str, sizeof(con_str), "%d%%", con_val);
+ snprintf(con_str, sizeof(con_str), "%d", con_val);
return strdup(con_str);
}
if (b_val < 0)
return NULL;
- snprintf(b_str, sizeof(b_str), "%d%%", b_val);
+ snprintf(b_str, sizeof(b_str), "%d", b_val);
return strdup(b_str);
}
char sharp_str[5] = {0, };
int sharp_val = settings_picture_get_sharpness();
- snprintf(sharp_str, sizeof(sharp_str), "%d%%", sharp_val);
+ snprintf(sharp_str, sizeof(sharp_str), "%d", sharp_val);
return strdup(sharp_str);
}
char color_str[5] = {0, };
int color_val = settings_picture_get_color();
- snprintf(color_str, sizeof(color_str), "%d%%", color_val);
+ snprintf(color_str, sizeof(color_str), "%d", color_val);
return strdup(color_str);
}
char tint_str[10] = {0, };
int tint_val = settings_picture_get_tint_g();
- snprintf(tint_str, sizeof(tint_str), "G %d R %d", tint_val, 100 - tint_val);
+ snprintf(tint_str, sizeof(tint_str), "G%d R%d", tint_val, 100 - tint_val);
return strdup(tint_str);
}
g_slider_attr.slider_title = STR_BRIGHTNESS;
g_slider_attr.slider_min_val = 0;
g_slider_attr.slider_max_val = settings_picture_get_max_brightness();
- g_slider_attr.slider_cur_val = 100;
+ g_slider_attr.slider_cur_val = settings_picture_get_brightness();
g_slider_attr.set_setting_value = settings_picture_set_brightness;
g_slider_attr.get_setting_value = settings_picture_get_brightness;
attr->slider_min_val, attr->slider_max_val, attr->slider_step);
if (!priv->slider) {
_ERR("Add slider failed.");
- evas_object_del(priv->slider);
free(priv);
return NULL;
}