67 lines
2.2 KiB
Plaintext
67 lines
2.2 KiB
Plaintext
import { CoopWindow, VirtualKeyboard, VirtualKeyboardHandler, GroupListViewItem, Palette, Icons } from "_imports/coop-widgets.slint";
|
|
import { MediaPage , SettingsPage } from "pages/pages.slint";
|
|
import { AppManager } from "app-manager.slint";
|
|
import { SideBarView } from "side-bar-view.slint";
|
|
import { MediaControls, MediaLogic } from "widgets/mediacontrols.slint";
|
|
import { ColorReload } from "pages/settings-page.slint";
|
|
|
|
export { VirtualKeyboardHandler }
|
|
export { AppManager }
|
|
export { Palette }
|
|
export { MediaLogic }
|
|
export { ColorReload }
|
|
|
|
export component App inherits CoopWindow {
|
|
// preferred-width: 600px;
|
|
// preferred-height: 400px;
|
|
title: "Deckui";
|
|
|
|
Rectangle {
|
|
background: Palette.background;
|
|
}
|
|
|
|
Rectangle {
|
|
GridLayout {
|
|
Rectangle {
|
|
col: 1;
|
|
|
|
if (i-side-bar.current-item.parent == 0 && i-side-bar.current-item.item == 0) : MediaPage {}
|
|
if (i-side-bar.current-item.parent == 0 && i-side-bar.current-item.item == 1) : SettingsPage {}
|
|
//if (i-side-bar.current-item.parent == 1 && i-side-bar.current-item.item == 0) : BrushesPage {}
|
|
}
|
|
|
|
i-side-bar := SideBarView {
|
|
// current-item: {parent:0,item:1};
|
|
col: 0;
|
|
parent-width: root.width;
|
|
title: "Deckui";
|
|
responsive: true;
|
|
|
|
property <GroupListViewItem> widgets: {
|
|
text: "Home",
|
|
items: [
|
|
{ leading-icon: Icons.home, text: "Media" },
|
|
{ leading-icon: Icons.pin, text: "Settings" },
|
|
]
|
|
};
|
|
|
|
// property <GroupListViewItem> resources: {
|
|
// text: "Resources",
|
|
// items: [
|
|
// { leading-icon: Icons.brush, text: "Brushes" },
|
|
// { leading-icon: Icons.format-size, text: "Typography" },
|
|
// ]
|
|
// };
|
|
|
|
navigation-items: [self.widgets];
|
|
}
|
|
}
|
|
|
|
if (AppManager.keyboard-enabled) : VirtualKeyboard {
|
|
y: TextInputInterface.text-input-focused ? parent.height - self.height : parent.height;
|
|
}
|
|
}
|
|
|
|
}
|
|
|