1
0
Fork 0
mirror of synced 2024-05-09 23:12:29 +12:00
czkawka/krokiet/ui/bottom_panel.slint
Rafał Mikrut 378fa1fd6e
Excluded extensions and krokiet new features (#1184)
* AVC

* Import split

* Default thread size

* Hen

* Allowed extensions

* Perf

* Connect

* Excluded

* Zmiany

* Optimization

* 4.10

* At once

* Included

* Chang

* VD

* VD

* Hashes

* Wersja

* SD

* Up

* Up

* 2024

* Dup

* Slint files

* Added  select

* Selections

* Fix

* LTO

* Actions

* Added popup delete

* AB

* V4

* Release

* LTO

* Basic moving

* Commonsy

* Moving probably works

* Popup move
2024-02-14 17:45:25 +01:00

126 lines
3.2 KiB
Plaintext

import {Button, StandardListView, VerticalBox, ScrollView, TextEdit} from "std-widgets.slint";
import {Settings} from "settings.slint";
import {BottomPanelVisibility} from "common.slint";
import {Callabler} from "callabler.slint";
import {GuiState} from "gui_state.slint";
import {IncludedDirectories, ExcludedDirectories} from "included_directories.slint";
component DirectoriesPanel inherits HorizontalLayout {
callback folder_choose_requested(bool);
callback show_manual_add_dialog(bool);
spacing: 5px;
// Included directories
VerticalLayout {
horizontal-stretch: 0.0;
spacing: 5px;
Button {
text: "Add";
clicked => {
folder_choose_requested(true);
}
}
Button {
text: "Remove";
clicked => {
Callabler.remove_item_directories(true);
}
}
Button {
text: "Manual Add";
clicked => {
show_manual_add_dialog(true);
}
}
Rectangle {
vertical-stretch: 1.0;
}
}
VerticalLayout {
horizontal-stretch: 1.0;
Rectangle {
Text {
text: "Included Directories";
}
}
included_list := IncludedDirectories { }
}
// Excluded directories
VerticalLayout {
horizontal-stretch: 0.0;
spacing: 5px;
Button {
text: "Add";
clicked => {
folder_choose_requested(false);
}
}
Button {
text: "Remove";
clicked => {
Callabler.remove_item_directories(false);
}
}
Button {
text: "Manual Add";
clicked => {
show_manual_add_dialog(false);
}
}
Rectangle {
vertical-stretch: 1.0;
}
}
VerticalLayout {
horizontal-stretch: 1.0;
Rectangle {
Text {
text: "Excluded Directories";
}
}
excluded_list := ExcludedDirectories { }
}
}
component TextErrorsPanel inherits TextEdit {
height: 20px;
read-only: true;
wrap: TextWrap.no-wrap;
text <=> GuiState.info_text;
}
export component BottomPanel {
in-out property <BottomPanelVisibility> bottom_panel_visibility: BottomPanelVisibility.Directories;
callback folder_choose_requested(bool);
callback show_manual_add_dialog(bool);
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;
folder_choose_requested(included-directories) => {
root.folder_choose_requested(included-directories)
}
show_manual_add_dialog(included-directories) => {
root.show_manual_add_dialog(included-directories)
}
}
if bottom-panel-visibility == BottomPanelVisibility.TextErrors: TextErrorsPanel {
width: parent.width;
height: parent.height;
}
}