Skip to content

Commit 84a3728

Browse files
format blueprints
1 parent 35eb5e2 commit 84a3728

12 files changed

+463
-306
lines changed

data/ui/background_selector.blp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
using Gtk 4.0;
22
using Adw 1;
33

4-
template $GradiaBackgroundSelector : Adw.Bin {
4+
template $GradiaBackgroundSelector: Adw.Bin {
55
child: Gtk.Box container {
66
orientation: vertical;
77

88
Adw.ToggleGroup toggle_group {
99
homogeneous: false;
10-
1110
notify::active-name => $_on_group_changed();
1211

1312
Adw.Toggle none_toggle {
@@ -33,16 +32,18 @@ template $GradiaBackgroundSelector : Adw.Bin {
3332
label: _("_Image");
3433
use-underline: true;
3534
}
36-
35+
3736
styles [
38-
"round"
37+
"round",
3938
]
4039
}
40+
4141
Revealer stack_revealer {
4242
transition-type: slide_up;
4343
transition-duration: 250;
44+
4445
Gtk.Stack stack {
45-
margin-top:12;
46+
margin-top: 12;
4647
transition-type: crossfade;
4748
transition-duration: 250;
4849
hexpand: true;
@@ -51,3 +52,4 @@ template $GradiaBackgroundSelector : Adw.Bin {
5152
}
5253
};
5354
}
55+

data/ui/confirm_close_dialog.blp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
using Gtk 4.0;
22
using Adw 1;
33

4-
template $GradiaConfirmCloseDialog : Adw.AlertDialog {
4+
template $GradiaConfirmCloseDialog: Adw.AlertDialog {
55
heading: _("Close Gradia?");
66
body: _("Are you sure you want to exit? All unsaved changes will be lost.");
77
close-response: "cancel";
8-
prefer-wide-layout:true;
8+
prefer-wide-layout: true;
99

1010
responses [
1111
cancel: _("Cancel"),
@@ -27,7 +27,8 @@ template $GradiaConfirmCloseDialog : Adw.AlertDialog {
2727
}
2828

2929
styles [
30-
"boxed-list"
30+
"boxed-list",
3131
]
3232
};
3333
}
34+

data/ui/drawing_tools_group.blp

Lines changed: 85 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,127 @@
11
using Gtk 4.0;
22

3-
template $GradiaDrawingToolsGroup : Box {
3+
template $GradiaDrawingToolsGroup: Box {
44
orientation: vertical;
55

66
Text {
77
text: _("Annotation Tools");
8-
margin-bottom:12;
9-
sensitive:false;
10-
11-
styles ["heading", "h4"]
8+
margin-bottom: 12;
9+
sensitive: false;
1210

11+
styles [
12+
"heading",
13+
"h4",
14+
]
1315
}
1416

1517
$GradiaDrawingToolsGrid drawing_tools_grid {
1618
tool-changed => $on_tool_changed();
1719
}
1820

1921
$GradiaQuickColorPicker color_picker {
20-
margin-top:6;
22+
margin-top: 6;
2123
color-changed => $on_primary_color_changed();
2224
}
2325

2426
Scale size_scale {
25-
orientation: horizontal;
26-
margin-bottom: 6;
27-
margin-top: 6;
28-
adjustment: Adjustment {
29-
value-changed => $on_size_scale_changed();
30-
lower: 3;
31-
upper: 25;
32-
value: 14;
33-
step-increment: 2;
34-
};
27+
orientation: horizontal;
28+
margin-bottom: 6;
29+
margin-top: 6;
30+
31+
adjustment: Adjustment {
32+
value-changed => $on_size_scale_changed();
33+
lower: 3;
34+
upper: 25;
35+
value: 14;
36+
step-increment: 2;
37+
};
3538
}
39+
3640
Revealer extra_stack_revealer {
3741
reveal-child: true;
3842
transition-type: slide_up;
3943
transition-duration: 200;
40-
margin-bottom:6;
44+
margin-bottom: 6;
4145
valign: start;
46+
4247
child: Stack extra_stack {
4348
transition-type: crossfade;
4449
transition-duration: 200;
4550

4651
StackPage {
47-
name: "empty";
48-
child: Box {
49-
visible: true;
50-
};
52+
name: "empty";
53+
54+
child: Box {
55+
visible: true;
56+
};
5157
}
5258

5359
StackPage {
54-
name: "fill";
55-
child:Box {
56-
spacing: 6;
57-
homogeneous: true;
58-
59-
$GradiaSimpleColorPicker fill_0 {
60-
icon-name: "fill-symbolic";
61-
text: _("Fill");
62-
hexpand: true;
63-
color-changed => $on_fill_color_changed();
64-
}
65-
};
60+
name: "fill";
61+
62+
child: Box {
63+
spacing: 6;
64+
homogeneous: true;
65+
66+
$GradiaSimpleColorPicker fill_0 {
67+
icon-name: "fill-symbolic";
68+
text: _("Fill");
69+
hexpand: true;
70+
color-changed => $on_fill_color_changed();
71+
}
72+
};
6673
}
6774

6875
StackPage {
69-
name: "fill-border";
70-
child:Box {
71-
spacing: 6;
72-
homogeneous: true;
73-
74-
$GradiaSimpleColorPicker fill_1 {
75-
icon-name: "fill-symbolic";
76-
text: _("Fill");
77-
hexpand: true;
78-
color-changed => $on_fill_color_changed();
79-
}
80-
81-
$GradiaSimpleColorPicker outline_1 {
82-
icon-name: "outline-color-symbolic";
83-
text: _("Border");
84-
hexpand: true;
85-
color-changed => $on_outline_color_changed();
86-
}
87-
};
76+
name: "fill-border";
77+
78+
child: Box {
79+
spacing: 6;
80+
homogeneous: true;
81+
82+
$GradiaSimpleColorPicker fill_1 {
83+
icon-name: "fill-symbolic";
84+
text: _("Fill");
85+
hexpand: true;
86+
color-changed => $on_fill_color_changed();
87+
}
88+
89+
$GradiaSimpleColorPicker outline_1 {
90+
icon-name: "outline-color-symbolic";
91+
text: _("Border");
92+
hexpand: true;
93+
color-changed => $on_outline_color_changed();
94+
}
95+
};
8896
}
8997

9098
StackPage {
91-
name: "text";
92-
child: Box {
93-
spacing: 6;
94-
95-
$GradiaSimpleColorPicker fill_2 {
96-
icon-name: "fill-symbolic";
97-
hexpand: true;
98-
color-changed => $on_fill_color_changed();
99-
tooltip-text: _("Fill Color Picker");
100-
}
101-
102-
$GradiaSimpleColorPicker outline_2 {
103-
icon-name: "outline-color-symbolic";
104-
hexpand: true;
105-
color-changed => $on_outline_color_changed();
106-
tooltip-text: _("Outline Color Picker");
107-
}
108-
109-
$GradiaFontDropdown font_dropdown {
110-
width-request:160;
111-
font-changed => $on_font_changed();
112-
}
113-
};
99+
name: "text";
100+
101+
child: Box {
102+
spacing: 6;
103+
104+
$GradiaSimpleColorPicker fill_2 {
105+
icon-name: "fill-symbolic";
106+
hexpand: true;
107+
color-changed => $on_fill_color_changed();
108+
tooltip-text: _("Fill Color Picker");
109+
}
110+
111+
$GradiaSimpleColorPicker outline_2 {
112+
icon-name: "outline-color-symbolic";
113+
hexpand: true;
114+
color-changed => $on_outline_color_changed();
115+
tooltip-text: _("Outline Color Picker");
116+
}
117+
118+
$GradiaFontDropdown font_dropdown {
119+
width-request: 160;
120+
font-changed => $on_font_changed();
121+
}
122+
};
114123
}
115124
};
116125
}
117126
}
127+

data/ui/gradient_step_dialog.blp

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,63 @@
11
using Gtk 4.0;
22
using Adw 1;
3+
34
template $GradiaGradientStepDialog: Adw.Dialog {
45
can-close: true;
5-
content-height:420;
6-
content-width:400;
6+
content-height: 420;
7+
content-width: 400;
78
title: _("Edit Gradient Steps");
9+
810
child: Adw.ToolbarView {
911
[top]
1012
Adw.HeaderBar header_bar {
1113
show-end-title-buttons: true;
1214
}
15+
1316
content: Gtk.ScrolledWindow {
1417
hscrollbar-policy: never;
1518
vscrollbar-policy: automatic;
19+
1620
child: Adw.Clamp {
1721
maximum-size: 600;
1822
tightening-threshold: 400;
23+
1924
child: Box main_box {
2025
orientation: vertical;
2126
spacing: 24;
2227
margin-top: 24;
2328
margin-bottom: 24;
2429
margin-start: 24;
2530
margin-end: 24;
31+
2632
Frame preview_frame {
2733
height-request: 80;
28-
styles ["card"]
34+
35+
styles [
36+
"card",
37+
]
38+
2939
Box preview_box {
3040
height-request: 80;
31-
styles ["gradient-preview"]
41+
42+
styles [
43+
"gradient-preview",
44+
]
3245
}
3346
}
47+
3448
Adw.PreferencesGroup steps_group {
3549
title: _("Gradient Steps");
3650
description: _("You can add up to five steps");
51+
3752
[header-suffix]
3853
Button add_step_button {
3954
label: _("Add Step");
4055
icon-name: "list-add-symbolic";
41-
styles ["suggested-action"]
56+
57+
styles [
58+
"suggested-action",
59+
]
60+
4261
halign: start;
4362
valign: center;
4463
}
@@ -48,3 +67,4 @@ template $GradiaGradientStepDialog: Adw.Dialog {
4867
};
4968
};
5069
}
70+

0 commit comments

Comments
 (0)