mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 01:33:19 +00:00
Refactor the whole structure, no more separation for C++ and Slint files
This commit is contained in:
parent
d6c781faa2
commit
893fcc11e3
35 changed files with 920 additions and 518 deletions
|
@ -1,64 +0,0 @@
|
|||
import { Backend } from "../Backend.slint";
|
||||
import { VButton, ToggleButton, VActionButton, VText, Svg, Palette } from "@selenite";
|
||||
|
||||
export component SideBar inherits Rectangle {
|
||||
background: Palette.pane;
|
||||
|
||||
VerticalLayout {
|
||||
height: parent.height;
|
||||
padding: 16px;
|
||||
spacing: 16px;
|
||||
HorizontalLayout {
|
||||
alignment: space-between;
|
||||
spacing: 64px;
|
||||
VText {
|
||||
text: "Sources";
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
VActionButton {
|
||||
icon-svg: Svg.plus;
|
||||
icon-colorize: Palette.green;
|
||||
background: transparent;
|
||||
clicked => { Backend.add-source-clicked() }
|
||||
}
|
||||
}
|
||||
VerticalLayout {
|
||||
alignment: space-between;
|
||||
vertical-stretch: 1;
|
||||
VerticalLayout {
|
||||
vertical-stretch: 1;
|
||||
spacing: 4px;
|
||||
ToggleButton {
|
||||
text: "All";
|
||||
text-alignment: left;
|
||||
active: Backend.no-source-selected;
|
||||
clicked => { Backend.source-clicked(-1) }
|
||||
|
||||
|
||||
}
|
||||
for item[index] in Backend.sources-selected: ToggleButton {
|
||||
text: item.name;
|
||||
text-alignment: left;
|
||||
active: item.selected;
|
||||
clicked => { Backend.source-clicked(item.id) }
|
||||
VActionButton {
|
||||
visible: parent.active;
|
||||
icon-svg: Svg.cog;
|
||||
background: transparent;
|
||||
clicked => { Backend.edit-source-clicked(item.id) }
|
||||
}
|
||||
}
|
||||
}
|
||||
VerticalLayout {
|
||||
spacing: 4px;
|
||||
/*VButton {
|
||||
icon-svg: Svg.cog;
|
||||
text: "Settings";
|
||||
background: transparent;
|
||||
clicked => { Backend.settings-clicked() }
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue