@@ -11,164 +11,167 @@ template $BudsWindow : He.ApplicationWindow {
1111 Box {
1212 orientation: vertical;
1313
14- Bis.Album album {
15- can-navigate-back: true;
16- can-navigate-forward: true;
17- visible-child: listgrid;
18-
19- Bis.AlbumPage {
20- child:
21- He.SideBar listgrid {
22- show-back: false;
23- has-margins: false;
24- show-left-title-buttons: true;
25- show-right-title-buttons: bind album.folded;
26- width-request: 250;
27- title: He.ViewTitle {
28- label: _("Contacts");
29- };
30- scroller: sw;
31-
32- [titlebar-toggle]
33- ToggleButton search_button {
34- icon-name: "system-search-symbolic";
35- }
36- [titlebar-menu]
37- MenuButton {
38- icon-name: "open-menu-symbolic";
39- menu-model: primary_menu;
40- }
41-
42- SearchEntry search_entry {
43- margin-start: 18;
44- margin-end: 18;
45- margin-bottom: 6;
46- margin-top: 6;
47- placeholder-text: _("Search contacts…");
48- halign: start;
49- visible: bind search_button.active;
50-
51- styles [
52- "search",
53- "text-field"
54- ]
55- }
56-
57- ScrolledWindow sw {
58- hscrollbar-policy: never;
59- vexpand: true;
14+ Overlay about_overlay {
15+
16+ child: Bis.Album album {
17+ can-navigate-back: true;
18+ can-navigate-forward: true;
19+ visible-child: listgrid;
20+
21+ Bis.AlbumPage {
22+ child:
23+ He.SideBar listgrid {
24+ show-back: false;
25+ has-margins: false;
26+ show-left-title-buttons: true;
27+ show-right-title-buttons: bind album.folded;
28+ width-request: 250;
29+ title: He.ViewTitle {
30+ label: _("Contacts");
31+ };
32+ scroller: sw;
33+
34+ [titlebar-toggle]
35+ ToggleButton search_button {
36+ icon-name: "system-search-symbolic";
37+ }
38+ [titlebar-menu]
39+ MenuButton {
40+ icon-name: "open-menu-symbolic";
41+ menu-model: primary_menu;
42+ }
6043
61- ListBox contacts_listbox {
62- selection-mode: single;
44+ SearchEntry search_entry {
6345 margin-start: 18;
6446 margin-end: 18;
65- row-activated => $item_activated();
47+ margin-bottom: 6;
48+ margin-top: 6;
49+ placeholder-text: _("Search contacts…");
50+ halign: start;
51+ visible: bind search_button.active;
6652
6753 styles [
68- "content-list",
54+ "search",
55+ "text-field"
6956 ]
7057 }
71- }
72- }
73- ;
74- }
75-
76- Bis.AlbumPage {
77- child:
78- Box info {
79- orientation: vertical;
80- spacing: 0;
81- hexpand: true;
82-
83- styles [
84- "main-view",
85- ]
86-
87- He.AppBar info_title {
88- show-left-title-buttons: bind album.folded;
89- show-right-title-buttons: true;
90- show-back: bind album.folded;
91- }
9258
93- Stack stack {
94- StackPage {
95- name: "empty";
96- child:
97- He.EmptyPage empty_page {
98- title: _("No Selected Contact");
99- description: _("Select a contact to see info.");
100- icon: "system-users-symbolic";
59+ ScrolledWindow sw {
60+ hscrollbar-policy: never;
61+ vexpand: true;
62+
63+ ListBox contacts_listbox {
64+ selection-mode: single;
65+ margin-start: 18;
66+ margin-end: 18;
67+ row-activated => $item_activated();
68+
69+ styles [
70+ "content-list",
71+ ]
10172 }
102- ;
10373 }
74+ }
75+ ;
76+ }
10477
105- StackPage {
106- name: "info";
107- child:
108- Bis.Latch {
109- Box {
110- orientation: vertical;
111- spacing: 40;
112- vexpand: true;
113- halign: center;
114- margin-top: 70;
115- margin-bottom: 18;
116- margin-start: 18;
117- margin-end: 18;
118- width-request: 360;
119-
120- He.Avatar contact_image {
121- size: 128;
122- image: "";
123- halign: center;
124- }
78+ Bis.AlbumPage {
79+ child:
80+ Box info {
81+ orientation: vertical;
82+ spacing: 0;
83+ hexpand: true;
12584
126- Label contact_name {
127- styles [
128- "display",
129- ]
130- }
85+ styles [
86+ "main-view",
87+ ]
88+
89+ He.AppBar info_title {
90+ show-left-title-buttons: bind album.folded;
91+ show-right-title-buttons: true;
92+ show-back: bind album.folded;
93+ }
94+
95+ Stack stack {
96+ StackPage {
97+ name: "empty";
98+ child:
99+ He.EmptyPage empty_page {
100+ title: _("No Selected Contact");
101+ description: _("Select a contact to see info.");
102+ icon: "system-users-symbolic";
103+ }
104+ ;
105+ }
131106
107+ StackPage {
108+ name: "info";
109+ child:
110+ Bis.Latch {
132111 Box {
133112 orientation: vertical;
134- spacing: 6;
113+ spacing: 40;
114+ vexpand: true;
115+ halign: center;
116+ margin-top: 70;
117+ margin-bottom: 18;
118+ margin-start: 18;
119+ margin-end: 18;
120+ width-request: 360;
121+
122+ He.Avatar contact_image {
123+ size: 128;
124+ image: "";
125+ halign: center;
126+ }
127+
128+ Label contact_name {
129+ styles [
130+ "display",
131+ ]
132+ }
135133
136- He.MiniContentBlock phone_block {
137- visible: false;
138- title: _("Phone");
139- icon: "phone-symbolic";
134+ Box {
135+ orientation: vertical;
136+ spacing: 6;
140137
141- He.Button phone_button {
142- icon: "edit-copy-symbolic";
143- is-disclosure: true;
138+ He.MiniContentBlock phone_block {
139+ visible: false;
140+ title: _("Phone");
141+ icon: "phone-symbolic";
142+
143+ He.Button phone_button {
144+ icon: "edit-copy-symbolic";
145+ is-disclosure: true;
146+ }
144147 }
145- }
146148
147- He.MiniContentBlock email_block {
148- visible: false;
149- title: _("Email");
150- icon: "mail-archive-symbolic";
149+ He.MiniContentBlock email_block {
150+ visible: false;
151+ title: _("Email");
152+ icon: "mail-archive-symbolic";
151153
152- He.Button email_button {
153- icon: "edit-copy-symbolic";
154- is-disclosure: true;
154+ He.Button email_button {
155+ icon: "edit-copy-symbolic";
156+ is-disclosure: true;
157+ }
155158 }
156- }
157159
158- He.MiniContentBlock bday_block {
159- visible: false;
160- title: _("Birthday");
161- icon: "x-office-calendar-symbolic";
160+ He.MiniContentBlock bday_block {
161+ visible: false;
162+ title: _("Birthday");
163+ icon: "x-office-calendar-symbolic";
164+ }
162165 }
163166 }
164167 }
168+ ;
165169 }
166- ;
167170 }
168171 }
172+ ;
169173 }
170- ;
171- }
174+ };
172175 }
173176 }
174177}
0 commit comments