summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorGustavo Lima Chaves <glima@profusion.mobi>2010-11-18 10:00:26 +0000
committerGustavo Lima Chaves <glima@profusion.mobi>2010-11-18 10:00:26 +0000
commitb461b44d41347223506747a79a8b2c9b944aee52 (patch)
treee8b8dcca4c4a1de0431393557181bc80e9b2a92e /src/bin
parentc0a91f492e66cf32815a0e0ba578895d57c5a9bf (diff)
Elm config app sizing change (matching Elm test's size) and cosmetic
fixes. SVN revision: 54677
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/config.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/bin/config.c b/src/bin/config.c
index 7c0a5add1..28ab7b44a 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -440,21 +440,21 @@ _theme_sel(void *data, Evas_Object *obj, void *event_info __UNUSED__)
440static void 440static void
441_status_config_sizing(Evas_Object *win, Evas_Object *pager) 441_status_config_sizing(Evas_Object *win, Evas_Object *pager)
442{ 442{
443 Evas_Object *lb, *pd, *bx2, *sl, *sp; 443 Evas_Object *lb, *pd, *bx, *sl, *sp;
444 444
445 bx2 = elm_box_add(win); 445 bx = elm_box_add(win);
446 evas_object_size_hint_weight_set(bx2, 1.0, 0.0); 446 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
447 evas_object_size_hint_align_set(bx2, EVAS_HINT_FILL, 0.5); 447 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
448 448
449 pd = elm_frame_add(win); 449 pd = elm_frame_add(win);
450 evas_object_size_hint_weight_set(pd, 1.0, 0.0); 450 evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
451 evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5); 451 evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
452 elm_object_style_set(pd, "pad_medium"); 452 elm_object_style_set(pd, "pad_medium");
453 elm_box_pack_end(bx2, pd); 453 elm_box_pack_end(bx, pd);
454 evas_object_show(pd); 454 evas_object_show(pd);
455 455
456 lb = elm_label_add(win); 456 lb = elm_label_add(win);
457 evas_object_size_hint_weight_set(lb, 1.0, 0.0); 457 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
458 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); 458 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
459 elm_label_label_set(lb,"<hilight>Scale</>"); 459 elm_label_label_set(lb,"<hilight>Scale</>");
460 elm_frame_content_set(pd, lb); 460 elm_frame_content_set(pd, lb);
@@ -462,14 +462,14 @@ _status_config_sizing(Evas_Object *win, Evas_Object *pager)
462 462
463 sl = elm_slider_add(win); 463 sl = elm_slider_add(win);
464 evas_object_data_set(win, "scale_slider", sl); 464 evas_object_data_set(win, "scale_slider", sl);
465 evas_object_size_hint_weight_set(sl, 1.0, 0.0); 465 evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
466 evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5); 466 evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
467 elm_slider_span_size_set(sl, 120); 467 elm_slider_span_size_set(sl, 120);
468 elm_slider_unit_format_set(sl, "%1.2f"); 468 elm_slider_unit_format_set(sl, "%1.2f");
469 elm_slider_indicator_format_set(sl, "%1.2f"); 469 elm_slider_indicator_format_set(sl, "%1.2f");
470 elm_slider_min_max_set(sl, 0.25, 5.0); 470 elm_slider_min_max_set(sl, 0.25, 5.0);
471 elm_slider_value_set(sl, elm_scale_get()); 471 elm_slider_value_set(sl, elm_scale_get());
472 elm_box_pack_end(bx2, sl); 472 elm_box_pack_end(bx, sl);
473 evas_object_show(sl); 473 evas_object_show(sl);
474 474
475 evas_object_smart_callback_add(sl, "changed", sc_round, NULL); 475 evas_object_smart_callback_add(sl, "changed", sc_round, NULL);
@@ -477,20 +477,20 @@ _status_config_sizing(Evas_Object *win, Evas_Object *pager)
477 477
478 sp = elm_separator_add(win); 478 sp = elm_separator_add(win);
479 elm_separator_horizontal_set(sp, 1); 479 elm_separator_horizontal_set(sp, 1);
480 evas_object_size_hint_weight_set(sp, 1.0, 0.0); 480 evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, 0.0);
481 evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5); 481 evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5);
482 elm_box_pack_end(bx2, sp); 482 elm_box_pack_end(bx, sp);
483 evas_object_show(sp); 483 evas_object_show(sp);
484 484
485 pd = elm_frame_add(win); 485 pd = elm_frame_add(win);
486 evas_object_size_hint_weight_set(pd, 1.0, 0.0); 486 evas_object_size_hint_weight_set(pd, EVAS_HINT_EXPAND, 0.0);
487 evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5); 487 evas_object_size_hint_align_set(pd, EVAS_HINT_FILL, 0.5);
488 elm_object_style_set(pd, "pad_medium"); 488 elm_object_style_set(pd, "pad_medium");
489 elm_box_pack_end(bx2, pd); 489 elm_box_pack_end(bx, pd);
490 evas_object_show(pd); 490 evas_object_show(pd);
491 491
492 lb = elm_label_add(win); 492 lb = elm_label_add(win);
493 evas_object_size_hint_weight_set(lb, 1.0, 0.0); 493 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
494 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); 494 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
495 elm_label_label_set(lb, "<hilight>Finger Size</><br>"); 495 elm_label_label_set(lb, "<hilight>Finger Size</><br>");
496 elm_frame_content_set(pd, lb); 496 elm_frame_content_set(pd, lb);
@@ -498,22 +498,22 @@ _status_config_sizing(Evas_Object *win, Evas_Object *pager)
498 498
499 sl = elm_slider_add(win); 499 sl = elm_slider_add(win);
500 evas_object_data_set(win, "fs_slider", sl); 500 evas_object_data_set(win, "fs_slider", sl);
501 evas_object_size_hint_weight_set(sl, 1.0, 0.0); 501 evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
502 evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5); 502 evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
503 elm_slider_span_size_set(sl, 120); 503 elm_slider_span_size_set(sl, 120);
504 elm_slider_unit_format_set(sl, "%1.0f"); 504 elm_slider_unit_format_set(sl, "%1.0f");
505 elm_slider_indicator_format_set(sl, "%1.0f"); 505 elm_slider_indicator_format_set(sl, "%1.0f");
506 elm_slider_min_max_set(sl, 5, 200); 506 elm_slider_min_max_set(sl, 5, 200);
507 elm_slider_value_set(sl, elm_finger_size_get()); 507 elm_slider_value_set(sl, elm_finger_size_get());
508 elm_box_pack_end(bx2, sl); 508 elm_box_pack_end(bx, sl);
509 evas_object_show(sl); 509 evas_object_show(sl);
510 510
511 evas_object_smart_callback_add(sl, "changed", fs_round, NULL); 511 evas_object_smart_callback_add(sl, "changed", fs_round, NULL);
512 evas_object_smart_callback_add(sl, "delay,changed", fs_change, NULL); 512 evas_object_smart_callback_add(sl, "delay,changed", fs_change, NULL);
513 513
514 evas_object_data_set(win, "sizing", bx2); 514 evas_object_data_set(win, "sizing", bx);
515 515
516 elm_pager_content_push(pager, bx2); 516 elm_pager_content_push(pager, bx);
517} 517}
518 518
519static Evas_Object * 519static Evas_Object *
@@ -591,7 +591,7 @@ _sample_theme_new(Evas_Object *win)
591 elm_list_go(li); 591 elm_list_go(li);
592 592
593 rc = evas_object_rectangle_add(evas_object_evas_get(win)); 593 rc = evas_object_rectangle_add(evas_object_evas_get(win));
594 evas_object_size_hint_min_set(rc, 120, 120); 594 evas_object_size_hint_min_set(rc, 160, 120);
595 elm_table_pack(base, rc, 0, 4, 2, 1); 595 elm_table_pack(base, rc, 0, 4, 2, 1);
596 596
597 return base; 597 return base;
@@ -609,11 +609,11 @@ _status_config_themes(Evas_Object *win, Evas_Object *pager)
609 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL); 609 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
610 610
611 rc = evas_object_rectangle_add(evas_object_evas_get(win)); 611 rc = evas_object_rectangle_add(evas_object_evas_get(win));
612 evas_object_size_hint_min_set(rc, 240, 120); 612 evas_object_size_hint_min_set(rc, 320, 120);
613 elm_table_pack(tb, rc, 0, 0, 1, 1); 613 elm_table_pack(tb, rc, 0, 0, 1, 1);
614 614
615 rc = evas_object_rectangle_add(evas_object_evas_get(win)); 615 rc = evas_object_rectangle_add(evas_object_evas_get(win));
616 evas_object_size_hint_min_set(rc, 240, 240); 616 evas_object_size_hint_min_set(rc, 320, 240);
617 elm_table_pack(tb, rc, 0, 1, 1, 1); 617 elm_table_pack(tb, rc, 0, 1, 1, 1);
618 618
619 ///////////////////////////////////////////// 619 /////////////////////////////////////////////
@@ -1279,6 +1279,7 @@ status_win(void)
1279 else if (0) _status_config(win, bx0); 1279 else if (0) _status_config(win, bx0);
1280 else _status_config_full(win, bx0); 1280 else _status_config_full(win, bx0);
1281 1281
1282 evas_object_resize(win, 320, 480);
1282 evas_object_show(win); 1283 evas_object_show(win);
1283} 1284}
1284 1285