Skip to content

Commit 69c5806

Browse files
authored
Merge pull request #111 from haruki7049/format-codes
style: zig fmt to success CI
2 parents 7c3023f + f712e10 commit 69c5806

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

examples/dummy-installer.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn main() !void {
1111
capy.margin(capy.Rectangle.init(10, 10, 10, 10), capy.column(.{}, .{
1212
capy.label(.{ .text = "Hello, World" }), // TODO: capy.Heading (= label with bold + big font)
1313
capy.label(.{ .text =
14-
\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
14+
\\ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
1515
}),
1616
capy.spacing(),
1717
capy.alignment(.{ .x = 1.0 }, capy.row(.{}, .{

src/backends/win32/backend.zig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ pub const Window = struct {
224224
const layered = false;
225225

226226
const hwnd = win32.CreateWindowExW(
227-
// layered don't work in wine for some reason, but only in wine
228-
win32.WINDOW_EX_STYLE.initFlags(.{
229-
.COMPOSITED = 1,
230-
.LAYERED = @intFromBool(layered),
231-
.APPWINDOW = 1,
232-
}), className, // lpClassName
227+
// layered don't work in wine for some reason, but only in wine
228+
win32.WINDOW_EX_STYLE.initFlags(.{
229+
.COMPOSITED = 1,
230+
.LAYERED = @intFromBool(layered),
231+
.APPWINDOW = 1,
232+
}), className, // lpClassName
233233
_T(""), // lpWindowName
234234
win32.WS_OVERLAPPEDWINDOW, // dwStyle
235235
win32.CW_USEDEFAULT, // X

src/components/Alignment.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ pub const Alignment = struct {
135135
pub fn alignment(opts: Alignment.Config, child: anytype) anyerror!*Alignment {
136136
const element =
137137
if (comptime internal.isErrorUnion(@TypeOf(child)))
138-
try child
139-
else
140-
child;
138+
try child
139+
else
140+
child;
141141

142142
var options = opts;
143143
options.child = internal.getWidgetFrom(element);

src/components/Navigation.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ pub fn navigation(opts: Navigation.Config, children: anytype) anyerror!*Navigati
119119
const child = @field(children, field.name);
120120
const element =
121121
if (comptime internal.isErrorUnion(@TypeOf(child)))
122-
try child
123-
else
124-
child;
122+
try child
123+
else
124+
child;
125125
const widget = internal.getWidgetFrom(element);
126126
try routes.put(field.name, widget);
127127
}

src/components/Scrollable.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ pub const Scrollable = struct {
4141
pub fn scrollable(element: anytype) anyerror!*Scrollable {
4242
const child =
4343
if (comptime @import("../internal.zig").isErrorUnion(@TypeOf(element)))
44-
try element
45-
else
46-
element;
44+
try element
45+
else
46+
element;
4747
const widget = @import("../internal.zig").getWidgetFrom(child);
4848
return Scrollable.alloc(.{ .child = widget });
4949
}

src/components/Tabs.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ pub inline fn tabs(children: anytype) anyerror!*Tabs {
7575
const element = @field(children, field.name);
7676
const tab1 =
7777
if (comptime isErrorUnion(@TypeOf(element))) // if it is an error union, unwrap it
78-
try element
79-
else
80-
element;
78+
try element
79+
else
80+
element;
8181
tab1.widget.ref();
8282
const slot = try list.addOne();
8383
slot.* = tab1;

src/window.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ pub const Window = struct {
8282
pub inline fn set(self: *Window, wrappedContainer: anytype) anyerror!void {
8383
const container =
8484
if (comptime isErrorUnion(@TypeOf(wrappedContainer)))
85-
try wrappedContainer
86-
else
87-
wrappedContainer;
85+
try wrappedContainer
86+
else
87+
wrappedContainer;
8888
self._child = internal.getWidgetFrom(container);
8989
self._child.?.ref();
9090

0 commit comments

Comments
 (0)