2024-02-10 15:21:21 +00:00
|
|
|
import { Button, VerticalBox ,TextEdit, HorizontalBox, TabWidget, ListView, StandardListView, StandardTableView, CheckBox, LineEdit} from "std-widgets.slint";
|
|
|
|
import {SelectableTableView} from "selectable_tree_view.slint";
|
|
|
|
import {LeftSidePanel} from "left_side_panel.slint";
|
|
|
|
import {MainList} from "main_lists.slint";
|
|
|
|
import {CurrentTab, ProgressToSend} from "common.slint";
|
|
|
|
import { ActionButtons } from "action_buttons.slint";
|
|
|
|
import { Progress } from "progress.slint";
|
2024-02-10 22:31:46 +00:00
|
|
|
import {MainListModel, SelectMode, SelectModel} from "common.slint";
|
2024-02-10 15:21:21 +00:00
|
|
|
import {Settings} from "settings.slint";
|
|
|
|
import {Callabler} from "callabler.slint";
|
|
|
|
import { BottomPanel } from "bottom_panel.slint";
|
|
|
|
import {ColorPalette} from "color_palette.slint";
|
|
|
|
import {GuiState} from "gui_state.slint";
|
|
|
|
import { Preview } from "preview.slint";
|
|
|
|
|
|
|
|
export component PopupSelectResults inherits Rectangle {
|
|
|
|
callback show_popup();
|
2024-02-10 22:31:46 +00:00
|
|
|
property <[SelectModel]> model: GuiState.select_results_list;
|
2024-02-10 15:21:21 +00:00
|
|
|
property <length> item_height: 30px;
|
|
|
|
property <length> item_width: 140px;
|
|
|
|
out property <length> all_items_height: item_height * model.length;
|
|
|
|
|
|
|
|
popup_window := PopupWindow {
|
|
|
|
|
|
|
|
width: item_width;
|
|
|
|
height: all_items_height;
|
|
|
|
|
|
|
|
close-on-click: true;
|
|
|
|
Rectangle {
|
|
|
|
width: parent.width;
|
|
|
|
height: parent.height;
|
2024-02-10 19:36:14 +00:00
|
|
|
border-radius: 5px;
|
2024-02-10 15:21:21 +00:00
|
|
|
background: ColorPalette.popup_background;
|
|
|
|
VerticalLayout {
|
|
|
|
for i in model: Button {
|
|
|
|
text: i.name;
|
|
|
|
height: item_height;
|
|
|
|
width: item_width;
|
|
|
|
|
|
|
|
clicked => {
|
2024-02-10 22:31:46 +00:00
|
|
|
Callabler.select_items(i.data);
|
2024-02-10 15:21:21 +00:00
|
|
|
popup_window.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
show_popup() => {
|
|
|
|
popup_window.show();
|
|
|
|
}
|
|
|
|
}
|