summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-11-10 16:10:28 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-11-23 13:04:12 +0900
commit0e52264ae0d0e9197e03115f65f30be1a064b6b9 (patch)
treeb8fca2c2f3edb8a6f5ca094f0032b7f71633ee3c /data
parentcb172de3dae148c0722b8d7d09aff6af57268637 (diff)
win: Add background part to the win border
Use Efl.Part for window to manipulate the background. Two part names are used in EDC: - elm.rect.background - elm.swallow.background For apps the part name is only "background". To set a solid color background (alpha is ok): efl_gfx_color_set(efl_part(win, "background"), r, g, b, a); To set an image: efl_file_set(efl_part(win, "background"), "image.jpg", NULL); To set an object: efl_content_set(efl_part(win, "background"), subobj); The solid bg is invisible by default, will become visible and use COPY render mode if a color is set. Standard window uses the swallow part. @feature
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/colorclasses.edc4
-rw-r--r--data/elementary/themes/edc/elm/border.edc68
2 files changed, 55 insertions, 17 deletions
diff --git a/data/elementary/themes/colorclasses.edc b/data/elementary/themes/colorclasses.edc
index ab6dc07..f273d34 100644
--- a/data/elementary/themes/colorclasses.edc
+++ b/data/elementary/themes/colorclasses.edc
@@ -386,6 +386,10 @@ color_classes {
386 color: FN_COL_DISABLE; 386 color: FN_COL_DISABLE;
387 desc: "Text of a disabled multibuttonentry item"; 387 desc: "Text of a disabled multibuttonentry item";
388 } 388 }
389 color_class { "elm/win/background";
390 color: 64 64 64 255;
391 desc: "Background color of a standard window";
392 }
389 393
390// modules 394// modules
391 color_class { name: "module_label"; 395 color_class { name: "module_label";
diff --git a/data/elementary/themes/edc/elm/border.edc b/data/elementary/themes/edc/elm/border.edc
index eb9584e..5f77f53 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -787,6 +787,7 @@ group { name: "elm/border/base/default";
787 images.image: "win_shadow.png" COMP; 787 images.image: "win_shadow.png" COMP;
788 data.item: "shadow" "1"; 788 data.item: "shadow" "1";
789 parts { 789 parts {
790 /* opaque region of the window, to inform the compositor */
790 spacer { "elm.spacer.opaque"; 791 spacer { "elm.spacer.opaque";
791 desc { 792 desc {
792 rel1.to: "top"; 793 rel1.to: "top";
@@ -798,6 +799,16 @@ group { name: "elm/border/base/default";
798 } 799 }
799 desc { "max"; inherit: "shaded"; } 800 desc { "max"; inherit: "shaded"; }
800 } 801 }
802 /* covers the entire client contents, including the main menu */
803 spacer { "elm.spacer.content";
804 required; // since 1.19
805 desc {
806 rel1.to: "top";
807 rel1.relative: 0.0 1.0;
808 rel2.to: "bottom";
809 rel2.relative: 1.0 0.0;
810 }
811 }
801 part { name: "shadow_clip"; type: RECT; mouse_events: 0; 812 part { name: "shadow_clip"; type: RECT; mouse_events: 0;
802 description { state: "default"; 813 description { state: "default";
803 rel1.to: "shadow"; 814 rel1.to: "shadow";
@@ -827,20 +838,42 @@ group { name: "elm/border/base/default";
827 rel2.to: "elm.swallow.client"; 838 rel2.to: "elm.swallow.client";
828 } 839 }
829 } 840 }
830 part { name: "client_clip"; type: RECT; mouse_events: 0; 841 rect { "client_clip";
831 description { state: "default" 0.0; 842 nomouse;
843 desc { "default";
832 rel1.to_y: "elm.swallow.client"; 844 rel1.to_y: "elm.swallow.client";
833 rel2.to_y: "elm.swallow.client"; 845 rel2.to_y: "elm.swallow.client";
834 } 846 }
835 /* description { state: "hidden" 0.0; */ 847 }
836 /* inherit: "default"; */ 848 rect { "bg_clip";
837 /* visible: 0; */ 849 nomouse;
838 /* } */ 850 desc { "default";
851 rel.to: "elm.spacer.content";
852 }
853 }
854 /* window background: solid color */
855 rect { "elm.rect.background";
856 required; // @since 1.19
857 clip: "bg_clip";
858 desc { "default";
859 color: 255 255 255 255;
860 color_class: "elm/win/background"; // FIXME: color_class naming scheme
861 visible: 0;
862 }
863 desc { "visible";
864 inherit: "default";
865 visible: 1;
866 }
867 }
868 /* window background: image */
869 swallow { "elm.swallow.background";
870 required; // @since 1.19
871 clip: "client_clip";
839 } 872 }
840 /* main menu */ 873 /* main menu */
841 rect { "menu_bg"; 874 rect { "menu_bg";
842 desc { "default"; 875 desc { "default";
843 color: 64 64 64 255; // FIXME color_class 876 color: 64 64 64 255; // FIXME: color_class
844 align: 0.5 0.0; 877 align: 0.5 0.0;
845 rel.to: "elm.swallow.menu"; 878 rel.to: "elm.swallow.menu";
846 } 879 }
@@ -860,16 +893,7 @@ group { name: "elm/border/base/default";
860 fixed: 0 1; 893 fixed: 0 1;
861 } 894 }
862 } 895 }
863 /* covers the entire client contents, including the main menu */ 896 /* application contents */
864 spacer { "elm.spacer.content";
865 required: 1; // since 1.19
866 desc {
867 rel1.to: "top";
868 rel1.relative: 0.0 1.0;
869 rel2.to: "bottom";
870 rel2.relative: 1.0 0.0;
871 }
872 }
873 part { name: "elm.swallow.client"; type: SWALLOW; 897 part { name: "elm.swallow.client"; type: SWALLOW;
874 clip_to: "client_clip"; 898 clip_to: "client_clip";
875 description { state: "default" 0.0; 899 description { state: "default" 0.0;
@@ -1384,6 +1408,16 @@ group { name: "elm/border/base/default";
1384 target: "shadow_clip"; 1408 target: "shadow_clip";
1385 } 1409 }
1386 program { 1410 program {
1411 signal: "elm,state,background,solid,on"; source: "elm";
1412 action: STATE_SET "visible" 0.0;
1413 target: "elm.rect.background";
1414 }
1415 program {
1416 signal: "elm,state,background,solid,off"; source: "elm";
1417 action: STATE_SET "default" 0.0;
1418 target: "elm.rect.background";
1419 }
1420 program {
1387 signal: "elm,action,focus"; source: "elm"; 1421 signal: "elm,action,focus"; source: "elm";
1388 action: STATE_SET "focused" 0.0; 1422 action: STATE_SET "focused" 0.0;
1389 target: "top"; 1423 target: "top";