@@ -8,158 +8,41 @@ template GeopardWindow: Adw.ApplicationWindow {
88
99 [content]
1010 Gtk.Box {
11- orientation: vertical;
12- Adw.Squeezer squeezer {
13- transition-type: crossfade;
14-
15- Adw.HeaderBar {
16- [start]
17- Gtk.Box {
18- Gtk.Button previous {
19- icon-name: "go-previous-symbolic";
20- action-name: "win.previous";
21- tooltip-text: _("Go back one page\nRight-click to show history");
22- }
23-
24- Gtk.Popover previous_popover {
25- autohide: true;
26- has-arrow: false;
27- }
28- }
29-
30- [start]
31- Gtk.Box {
32- Gtk.Button next {
33- icon-name: "go-next-symbolic";
34- action-name: "win.next";
35- tooltip-text: _("Go forward one page\nRight-click to show history");
36- }
37-
38- Gtk.Popover next_popover {
39- autohide: true;
40- has-arrow: false;
41- }
42- }
43-
44- [start]
45- Gtk.Button {
46- icon-name: "view-refresh-symbolic";
47- action-name: "win.reload";
48- tooltip-text: _("Reload current page");
49- }
50-
51- [start]
52- Gtk.Button {
53- icon-name: "tab-new-symbolic";
54- action-name: "win.new-tab";
55- tooltip-text: _("Open a new tab");
56- }
57-
58- [title]
59- Adw.Clamp {
60- maximum-size: 768;
61- tightening-threshold: 720;
62- width-request: 360;
63-
64- Gtk.SearchEntry url_bar {
65- hexpand: true;
66- placeholder-text: _("Enter Gemini address or search with Geminispace");
67- }
68- }
69-
70- [end]
71- Gtk.MenuButton primary_menu_btn {
72- icon-name: "open-menu";
73- menu-model: primary_menu;
74- tooltip-text: _("Main menu");
75- }
76- }
77-
78- Gtk.WindowHandle header_small {
79- Gtk.Box {
80- margin-top: 6;
81- margin-bottom: 6;
82- margin-start: 6;
83- margin-end: 6;
84- spacing: 6;
85- styles ["headerbar"]
86-
87- Gtk.WindowControls ws {
88- side: start;
89- visible: bind ws.empty inverted;
90- }
91-
92- [title]
93- Gtk.SearchEntry small_url_bar {
94- hexpand: true;
95- placeholder-text: _("Enter Gemini address or search with Geminispace");
96- }
97-
98- Gtk.WindowControls we {
99- side: end;
100- visible: bind we.empty inverted;
101- }
102- }
103- }
104- }
105-
106- Adw.TabBar tab_bar {
11+ Adw.TabOverview tab_overview {
10712 view: tab_view;
108- }
109-
110- Gtk.Overlay {
111- Adw.TabView tab_view {
112- vexpand: true;
113- hexpand: true;
114- }
115-
116- [overlay]
117- Gtk.ProgressBar progress_bar {
118- styles ["osd"]
119- valign: start;
120- text: bind GeopardWindow.progress;
121- }
122-
123- [overlay]
13+ enable-new-tab: true;
12414 Gtk.Box {
12515 orientation: vertical;
126- valign: end;
127-
128- Gtk.Box url_status_box {
129- visible: false;
130- styles ["background"]
131-
132- Gtk.Label url_status {
133- xalign: 0.0;
134- ellipsize: end;
135- margin-top: 6;
136- margin-bottom: 6;
137- margin-start: 6;
138- margin-end: 6;
139- }
140- }
141-
142- Gtk.Revealer bottom_bar_revealer {
143- transition-type: slide_up;
144- valign: end;
145-
146- [child]
147- Adw.HeaderBar bottom_bar {
148- show-end-title-buttons: false;
149- show-start-title-buttons: false;
16+ Adw.Squeezer squeezer {
17+ transition-type: crossfade;
15018
19+ Adw.HeaderBar {
15120 [start]
152- Gtk.Button {
153- icon-name: "go-previous-symbolic";
154- action-name: "win.previous";
155- tooltip-text: _("Go back one page\nRight-click to show history");
21+ Gtk.Box {
22+ Gtk.Button previous {
23+ icon-name: "go-previous-symbolic";
24+ action-name: "win.previous";
25+ tooltip-text: _("Go back one page\nRight-click to show history");
26+ }
27+
28+ Gtk.Popover previous_popover {
29+ autohide: true;
30+ has-arrow: false;
31+ }
15632 }
15733
15834 [start]
159- Gtk.Button {
160- icon-name: "go-next-symbolic";
161- action-name: "win.next";
162- tooltip-text: _("Go forward one page\nRight-click to show history");
35+ Gtk.Box {
36+ Gtk.Button next {
37+ icon-name: "go-next-symbolic";
38+ action-name: "win.next";
39+ tooltip-text: _("Go forward one page\nRight-click to show history");
40+ }
41+
42+ Gtk.Popover next_popover {
43+ autohide: true;
44+ has-arrow: false;
45+ }
16346 }
16447
16548 [start]
@@ -169,25 +52,150 @@ template GeopardWindow: Adw.ApplicationWindow {
16952 tooltip-text: _("Reload current page");
17053 }
17154
172- [title ]
55+ [start ]
17356 Gtk.Button {
174- icon-name: "system-search-symbolic";
175- action-name: "win.focus-url-bar";
176- tooltip-text: _("Start searching");
57+ icon-name: "tab-new-symbolic";
58+ action-name: "win.new-tab";
59+ tooltip-text: _("Open a new tab");
60+ }
61+
62+ [title]
63+ Adw.Clamp {
64+ maximum-size: 768;
65+ tightening-threshold: 720;
66+ width-request: 360;
67+
68+ Gtk.SearchEntry url_bar {
69+ hexpand: true;
70+ placeholder-text: _("Enter Gemini address or search with Geminispace");
71+ }
17772 }
17873
17974 [end]
180- Gtk.MenuButton {
75+ Gtk.MenuButton primary_menu_btn {
18176 icon-name: "open-menu";
18277 menu-model: primary_menu;
18378 tooltip-text: _("Main menu");
18479 }
80+ }
18581
186- [end]
187- Gtk.Button {
188- icon-name: "tab-new-symbolic";
189- action-name: "win.new-tab";
190- tooltip-text: _("Open a new tab");
82+ Gtk.WindowHandle header_small {
83+ Gtk.Box {
84+ margin-top: 6;
85+ margin-bottom: 6;
86+ margin-start: 6;
87+ margin-end: 6;
88+ spacing: 6;
89+ styles ["headerbar"]
90+
91+ Gtk.WindowControls ws {
92+ side: start;
93+ visible: bind ws.empty inverted;
94+ }
95+
96+ [title]
97+ Gtk.SearchEntry small_url_bar {
98+ hexpand: true;
99+ placeholder-text: _("Enter Gemini address or search with Geminispace");
100+ }
101+
102+ Gtk.WindowControls we {
103+ side: end;
104+ visible: bind we.empty inverted;
105+ }
106+ }
107+ }
108+ }
109+
110+ Gtk.Revealer tab_bar_revealer {
111+ Adw.TabBar tab_bar {
112+ view: tab_view;
113+ }
114+ }
115+
116+ Gtk.Overlay {
117+ Adw.TabView tab_view {
118+ vexpand: true;
119+ hexpand: true;
120+ }
121+
122+ [overlay]
123+ Gtk.ProgressBar progress_bar {
124+ styles ["osd"]
125+ valign: start;
126+ text: bind GeopardWindow.progress;
127+ }
128+
129+ [overlay]
130+ Gtk.Box {
131+ orientation: vertical;
132+ valign: end;
133+
134+ Gtk.Box url_status_box {
135+ visible: false;
136+ styles ["background"]
137+
138+ Gtk.Label url_status {
139+ xalign: 0.0;
140+ ellipsize: end;
141+ margin-top: 6;
142+ margin-bottom: 6;
143+ margin-start: 6;
144+ margin-end: 6;
145+ }
146+ }
147+
148+ Gtk.Revealer bottom_bar_revealer {
149+ transition-type: slide_up;
150+ valign: end;
151+
152+ [child]
153+ Adw.HeaderBar bottom_bar {
154+ show-end-title-buttons: false;
155+ show-start-title-buttons: false;
156+
157+ [start]
158+ Gtk.Button {
159+ icon-name: "go-previous-symbolic";
160+ action-name: "win.previous";
161+ tooltip-text: _("Go back one page\nRight-click to show history");
162+ }
163+
164+ [start]
165+ Gtk.Button {
166+ icon-name: "go-next-symbolic";
167+ action-name: "win.next";
168+ tooltip-text: _("Go forward one page\nRight-click to show history");
169+ }
170+
171+ [start]
172+ Gtk.Button {
173+ icon-name: "view-refresh-symbolic";
174+ action-name: "win.reload";
175+ tooltip-text: _("Reload current page");
176+ }
177+
178+ [title]
179+ Gtk.Button {
180+ icon-name: "system-search-symbolic";
181+ action-name: "win.focus-url-bar";
182+ tooltip-text: _("Start searching");
183+ }
184+
185+ [end]
186+ Gtk.MenuButton {
187+ icon-name: "open-menu";
188+ menu-model: primary_menu;
189+ tooltip-text: _("Main menu");
190+ }
191+
192+ [end]
193+ Gtk.Button {
194+ icon-name: "view-grid-symbolic";
195+ action-name: "overview.open";
196+ tooltip-text: _("Open tab overview");
197+ }
198+ }
191199 }
192200 }
193201 }
0 commit comments