Skip to content

Commit 65b4733

Browse files
committed
readme: update example
1 parent 60fa439 commit 65b4733

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
## Introduction
1313

14-
Capy is a **graphical user interface library for Zig**. It is mainly intended for creating applications using native controls from the operating system.
14+
Capy is a **GUI library for Zig**. It is mainly intended for creating applications using native controls from the operating system.
1515
Capy is a declarative UI library aiming to be easy to write for and versatile.
1616

1717
It has been made with the goal to empower standalone UI applications, integration in games or any other rendering process is a non-goal.
@@ -39,8 +39,8 @@ pub fn main() !void {
3939
try window.set(
4040
capy.column(.{ .spacing = 10 }, .{ // have 10px spacing between each column's element
4141
capy.row(.{ .spacing = 5 }, .{ // have 5px spacing between each row's element
42-
capy.button(.{ .label = "Save", .onclick = &buttonClicked }),
43-
capy.button(.{ .label = "Run", .onclick = &buttonClicked })
42+
capy.button(.{ .label = "Save", .onclick = @ptrCast(&buttonClicked) }),
43+
capy.button(.{ .label = "Run", .onclick = @ptrCast(&buttonClicked) })
4444
}),
4545
// Expanded means the widget will take all the space it can
4646
// in the parent container
@@ -50,7 +50,7 @@ pub fn main() !void {
5050
})
5151
);
5252
53-
window.resize(800, 600);
53+
window.setPreferredSize(800, 600);
5454
window.show();
5555
capy.runEventLoop();
5656
}

0 commit comments

Comments
 (0)