Menus, dialogs and toasts draw on an own full-window layer so they can play exit motion; gallery pages show them open for screenshots. Co-Authored-By: Claude Opus 5.5 <[email protected]>
84 lines
2.7 KiB
Text
84 lines
2.7 KiB
Text
import "../../../assets/fonts/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf";
|
|
import { Theme } from "theme.slint";
|
|
import { Motion, MotionPrefs } from "motion.slint";
|
|
import { Icon, Icons } from "components/icon.slint";
|
|
|
|
export { Theme, MotionPrefs }
|
|
export { Gallery, GalleryPage } from "gallery.slint";
|
|
|
|
// Placeholder shell (sidebar + content) until the views land.
|
|
export component MainWindow inherits Window {
|
|
title: "Tunal";
|
|
icon: @image-url("../../../assets/tunal.png");
|
|
min-width: 720px;
|
|
min-height: 480px;
|
|
preferred-width: 960px;
|
|
preferred-height: 640px;
|
|
background: Theme.surface;
|
|
animate background { duration: Motion.time(Motion.medium2); easing: Motion.standard; }
|
|
|
|
HorizontalLayout {
|
|
sidebar := Rectangle {
|
|
width: 240px;
|
|
background: Theme.surface-container-low;
|
|
animate background { duration: Motion.time(Motion.medium2); easing: Motion.standard; }
|
|
|
|
VerticalLayout {
|
|
padding: Theme.space-3;
|
|
spacing: Theme.space-1;
|
|
alignment: start;
|
|
|
|
HorizontalLayout {
|
|
padding-left: Theme.space-4;
|
|
padding-right: Theme.space-4;
|
|
height: 40px;
|
|
spacing: Theme.space-3;
|
|
|
|
VerticalLayout {
|
|
alignment: center;
|
|
Icon { glyph: Icons.home; }
|
|
}
|
|
|
|
Text {
|
|
text: "Home";
|
|
color: Theme.on-surface;
|
|
font-size: Theme.label-large.size;
|
|
font-weight: Theme.label-large.weight;
|
|
vertical-alignment: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
VerticalLayout {
|
|
alignment: center;
|
|
spacing: Theme.space-2;
|
|
|
|
HorizontalLayout {
|
|
alignment: center;
|
|
Icon {
|
|
glyph: Icons.folder;
|
|
size: 48px;
|
|
}
|
|
}
|
|
|
|
Text {
|
|
text: "No folder open";
|
|
color: Theme.on-surface;
|
|
font-size: Theme.title-medium.size;
|
|
font-weight: Theme.title-medium.weight;
|
|
horizontal-alignment: center;
|
|
}
|
|
|
|
Text {
|
|
text: "Folders you open appear here";
|
|
color: Theme.on-surface-variant;
|
|
font-size: Theme.body-medium.size;
|
|
font-weight: Theme.body-medium.weight;
|
|
horizontal-alignment: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|