2023-11-02 04:36:38 +13:00
|
|
|
|
|
|
|
import {Button, StandardListView, VerticalBox} from "std-widgets.slint";
|
|
|
|
import {Settings} from "settings.slint";
|
2023-11-02 05:47:45 +13:00
|
|
|
import {BottomPanelVisibility} from "common.slint";
|
2023-11-02 04:36:38 +13:00
|
|
|
|
2023-11-02 05:47:45 +13:00
|
|
|
component DirectoriesPanel {
|
2023-11-02 04:36:38 +13:00
|
|
|
out property <length> buttonSize: 75px;
|
|
|
|
|
|
|
|
HorizontalLayout {
|
|
|
|
VerticalLayout {
|
|
|
|
width: buttonSize;
|
|
|
|
Button {
|
|
|
|
text: "Add";
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "Remove";
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
vertical-stretch: 1.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
VerticalLayout {
|
|
|
|
Rectangle {
|
|
|
|
Text {
|
|
|
|
text: "Included Directories";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StandardListView {
|
|
|
|
model: Settings.included-directories;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
VerticalLayout {
|
|
|
|
width: buttonSize;
|
|
|
|
Button {
|
|
|
|
text: "Add";
|
|
|
|
}
|
|
|
|
Button {
|
|
|
|
text: "Remove";
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
vertical-stretch: 1.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
VerticalLayout {
|
|
|
|
Rectangle {
|
|
|
|
Text {
|
|
|
|
text: "Excluded Directories";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StandardListView {
|
|
|
|
model: Settings.excluded-directories;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-02 05:47:45 +13:00
|
|
|
// TODO this should be a normal read only Text editor
|
|
|
|
component TextErrorsPanel {
|
|
|
|
Rectangle {
|
|
|
|
background: red;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export component BottomPanel {
|
|
|
|
in-out property <BottomPanelVisibility> bottom_panel_visibility: BottomPanelVisibility.Directories;
|
|
|
|
|
|
|
|
min-height: bottom-panel-visibility == BottomPanelVisibility.NotVisible ? 0px : 150px;
|
|
|
|
min-width: bottom-panel-visibility == BottomPanelVisibility.NotVisible ? 0px : 400px;
|
|
|
|
|
|
|
|
if bottom-panel-visibility == BottomPanelVisibility.Directories: DirectoriesPanel {
|
|
|
|
width: parent.width;
|
|
|
|
height: parent.height;
|
|
|
|
}
|
|
|
|
if bottom-panel-visibility == BottomPanelVisibility.TextErrors : TextErrorsPanel {
|
|
|
|
width: parent.width;
|
|
|
|
height: parent.height;
|
|
|
|
}
|
|
|
|
}
|