mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 09:23:18 +00:00
Replace 'edit source window' with popup
This commit is contained in:
parent
129b30b9e7
commit
854152b395
13 changed files with 101 additions and 163 deletions
|
@ -1,9 +1,19 @@
|
|||
import { AppWindowModels, TaskData } from "../Models.slint";
|
||||
import { AppWindowActions } from "../Actions.slint";
|
||||
import { VButton, ToggleButton, VActionButton, VText, Svg, Palette } from "@selenite";
|
||||
import { EditSourceModal } from "../../../components/editSourceModal.slint";
|
||||
|
||||
export component SideBar inherits Rectangle {
|
||||
|
||||
function open-edit-source-window(source-id: int) {
|
||||
editSourcePopup.edit(source-id)
|
||||
}
|
||||
|
||||
editSourcePopup := EditSourceModal {
|
||||
//x: parent.width / 2 - 200px;
|
||||
//y: parent.height / 2 - 300px;
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
height: parent.height;
|
||||
padding: 16px;
|
||||
|
@ -51,7 +61,7 @@ export component SideBar inherits Rectangle {
|
|||
visible: parent.active;
|
||||
icon-svg: Svg.cog;
|
||||
background: transparent;
|
||||
clicked => { AppWindowActions.open-edit-source-window(item.id) }
|
||||
clicked => { editSourcePopup.edit(item.id) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue