Skip to content

Commit

Permalink
slint: Update to version 1.5.7 and fix window size
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Castello <[email protected]>
  • Loading branch information
microhobby committed May 5, 2024
1 parent 780b8e1 commit 24344e2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
10 changes: 10 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,14 @@
Environment.Exit(0);
};

// for some reason, the window size is not being respected
// so we set it after a delay
Slint.Timer.Start(TimerMode.SingleShot, 1000, () =>
{
win.RunOnUiThread(() => {
win.Width = 800;
win.Height = 700;
});
});

win.Run();
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.2
2 changes: 1 addition & 1 deletion torizonWSLWelcome.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SlintDotnet" Version="1.4.0" />
<PackageReference Include="SlintDotnet" Version="1.5.7" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions ui/AppWindow.slint
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import {

export component AppWindow inherits Window {
in-out property<bool> createLoginShow : false;
in-out property<length> Width : 799px;
in-out property<length> Height : 699px;
in-out property<string> labelDoNotMatch : "Repeat password:";
in-out property<string> loginName;
in-out property<string> loginPsswd;
in-out property<string> loginRepPsswd;
callback createLogin();

max-height: 700px;
max-width: 800px;
min-width: 800px;
min-height: 700px;
width <=> root.Width;
height <=> root.Height;

background: @linear-gradient(30deg, #F2F2F2, #0164b1);
//background: #F2F2F2;
Expand Down

0 comments on commit 24344e2

Please sign in to comment.