In out
This commit is contained in:
parent
e00256d904
commit
0be1d3f291
|
@ -2,13 +2,27 @@ import { Button, VerticalBox , HorizontalBox, TabWidget, ListView, StandardListV
|
||||||
import {LeftSidePanel} from "left_side_panel.slint";
|
import {LeftSidePanel} from "left_side_panel.slint";
|
||||||
import {MainList} from "main_lists.slint";
|
import {MainList} from "main_lists.slint";
|
||||||
import {CurrentTab} from "common.slint";
|
import {CurrentTab} from "common.slint";
|
||||||
|
import {BottomPanelVisibility} from "common.slint";
|
||||||
|
|
||||||
|
export component VisibilityButton inherits Button {
|
||||||
|
in-out property <BottomPanelVisibility> button_visibility;
|
||||||
|
in-out property <BottomPanelVisibility> bottom_panel_visibility;
|
||||||
|
|
||||||
|
enabled: bottom_panel_visibility != button-visibility;
|
||||||
|
height: 30px;
|
||||||
|
width: 70px;
|
||||||
|
|
||||||
|
clicked => {
|
||||||
|
bottom-panel-visibility = button_visibility;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export component ActionButtons {
|
export component ActionButtons {
|
||||||
callback deleted;
|
callback deleted;
|
||||||
callback scan_stopping;
|
callback scan_stopping;
|
||||||
callback scan_starting(CurrentTab);
|
callback scan_starting(CurrentTab);
|
||||||
|
|
||||||
|
in-out property <BottomPanelVisibility> bottom_panel_visibility: BottomPanelVisibility.Directories;
|
||||||
in-out property <bool> stop_requested: false;
|
in-out property <bool> stop_requested: false;
|
||||||
in-out property <bool> scanning;
|
in-out property <bool> scanning;
|
||||||
in-out property <CurrentTab> active-tab;
|
in-out property <CurrentTab> active-tab;
|
||||||
|
@ -38,5 +52,21 @@ export component ActionButtons {
|
||||||
root.deleted();
|
root.deleted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VisibilityButton {
|
||||||
|
button-visibility: BottomPanelVisibility.Directories;
|
||||||
|
bottom_panel_visibility <=> bottom_panel_visibility;
|
||||||
|
text: "Dirs";
|
||||||
|
}
|
||||||
|
VisibilityButton {
|
||||||
|
button-visibility: BottomPanelVisibility.NotVisible;
|
||||||
|
bottom_panel_visibility <=> bottom_panel_visibility;
|
||||||
|
text: "NotVS";
|
||||||
|
}
|
||||||
|
VisibilityButton {
|
||||||
|
button-visibility: BottomPanelVisibility.TextErrors;
|
||||||
|
bottom_panel_visibility <=> bottom_panel_visibility;
|
||||||
|
text: "Text";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,11 +1,9 @@
|
||||||
|
|
||||||
import {Button, StandardListView, VerticalBox} from "std-widgets.slint";
|
import {Button, StandardListView, VerticalBox} from "std-widgets.slint";
|
||||||
import {Settings} from "settings.slint";
|
import {Settings} from "settings.slint";
|
||||||
|
import {BottomPanelVisibility} from "common.slint";
|
||||||
|
|
||||||
export component BottomPanel {
|
component DirectoriesPanel {
|
||||||
min-height: 50px;
|
|
||||||
min-width: 400px;
|
|
||||||
|
|
||||||
out property <length> buttonSize: 75px;
|
out property <length> buttonSize: 75px;
|
||||||
|
|
||||||
HorizontalLayout {
|
HorizontalLayout {
|
||||||
|
@ -55,3 +53,25 @@ export component BottomPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -20,4 +20,10 @@ export struct MainListModel {
|
||||||
header_row: bool,
|
header_row: bool,
|
||||||
selected_row: bool,
|
selected_row: bool,
|
||||||
val: [string]
|
val: [string]
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum BottomPanelVisibility {
|
||||||
|
NotVisible,
|
||||||
|
TextErrors,
|
||||||
|
Directories
|
||||||
}
|
}
|
|
@ -96,7 +96,7 @@ export component MainWindow inherits Window {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ActionButtons {
|
action_buttons := ActionButtons {
|
||||||
vertical-stretch: 0.0;
|
vertical-stretch: 0.0;
|
||||||
scanning <=> root.scanning;
|
scanning <=> root.scanning;
|
||||||
active-tab <=> root.active-tab;
|
active-tab <=> root.active-tab;
|
||||||
|
@ -114,7 +114,8 @@ export component MainWindow inherits Window {
|
||||||
text_summary := LineEdit {
|
text_summary := LineEdit {
|
||||||
read-only: true;
|
read-only: true;
|
||||||
}
|
}
|
||||||
BottomPanel {
|
BottomPanel {
|
||||||
|
bottom-panel-visibility <=> action_buttons.bottom-panel-visibility;
|
||||||
vertical-stretch: 0.0;
|
vertical-stretch: 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue