11/*
22* SPDX-License-Identifier: GPL-3.0-or-later
3- * SPDX-FileCopyrightText: 2021 Your Name <you@email .com>
3+ * SPDX-FileCopyrightText: 2024 Alain <Alainmh23@gmail .com>
44*/
55
66public class MainWindow : Gtk .ApplicationWindow {
@@ -22,14 +22,46 @@ public class MainWindow : Gtk.ApplicationWindow {
2222 }
2323
2424 construct {
25- var dir = Environment . get_user_data_dir ();
26- print (" DIR: %s " . printf (dir));
27-
2825 var headerbar = new Gtk .HeaderBar () {
2926 title_widget = new Gtk .Label (null ),
3027 hexpand = true
3128 };
3229
30+ var project_icon = new Gtk .Image .from_icon_name (" applications-development" ) {
31+ pixel_size = 96
32+ };
33+
34+ var title_label = new Gtk .Label (_(" App Generator" ));
35+ title_label. add_css_class (Granite . STYLE_CLASS_H1_LABEL );
36+
37+ var description_label = new Gtk .Label (_(" Create an elementary OS app using one of the pre-made app templates" )) {
38+ wrap = true ,
39+ justify = CENTER
40+ };
41+ description_label. add_css_class (Granite . STYLE_CLASS_DIM_LABEL );
42+
43+ var left_box = new Gtk .Box (Gtk . Orientation . VERTICAL , 6 ) {
44+ valign = CENTER ,
45+ hexpand = true ,
46+ margin_start = 24 ,
47+ margin_end = 24 ,
48+ margin_bottom = 24
49+ };
50+ left_box. append (project_icon);
51+ left_box. append (title_label);
52+ left_box. append (description_label);
53+
54+ var stepper = new Widgets .Stepper () {
55+ margin_start = 24
56+ };
57+ stepper. add_step (" 1" , _(" App Type" ));
58+ stepper. add_step (" 2" , _(" Developer Data" ));
59+ stepper. add_step (" 3" , _(" Application Data" ));
60+
61+ stepper. activeStepChange. connect (() = > {
62+ print (" Index %d\n " . printf (stepper. active_index));
63+ });
64+
3365 var form_view = new Views .Form ();
3466 var success_view = new Views .Success ();
3567
@@ -39,9 +71,30 @@ public class MainWindow : Gtk.ApplicationWindow {
3971 main_stack. add_named (form_view, " form" );
4072 main_stack. add_named (success_view, " success" );
4173
74+ var form_box = new Gtk .Box (Gtk . Orientation . VERTICAL , 6 );
75+ form_box. append (stepper);
76+ form_box. append (new Gtk .Separator (Gtk . Orientation . HORIZONTAL ) {
77+ margin_start = 24 ,
78+ margin_end = 24 ,
79+ margin_top = 12 ,
80+ margin_bottom = 12
81+ });
82+ form_box. append (main_stack);
83+
84+ var main_box = new Gtk .CenterBox () {
85+ hexpand = true ,
86+ vexpand = true
87+ };
88+
89+ main_box. start_widget = left_box;
90+ main_box. center_widget = new Gtk .Separator (Gtk . Orientation . VERTICAL ) {
91+ margin_bottom = 32
92+ };
93+ main_box. end_widget = form_box;
94+
4295 var toolbar_view = new Adw .ToolbarView ();
4396 toolbar_view. add_top_bar (headerbar);
44- toolbar_view. content = main_stack ;
97+ toolbar_view. content = main_box ;
4598
4699 child = toolbar_view;
47100
0 commit comments