mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 05:44:52 +00:00
reformat
This commit is contained in:
parent
dc276290e9
commit
619e21295d
4 changed files with 26 additions and 33 deletions
|
@ -1,23 +1,21 @@
|
|||
#include "hello.h"
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
int main()
|
||||
{
|
||||
static Hello component;
|
||||
|
||||
component.foobar.set_handler([](auto...){
|
||||
std::cout << "Hello from C++" << std::endl;
|
||||
});
|
||||
component.foobar.set_handler([](auto...) { std::cout << "Hello from C++" << std::endl; });
|
||||
|
||||
component.plus_clicked.set_handler([](auto ctx){
|
||||
component.plus_clicked.set_handler([](auto ctx) {
|
||||
auto &counter = component.counter;
|
||||
counter.set(counter.get(ctx) + 1);
|
||||
});
|
||||
|
||||
component.minus_clicked.set_handler([](auto ctx){
|
||||
component.minus_clicked.set_handler([](auto ctx) {
|
||||
auto &counter = component.counter;
|
||||
counter.set(counter.get(ctx) - 1);
|
||||
});
|
||||
|
||||
sixtyfps::run(&component);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue