mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 07:37:24 +00:00
56 lines
1.5 KiB
Text
56 lines
1.5 KiB
Text
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import { TabWidget, HorizontalBox, StyleMetrics, Palette } from "std-widgets.slint";
|
|
import { MailView } from "mail_view.slint";
|
|
import { HeaderView } from "header_view.slint";
|
|
import { DashboardView } from "dashboard_view.slint";
|
|
import { UsecasesPalette } from "../widgets.slint";
|
|
|
|
export global MainViewAdapter {
|
|
callback select-language(index: int);
|
|
}
|
|
|
|
export component MainView {
|
|
in property <bool> break-layout;
|
|
|
|
preferred-height: 100%;
|
|
preferred-width: 100%;
|
|
|
|
forward-focus: focus-scope;
|
|
focus-scope := FocusScope { }
|
|
|
|
Rectangle {
|
|
background: Palette.background;
|
|
|
|
VerticalLayout {
|
|
HeaderView {
|
|
select-language(index) => {
|
|
MainViewAdapter.select-language(index)
|
|
}
|
|
}
|
|
|
|
HorizontalLayout {
|
|
TabWidget {
|
|
Tab {
|
|
title: @tr("Mail");
|
|
|
|
HorizontalBox {
|
|
MailView {
|
|
break-layout: root.break-layout;
|
|
}
|
|
}
|
|
}
|
|
|
|
Tab {
|
|
title: @tr("Dashboard");
|
|
|
|
HorizontalBox {
|
|
DashboardView { }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|