@@ -2,61 +2,104 @@ using Gtk 4.0;
22using Adw 1;
33
44template $SSHKeyManagerDialog: Adw.Dialog {
5+ Adw.Breakpoint {
6+ condition ("max-width: 900sp")
7+
8+ setters {
9+ header_actions.hexpand: true;
10+ header_actions.halign: fill;
11+ generate_button.hexpand: true;
12+ import_button.hexpand: true;
13+ }
14+ }
15+
16+ Adw.Breakpoint {
17+ condition ("max-width: 640sp")
18+
19+ setters {
20+ header_actions.orientation: vertical;
21+
22+ header_actions.spacing: 8;
23+ footer_actions.orientation: vertical;
24+ footer_actions.halign: fill;
25+ copy_pub_button.hexpand: true;
26+ reveal_button.hexpand: true;
27+ delete_button.hexpand: true;
28+ }
29+ }
30+
31+
532 Adw.ToastOverlay toast_overlay {
633 Adw.ToolbarView {
7- width-request: 860 ;
8- height-request: 620 ;
34+ width-request: 360 ;
35+ height-request: 360 ;
936
1037 [top]
1138 Adw.HeaderBar {
1239 [title]
13- Adw.ViewSwitcher { policy: wide; stack: stack; }
40+ Adw.ViewSwitcherTitle switcher_title {
41+ stack: stack;
42+ title: _("SSH Key Manager");
43+ }
1444
1545 [end]
16- Box {
46+ Box header_actions {
1747 spacing: 6;
18- Button generate_button { label: _("Generate…"); css-classes: ["suggested-action"]; }
19- Button import_button { label: _("Import…"); }
48+ Button generate_button { label: _("Generate…"); css-classes: ["suggested-action"]; hexpand: false; }
49+ Button import_button { label: _("Import…"); hexpand: false; }
2050 }
2151 }
2252
23- content: Box {
24- orientation: vertical;
25- margin-start: 12; margin-end: 12; margin-top: 12; margin-bottom: 12; spacing: 12;
26-
27- Adw.ViewStack stack {
28- vexpand: true;
29-
30- Adw.ViewStackPage {
31- name: "private";
32- title: _("Private Keys");
33- icon-name: "dialog-password-symbolic";
34- child: Adw.Clamp {
35- maximum-size: 900; tightening-threshold: 600;
36- child: ScrolledWindow { vexpand: true; hexpand: true; has-frame: false;
37- ListBox private_list { selection-mode: single; vexpand: true; hexpand: true; css-classes: ["boxed-list"]; }
53+ content: Adw.Clamp {
54+ maximum-size: 960;
55+ tightening-threshold: 720;
56+ child: Box {
57+ orientation: vertical;
58+ margin-start: 12;
59+ margin-end: 12;
60+ margin-top: 12;
61+ margin-bottom: 12;
62+ spacing: 12;
63+
64+ Adw.ViewStack stack {
65+ vexpand: true;
66+
67+ Adw.ViewStackPage {
68+ name: "private";
69+ title: _("Private Keys");
70+ icon-name: "dialog-password-symbolic";
71+ child: Adw.Clamp {
72+ maximum-size: 900; tightening-threshold: 640;
73+ child: ScrolledWindow { vexpand: true; hexpand: true; has-frame: false;
74+ ListBox private_list { selection-mode: single; vexpand: true; hexpand: true; css-classes: ["boxed-list"]; }
75+ };
3876 };
39- };
40- }
77+ }
4178
42- Adw.ViewStackPage {
43- name: "public";
44- title: _("Public Keys");
45- icon-name: "user-info-symbolic";
46- child: Adw.Clamp {
47- maximum-size: 900; tightening-threshold: 600;
48- child: ScrolledWindow { vexpand: true; hexpand: true; has-frame: false;
49- ListBox public_list { selection-mode: single; vexpand: true; hexpand: true; css-classes: ["boxed-list"]; }
79+ Adw.ViewStackPage {
80+ name: "public";
81+ title: _("Public Keys");
82+ icon-name: "user-info-symbolic";
83+ child: Adw.Clamp {
84+ maximum-size: 900; tightening-threshold: 640;
85+ child: ScrolledWindow { vexpand: true; hexpand: true; has-frame: false;
86+ ListBox public_list { selection-mode: single; vexpand: true; hexpand: true; css-classes: ["boxed-list"]; }
87+ };
5088 };
51- };
89+ }
5290 }
53- }
5491
55- Box { orientation: horizontal; halign: end; spacing: 6;
56- Button copy_pub_button { label: _("Copy Public Key"); }
57- Button reveal_button { label: _("Reveal in Files"); }
58- Button delete_button { label: _("Delete"); css-classes: ["destructive-action"]; }
59- }
92+ Adw.ViewSwitcherBar switcher_bar {
93+ stack: stack;
94+ reveal: bind switcher_title.title-visible;
95+ }
96+
97+ Box footer_actions { orientation: horizontal; halign: end; spacing: 6;
98+ Button copy_pub_button { label: _("Copy Public Key"); }
99+ Button reveal_button { label: _("Reveal in Files"); }
100+ Button delete_button { label: _("Delete"); css-classes: ["destructive-action"]; }
101+ }
102+ };
60103 };
61104 }
62105 }
0 commit comments