-
This commit is contained in:
@@ -14,12 +14,12 @@ import { ToastContainer, ToastMessage } from "components/toast.slint";
|
||||
export component Demo inherits Window {
|
||||
title: "Slint Shadcn UI - Task Manager Demo";
|
||||
background: Theme.colors.background;
|
||||
|
||||
// Window size settings - now resizable
|
||||
|
||||
// Window size settings - reduced for lower memory usage
|
||||
min-width: 800px;
|
||||
min-height: 600px;
|
||||
preferred-width: 1400px;
|
||||
preferred-height: 900px;
|
||||
preferred-width: 1000px;
|
||||
preferred-height: 700px;
|
||||
|
||||
// Application state
|
||||
in-out property <string> new-task-title: "";
|
||||
@@ -95,25 +95,27 @@ export component Demo inherits Window {
|
||||
Sidebar {
|
||||
items: nav-items;
|
||||
collapsed: sidebar-collapsed;
|
||||
|
||||
|
||||
item-clicked(index) => {
|
||||
if index == 0 { current-view = "tasks"; }
|
||||
else if index == 1 { current-view = "components"; }
|
||||
else if index == 2 { current-view = "settings"; }
|
||||
}
|
||||
|
||||
|
||||
toggle-collapsed => {
|
||||
sidebar-collapsed = !sidebar-collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
// Main content area - fixed height
|
||||
|
||||
// Main content area
|
||||
Rectangle {
|
||||
background: Theme.colors.background;
|
||||
|
||||
horizontal-stretch: 1;
|
||||
vertical-stretch: 1;
|
||||
|
||||
Flickable {
|
||||
width: 100%;
|
||||
height: parent.height;
|
||||
height: 100%;
|
||||
viewport-height: content-layout.preferred-height;
|
||||
|
||||
content-layout := VerticalLayout {
|
||||
|
||||
Reference in New Issue
Block a user