summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-11-28 15:43:25 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-11-28 15:52:09 +0900
commit8a213847596376305d282e1ba26080b548a207f9 (patch)
treeb1ab18e07d33af30773afd6e71594db10c79a1fe /data
parent51ba193bdad7a8d1c3ac651dbee6551418f5e238 (diff)
win: Move main menu back to win.edc (fix sizing)
As Andy reported, the main menu geometry is not correct after my recent changes, as the application contents slide underneath the menu bar. In fact the menu bar is just floating above everything else. So I've tried to move the menu to the framespace (as it should belong to the frame), but the sizing algos for both the window and the menu make some assumptions that render this task quite difficult. Eventually I would like to be able to swallow the menu somewhere else inside the border... but not right now.
Diffstat (limited to 'data')
-rw-r--r--data/elementary/themes/edc/elm/border.edc43
-rw-r--r--data/elementary/themes/edc/elm/win.edc40
2 files changed, 45 insertions, 38 deletions
diff --git a/data/elementary/themes/edc/elm/border.edc b/data/elementary/themes/edc/elm/border.edc
index 1c5a25d..72e84ab 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -1,10 +1,12 @@
1/* Window client-side decorations and extra slots 1/* Window client-side decorations and extra slots
2 * Includes swallows for: 2 * Includes swallows for:
3 * - app content 3 * - app content
4 * - main menu
5 * - indicator 4 * - indicator
6 * - soft key 5 * - soft key
7 * - virtual keyboard 6 * - virtual keyboard
7 *
8 * Not included:
9 * - main menu (sizing issues - needs rework of the menu itself)
8 */ 10 */
9 11
10group { name: "elm/border/base/default"; 12group { name: "elm/border/base/default";
@@ -91,34 +93,11 @@ group { name: "elm/border/base/default";
91 required; // @since 1.19 93 required; // @since 1.19
92 clip: "client_clip"; 94 clip: "client_clip";
93 } 95 }
94 /* main menu */
95 rect { "menu_bg";
96 desc { "default";
97 color: 64 64 64 255; // FIXME: color_class
98 align: 0.5 0.0;
99 rel.to: "elm.swallow.menu";
100 }
101 }
102 swallow { "elm.swallow.menu";
103 required: 1; // since 1.19
104 desc { "default";
105 rel.to: "top_clip";
106 rel1.relative: 0.0 1.0;
107 rel1.offset: 0 -1;
108 visible: 0;
109 align: 0.5 0.0;
110 fixed: 1 1;
111 }
112 desc { "visible"; inherit: "default";
113 visible: 1;
114 fixed: 0 1;
115 }
116 }
117 96
118 /* application contents - spacer and clipper (without main menu) */ 97 /* application contents - spacer and clipper */
119 spacer { "client_spacer"; 98 spacer { "client_spacer";
120 desc { "default"; 99 desc { "default";
121 rel1.to: "elm.swallow.menu"; 100 rel1.to: "top_clip";
122 rel1.relative: 0.0 1.0; 101 rel1.relative: 0.0 1.0;
123 rel2.to: "bottom_clip"; 102 rel2.to: "bottom_clip";
124 rel2.relative: 1.0 0.0; 103 rel2.relative: 1.0 0.0;
@@ -805,18 +784,6 @@ group { name: "elm/border/base/default";
805 UNSET_MODE(MAXIMIZED); 784 UNSET_MODE(MAXIMIZED);
806 } 785 }
807 786
808 /* application desktop menu */
809 program { name: "show_menu";
810 signal: "elm,action,show_menu"; source: "elm";
811 action: STATE_SET "visible";
812 target: "elm.swallow.menu";
813 }
814 program { name: "hide_menu";
815 signal: "elm,action,hide"; source: "elm";
816 action: STATE_SET "default";
817 target: "elm.swallow.menu";
818 }
819
820 /* modal windows */ 787 /* modal windows */
821 program { name: "hide_blocker"; 788 program { name: "hide_blocker";
822 signal: "elm,action,hide_blocker"; source: "elm"; 789 signal: "elm,action,hide_blocker"; source: "elm";
diff --git a/data/elementary/themes/edc/elm/win.edc b/data/elementary/themes/edc/elm/win.edc
index 8c6a08d..2c5e0dd 100644
--- a/data/elementary/themes/edc/elm/win.edc
+++ b/data/elementary/themes/edc/elm/win.edc
@@ -1,6 +1,28 @@
1group { name: "elm/win/base/default"; 1group { name: "elm/win/base/default";
2 data.item: "elm_win_version" "119"; 2 data.item: "elm_win_version" "119";
3 parts { 3 parts {
4 /* main menu */
5 part { name: "menu_bg"; type: RECT;
6 description { state: "default" 0.0;
7 color: 64 64 64 255;
8 align: 0.5 0;
9 rel2.to: "elm.swallow.menu";
10 }
11 }
12 part { name: "elm.swallow.menu"; type: SWALLOW;
13 description { state: "default" 0.0;
14 rel2.relative: 1.0 0.0;
15 visible: 0;
16 align: 0.5 0;
17 fixed: 1 1;
18 }
19 description { state: "visible" 0.0;
20 inherit: "default" 0.0;
21 visible: 1;
22 fixed: 0 1;
23 }
24 }
25 /* application content */
4 rect { "client_clip"; nomouse; 26 rect { "client_clip"; nomouse;
5 desc { "default"; 27 desc { "default";
6 rel.to: "elm.swallow.contents"; 28 rel.to: "elm.swallow.contents";
@@ -8,6 +30,24 @@ group { name: "elm/win/base/default";
8 } 30 }
9 swallow { "elm.swallow.contents"; 31 swallow { "elm.swallow.contents";
10 clip_to: "client_clip"; 32 clip_to: "client_clip";
33 desc { "default";
34 rel1.to: "elm.swallow.menu";
35 rel1.relative: 0.0 1.0;
36 }
37 }
38 }
39 programs {
40 program { name: "show_menu";
41 signal: "elm,action,show_menu";
42 source: "elm";
43 action: STATE_SET "visible" 0.0;
44 target: "elm.swallow.menu";
45 }
46 program { name: "hide_menu";
47 signal: "elm,action,hide";
48 source: "elm";
49 action: STATE_SET "default" 0.0;
50 target: "elm.swallow.menu";
11 } 51 }
12 } 52 }
13} 53}