Compare commits
	
		
			7 Commits
		
	
	
		
			23daf927cd
			...
			61f20f228e
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
								 | 
						61f20f228e | |
| 
							
							
								
								 | 
						c67f6efb32 | |
| 
							
							
								
								 | 
						f70979846e | |
| 
							
							
								
								 | 
						b98741a35e | |
| 
							
							
								
								 | 
						0788dd10d5 | |
| 
							
							
								
								 | 
						1065e104da | |
| 
							
							
								
								 | 
						a13ef6e15d | 
| 
						 | 
					@ -1,24 +1,34 @@
 | 
				
			||||||
import { Theme } from "theme.slint";
 | 
					import { Metrics, DarkPalette } from "theme.slint";
 | 
				
			||||||
import { EditorBar } from "editor_bar.slint";
 | 
					import { EditorBar } from "editor_bar.slint";
 | 
				
			||||||
import { StatusBar } from "status_bar.slint";
 | 
					import { StatusBar } from "status_bar.slint";
 | 
				
			||||||
import { ToolBar } from "tool_bar.slint";
 | 
					import { ToolBar } from "tool_bar.slint";
 | 
				
			||||||
import { ObjectToolPanel } from "object_tool_panel.slint";
 | 
					import { ObjectToolPanel } from "object_tool_panel.slint";
 | 
				
			||||||
 | 
					import { VerticalBox, HorizontalBox } from "widgets/layout.slint";
 | 
				
			||||||
 | 
					import { VerticalSeparator } from "widgets/separator.slint";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export component AppWindow inherits Window {
 | 
					export component AppWindow inherits Window {
 | 
				
			||||||
    title: @tr("FM Editor");
 | 
					    title: @tr("FM Editor");
 | 
				
			||||||
    preferred-width: 1280px;
 | 
					    preferred-width: 1280px;
 | 
				
			||||||
    preferred-height: 720px;
 | 
					    preferred-height: 720px;
 | 
				
			||||||
    VerticalLayout {
 | 
					    VerticalBox {
 | 
				
			||||||
 | 
					        j-rounding: 0px;
 | 
				
			||||||
 | 
					        j-padding: Metrics.padding-sm;
 | 
				
			||||||
 | 
					        j-spacing: Metrics.spacing-sm;
 | 
				
			||||||
 | 
					        background: DarkPalette.background[0];
 | 
				
			||||||
        EditorBar { }
 | 
					        EditorBar { }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        HorizontalLayout {
 | 
					        HorizontalBox {
 | 
				
			||||||
 | 
					            background: DarkPalette.background[0];
 | 
				
			||||||
 | 
					            j-padding: 0px;
 | 
				
			||||||
 | 
					            j-spacing: Metrics.spacing-sm;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ToolBar { }
 | 
					            ToolBar { }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ObjectToolPanel { }
 | 
					            ObjectToolPanel { }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            Rectangle {
 | 
					            Rectangle {
 | 
				
			||||||
                Text {
 | 
					                Text {
 | 
				
			||||||
                    font-size: Theme.font-lg;
 | 
					                    font-size: Metrics.font-lg;
 | 
				
			||||||
                    text: "INSERT VIEWPORT HERE";
 | 
					                    text: "INSERT VIEWPORT HERE";
 | 
				
			||||||
                    vertical-alignment: center;
 | 
					                    vertical-alignment: center;
 | 
				
			||||||
                    horizontal-alignment: center;
 | 
					                    horizontal-alignment: center;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,18 +1,15 @@
 | 
				
			||||||
import { Theme } from "theme.slint";
 | 
					import { Metrics, DarkPalette } from "theme.slint";
 | 
				
			||||||
 | 
					import { HorizontalBox } from "widgets/layout.slint";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export component EditorBar inherits Rectangle {
 | 
					export component EditorBar inherits HorizontalBox {
 | 
				
			||||||
    height: Theme.size-xl;
 | 
					    height: Metrics.size-xl;
 | 
				
			||||||
    border-color: black;
 | 
					    j-spacing: Metrics.spacing-xl;
 | 
				
			||||||
    border-width: 1px;
 | 
					    j-alignment: start;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    HorizontalLayout {
 | 
					 | 
				
			||||||
        alignment: start;
 | 
					 | 
				
			||||||
        padding: Theme.padding-md;
 | 
					 | 
				
			||||||
        spacing: Theme.padding-xl;
 | 
					 | 
				
			||||||
    Text {
 | 
					    Text {
 | 
				
			||||||
            font-size: Theme.font-md;
 | 
					        color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					        font-size: Metrics.font-md;
 | 
				
			||||||
        vertical-alignment: center;
 | 
					        vertical-alignment: center;
 | 
				
			||||||
        text: "Damn look at all the options and shit here it's like Hammer 2!!";
 | 
					        text: "Damn look at all the options and shit here it's like Hammer 2!!";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,155 +1,134 @@
 | 
				
			||||||
import { Theme } from "theme.slint";
 | 
					import { Metrics, DarkPalette } from "theme.slint";
 | 
				
			||||||
import { Panel } from "widgets/panel.slint";
 | 
					import { Panel } from "widgets/panel.slint";
 | 
				
			||||||
 | 
					import { Box, HorizontalBox, VerticalBox } from "widgets/layout.slint";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export component ObjectToolPanel inherits Rectangle {
 | 
					
 | 
				
			||||||
 | 
					export component ObjectToolPanel inherits VerticalBox {
 | 
				
			||||||
    width: 280px;
 | 
					    width: 280px;
 | 
				
			||||||
    border-color: black;
 | 
					 | 
				
			||||||
    border-width: 1px;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    VerticalLayout {
 | 
					 | 
				
			||||||
        padding: Theme.padding-md;
 | 
					 | 
				
			||||||
        spacing: Theme.spacing-md;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        HorizontalLayout {
 | 
					 | 
				
			||||||
            height: Theme.size-md;
 | 
					 | 
				
			||||||
    Text {
 | 
					    Text {
 | 
				
			||||||
                font-size: Theme.font-lg;
 | 
					        height: Metrics.size-md;
 | 
				
			||||||
 | 
					        color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					        font-size: Metrics.font-lg;
 | 
				
			||||||
        text: @tr("Object Tool");
 | 
					        text: @tr("Object Tool");
 | 
				
			||||||
        vertical-alignment: center;
 | 
					        vertical-alignment: center;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Panel {
 | 
					    Panel {
 | 
				
			||||||
 | 
					        j-alignment: start;
 | 
				
			||||||
        title: @tr("Favourites");
 | 
					        title: @tr("Favourites");
 | 
				
			||||||
 | 
					        j-elevation: 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Panel {
 | 
					        Panel {
 | 
				
			||||||
            title: "Group Name";
 | 
					            title: "Group Name";
 | 
				
			||||||
            title-alignment: center;
 | 
					            title-alignment: center;
 | 
				
			||||||
                content-padding: 0px;
 | 
					            j-spacing: 0px;
 | 
				
			||||||
                content-spacing: 0px;
 | 
					
 | 
				
			||||||
                HorizontalLayout {
 | 
					 | 
				
			||||||
                    height: Theme.size-md;
 | 
					 | 
				
			||||||
                    padding-left: Theme.padding-md;
 | 
					 | 
				
			||||||
                    padding-right: Theme.padding-md;
 | 
					 | 
				
			||||||
            Text {
 | 
					            Text {
 | 
				
			||||||
                        font-size: Theme.font-md;
 | 
					                height: Metrics.size-md;
 | 
				
			||||||
 | 
					                color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					                font-size: Metrics.font-md;
 | 
				
			||||||
                text: "Object Name";
 | 
					                text: "Object Name";
 | 
				
			||||||
                vertical-alignment: center;
 | 
					                vertical-alignment: center;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                HorizontalLayout {
 | 
					 | 
				
			||||||
                    height: Theme.size-md;
 | 
					 | 
				
			||||||
                    padding-left: Theme.padding-md;
 | 
					 | 
				
			||||||
                    padding-right: Theme.padding-md;
 | 
					 | 
				
			||||||
            Text {
 | 
					            Text {
 | 
				
			||||||
                        font-size: Theme.font-md;
 | 
					                height: Metrics.size-md;
 | 
				
			||||||
 | 
					                color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					                font-size: Metrics.font-md;
 | 
				
			||||||
                text: "Object Name";
 | 
					                text: "Object Name";
 | 
				
			||||||
                vertical-alignment: center;
 | 
					                vertical-alignment: center;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                HorizontalLayout {
 | 
					 | 
				
			||||||
                    height: Theme.size-md;
 | 
					 | 
				
			||||||
                    padding-left: Theme.padding-md;
 | 
					 | 
				
			||||||
                    padding-right: Theme.padding-md;
 | 
					 | 
				
			||||||
            Text {
 | 
					            Text {
 | 
				
			||||||
                        font-size: Theme.font-md;
 | 
					                height: Metrics.size-md;
 | 
				
			||||||
 | 
					                color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					                font-size: Metrics.font-md;
 | 
				
			||||||
                text: "Object Name";
 | 
					                text: "Object Name";
 | 
				
			||||||
                vertical-alignment: center;
 | 
					                vertical-alignment: center;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        Panel {
 | 
					        Panel {
 | 
				
			||||||
            title: "Group Name";
 | 
					            title: "Group Name";
 | 
				
			||||||
            title-alignment: center;
 | 
					            title-alignment: center;
 | 
				
			||||||
                content-padding: 0px;
 | 
					            j-spacing: 0px;
 | 
				
			||||||
                content-spacing: 0px;
 | 
					
 | 
				
			||||||
                HorizontalLayout {
 | 
					 | 
				
			||||||
                    height: Theme.size-md;
 | 
					 | 
				
			||||||
                    padding-left: Theme.padding-md;
 | 
					 | 
				
			||||||
                    padding-right: Theme.padding-md;
 | 
					 | 
				
			||||||
            Text {
 | 
					            Text {
 | 
				
			||||||
                        font-size: Theme.font-md;
 | 
					                height: Metrics.size-md;
 | 
				
			||||||
 | 
					                color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					                font-size: Metrics.font-md;
 | 
				
			||||||
                text: "Object Name";
 | 
					                text: "Object Name";
 | 
				
			||||||
                vertical-alignment: center;
 | 
					                vertical-alignment: center;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                HorizontalLayout {
 | 
					 | 
				
			||||||
                    height: Theme.size-md;
 | 
					 | 
				
			||||||
                    padding-left: Theme.padding-md;
 | 
					 | 
				
			||||||
                    padding-right: Theme.padding-md;
 | 
					 | 
				
			||||||
            Text {
 | 
					            Text {
 | 
				
			||||||
                        font-size: Theme.font-md;
 | 
					                height: Metrics.size-md;
 | 
				
			||||||
 | 
					                color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					                font-size: Metrics.font-md;
 | 
				
			||||||
                text: "Object Name";
 | 
					                text: "Object Name";
 | 
				
			||||||
                vertical-alignment: center;
 | 
					                vertical-alignment: center;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                HorizontalLayout {
 | 
					 | 
				
			||||||
                    height: Theme.size-md;
 | 
					 | 
				
			||||||
                    padding-left: Theme.padding-md;
 | 
					 | 
				
			||||||
                    padding-right: Theme.padding-md;
 | 
					 | 
				
			||||||
            Text {
 | 
					            Text {
 | 
				
			||||||
                        font-size: Theme.font-md;
 | 
					                height: Metrics.size-md;
 | 
				
			||||||
 | 
					                color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					                font-size: Metrics.font-md;
 | 
				
			||||||
                text: "Object Name";
 | 
					                text: "Object Name";
 | 
				
			||||||
                vertical-alignment: center;
 | 
					                vertical-alignment: center;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Panel {
 | 
					    Panel {
 | 
				
			||||||
        title: @tr("Hierarchy");
 | 
					        title: @tr("Hierarchy");
 | 
				
			||||||
            HorizontalLayout {
 | 
					        j-elevation: 2;
 | 
				
			||||||
                spacing: Theme.spacing-md;
 | 
					        vertical-stretch: 1;
 | 
				
			||||||
                height: Theme.size-md;
 | 
					
 | 
				
			||||||
 | 
					        HorizontalBox {
 | 
				
			||||||
 | 
					            j-elevation: 2;
 | 
				
			||||||
 | 
					            j-padding: 0px;
 | 
				
			||||||
 | 
					            j-spacing: Metrics.spacing-md;
 | 
				
			||||||
 | 
					            height: Metrics.size-md;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            Text {
 | 
					            Text {
 | 
				
			||||||
                    font-size: Theme.font-md;
 | 
					                color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					                font-size: Metrics.font-md;
 | 
				
			||||||
                vertical-alignment: center;
 | 
					                vertical-alignment: center;
 | 
				
			||||||
                text: @tr("Name:");
 | 
					                text: @tr("Name:");
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Rectangle {
 | 
					            Box {
 | 
				
			||||||
                    border-color: black;
 | 
					                j-padding: 0px;
 | 
				
			||||||
                    border-width: 1px;
 | 
					 | 
				
			||||||
                    border-radius: Theme.radius-md;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Text {
 | 
					                Text {
 | 
				
			||||||
                        font-size: Theme.font-md;
 | 
					                    color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					                    font-size: Metrics.font-md;
 | 
				
			||||||
                    vertical-alignment: center;
 | 
					                    vertical-alignment: center;
 | 
				
			||||||
                        horizontal-alignment: left;
 | 
					                    horizontal-alignment: center;
 | 
				
			||||||
                    text: "VicHutch (-514)";
 | 
					                    text: "VicHutch (-514)";
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Rectangle {
 | 
					            Box {
 | 
				
			||||||
                    border-color: black;
 | 
					                width: Metrics.size-md;
 | 
				
			||||||
                    border-width: 1px;
 | 
					                j-elevation: 3;
 | 
				
			||||||
                    border-radius: Theme.radius-md;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    width: Theme.size-md;
 | 
					                Rectangle { }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                Rectangle {
 | 
					            Box {
 | 
				
			||||||
                    border-color: black;
 | 
					                width: Metrics.size-md;
 | 
				
			||||||
                    border-width: 1px;
 | 
					                j-elevation: 3;
 | 
				
			||||||
                    border-radius: Theme.radius-md;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    width: Theme.size-md;
 | 
					                Rectangle { }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            Rectangle {
 | 
					        Box {
 | 
				
			||||||
                border-color: black;
 | 
					 | 
				
			||||||
                border-width: 1px;
 | 
					 | 
				
			||||||
                border-radius: Theme.radius-md;
 | 
					 | 
				
			||||||
                clip: true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            Text {
 | 
					            Text {
 | 
				
			||||||
                    font-size: Theme.font-lg;
 | 
					                color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					                font-size: Metrics.font-lg;
 | 
				
			||||||
                text: "INSERT TREE VIEW HERE";
 | 
					                text: "INSERT TREE VIEW HERE";
 | 
				
			||||||
                vertical-alignment: center;
 | 
					                vertical-alignment: center;
 | 
				
			||||||
                horizontal-alignment: center;
 | 
					                horizontal-alignment: center;
 | 
				
			||||||
| 
						 | 
					@ -157,4 +136,3 @@ export component ObjectToolPanel inherits Rectangle {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,17 +1,15 @@
 | 
				
			||||||
import { Theme } from "theme.slint";
 | 
					import { Metrics, DarkPalette } from "theme.slint";
 | 
				
			||||||
import { VerticalSeparator } from "widgets/separator.slint";
 | 
					import { VerticalSeparator } from "widgets/separator.slint";
 | 
				
			||||||
 | 
					import { HorizontalBox } from "widgets/layout.slint";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export component StatusBar inherits HorizontalBox {
 | 
				
			||||||
 | 
					    height: Metrics.size-lg;
 | 
				
			||||||
 | 
					    j-spacing: Metrics.spacing-lg;
 | 
				
			||||||
 | 
					    j-alignment: start;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export component StatusBar inherits Rectangle {
 | 
					 | 
				
			||||||
    border-color: black;
 | 
					 | 
				
			||||||
    border-width: 1px;
 | 
					 | 
				
			||||||
    height: Theme.size-lg;
 | 
					 | 
				
			||||||
    HorizontalLayout {
 | 
					 | 
				
			||||||
        alignment: start;
 | 
					 | 
				
			||||||
        padding-left: Theme.padding-lg;
 | 
					 | 
				
			||||||
        padding-right: Theme.padding-lg;
 | 
					 | 
				
			||||||
        spacing: Theme.padding-lg;
 | 
					 | 
				
			||||||
    Text {
 | 
					    Text {
 | 
				
			||||||
            font-size: Theme.font-md;
 | 
					        color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					        font-size: Metrics.font-md;
 | 
				
			||||||
        vertical-alignment: center;
 | 
					        vertical-alignment: center;
 | 
				
			||||||
        text: "Last saved: 18:50";
 | 
					        text: "Last saved: 18:50";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -19,11 +17,11 @@ export component StatusBar inherits Rectangle {
 | 
				
			||||||
    VerticalSeparator { }
 | 
					    VerticalSeparator { }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Text {
 | 
					    Text {
 | 
				
			||||||
            font-size: Theme.font-md;
 | 
					        color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					        font-size: Metrics.font-md;
 | 
				
			||||||
        vertical-alignment: center;
 | 
					        vertical-alignment: center;
 | 
				
			||||||
        text: "Saved by: Jayrude";
 | 
					        text: "Saved by: Jayrude";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    VerticalSeparator { }
 | 
					    VerticalSeparator { }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,26 +1,43 @@
 | 
				
			||||||
export global Theme {
 | 
					 | 
				
			||||||
    in-out property <length> padding-sm: 4px;
 | 
					 | 
				
			||||||
    in-out property <length> padding-md: 8px;
 | 
					 | 
				
			||||||
    in-out property <length> padding-lg: 16px;
 | 
					 | 
				
			||||||
    in-out property <length> padding-xl: 24px;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    in-out property <length> spacing-sm: 4px;
 | 
					export global DarkPalette {
 | 
				
			||||||
    in-out property <length> spacing-md: 8px;
 | 
					    out property <[brush]> text: [#78716c, #a8a29e, #d6d3d1, #e7e5e4, #fafaf9];
 | 
				
			||||||
    in-out property <length> spacing-lg: 16px;
 | 
					    out property <[brush]> background: [#0c0a09, #1c1917, #292524, #44403c, #57534e];
 | 
				
			||||||
    in-out property <length> spacing-xl: 24px;
 | 
					    out property <[brush]> primary: [#083344, #164e63, #155e75, #0e7490, #0891b2];
 | 
				
			||||||
 | 
					    out property <[brush]> secondary: [#44403c, #57534e, #78716c, #a8a29e, #d6d3d1];
 | 
				
			||||||
    in-out property <length> size-sm: 16px;
 | 
					    out property <[brush]> accent: [#4c1d95, #5b21b6, #6d28d9, #7c3aed, #8b5cf6];
 | 
				
			||||||
    in-out property <length> size-md: 24px;
 | 
					}
 | 
				
			||||||
    in-out property <length> size-lg: 32px;
 | 
					
 | 
				
			||||||
    in-out property <length> size-xl: 48px;
 | 
					export global LightPalette {
 | 
				
			||||||
 | 
					    out property <[brush]> text: [#57534e, #44403c, #292524, #1c1917, #0c0a09];
 | 
				
			||||||
    in-out property <length> radius-sm: 4px;
 | 
					    out property <[brush]> background: [#fafaf9, #e7e5e4, #d6d3d1, #a8a29e, #78716c];
 | 
				
			||||||
    in-out property <length> radius-md: 8px;
 | 
					    out property <[brush]> primary: [#06b6d4, #0891b2, #0e7490, #155e75, #164e63];
 | 
				
			||||||
    in-out property <length> radius-lg: 16px;
 | 
					    out property <[brush]> secondary: [#a8a29e, #78716c, #57534e, #44403c, #292524];
 | 
				
			||||||
    in-out property <length> radius-xl: 32px;
 | 
					    out property <[brush]> accent: [#8b5cf6, #7c3aed, #6d28d9, #5b21b6, #4c1d95];
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
    in-out property <length> font-sm: 10px;
 | 
					
 | 
				
			||||||
    in-out property <length> font-md: 12px;
 | 
					export global Metrics {
 | 
				
			||||||
    in-out property <length> font-lg: 16px;
 | 
					    out property <length> padding-sm: 4px;
 | 
				
			||||||
    in-out property <length> font-xl: 24px;
 | 
					    out property <length> padding-md: 8px;
 | 
				
			||||||
 | 
					    out property <length> padding-lg: 16px;
 | 
				
			||||||
 | 
					    out property <length> padding-xl: 24px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    out property <length> spacing-sm: 4px;
 | 
				
			||||||
 | 
					    out property <length> spacing-md: 8px;
 | 
				
			||||||
 | 
					    out property <length> spacing-lg: 16px;
 | 
				
			||||||
 | 
					    out property <length> spacing-xl: 24px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    out property <length> size-sm: 16px;
 | 
				
			||||||
 | 
					    out property <length> size-md: 24px;
 | 
				
			||||||
 | 
					    out property <length> size-lg: 32px;
 | 
				
			||||||
 | 
					    out property <length> size-xl: 48px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    out property <length> radius-sm: 4px;
 | 
				
			||||||
 | 
					    out property <length> radius-md: 8px;
 | 
				
			||||||
 | 
					    out property <length> radius-lg: 16px;
 | 
				
			||||||
 | 
					    out property <length> radius-xl: 32px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    out property <length> font-sm: 10px;
 | 
				
			||||||
 | 
					    out property <length> font-md: 12px;
 | 
				
			||||||
 | 
					    out property <length> font-lg: 16px;
 | 
				
			||||||
 | 
					    out property <length> font-xl: 24px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,24 +1,17 @@
 | 
				
			||||||
import { Theme } from "theme.slint";
 | 
					import { Metrics, DarkPalette } from "theme.slint";
 | 
				
			||||||
import { Button } from "std-widgets.slint";
 | 
					import { Button } from "std-widgets.slint";
 | 
				
			||||||
import { HorizontalSeparator } from "widgets/separator.slint";
 | 
					import { HorizontalSeparator } from "widgets/separator.slint";
 | 
				
			||||||
 | 
					import { Box, VerticalBox } from "widgets/layout.slint";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
component ToolBarItem inherits Rectangle {
 | 
					component ToolBarItem inherits Box {
 | 
				
			||||||
    width: Theme.size-lg;
 | 
					    width: Metrics.size-lg;
 | 
				
			||||||
    height: Theme.size-lg;
 | 
					    height: Metrics.size-lg;
 | 
				
			||||||
    border-color: black;
 | 
					    j-elevation: 2;
 | 
				
			||||||
    border-width: 1px;
 | 
					 | 
				
			||||||
    border-radius: Theme.radius-md;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export component ToolBar inherits Rectangle {
 | 
					export component ToolBar inherits VerticalBox {
 | 
				
			||||||
    width: Theme.size-xl;
 | 
					    width: Metrics.size-xl;
 | 
				
			||||||
    border-color: black;
 | 
					    j-alignment: start;
 | 
				
			||||||
    border-width: 1px;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    VerticalLayout {
 | 
					 | 
				
			||||||
        alignment: start;
 | 
					 | 
				
			||||||
        padding: Theme.padding-md;
 | 
					 | 
				
			||||||
        spacing: Theme.padding-md;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Button {
 | 
					    Button {
 | 
				
			||||||
        checkable: true;
 | 
					        checkable: true;
 | 
				
			||||||
| 
						 | 
					@ -54,4 +47,3 @@ export component ToolBar inherits Rectangle {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ToolBarItem { }
 | 
					    ToolBarItem { }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,60 @@
 | 
				
			||||||
 | 
					import {Metrics, DarkPalette} from "../theme.slint";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct BorderStyle {
 | 
				
			||||||
 | 
					    border-width: length,
 | 
				
			||||||
 | 
					    border-color: brush,
 | 
				
			||||||
 | 
					    border-radius: length,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export component HorizontalBox inherits Rectangle {
 | 
				
			||||||
 | 
					    // TODO: border, shadow
 | 
				
			||||||
 | 
					    in property <int> j-elevation: 1;
 | 
				
			||||||
 | 
					    in property <length> j-rounding: Metrics.radius-md;
 | 
				
			||||||
 | 
					    in property <length> j-padding: Metrics.padding-md;
 | 
				
			||||||
 | 
					    in property <length> j-spacing: Metrics.spacing-md;
 | 
				
			||||||
 | 
					    in property <LayoutAlignment> j-alignment: stretch;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    background: DarkPalette.background[j-elevation];
 | 
				
			||||||
 | 
					    border-radius: j-rounding;
 | 
				
			||||||
 | 
					    clip: true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    HorizontalLayout {
 | 
				
			||||||
 | 
					        alignment: j-alignment;
 | 
				
			||||||
 | 
					        padding: j-padding;
 | 
				
			||||||
 | 
					        spacing: j-spacing;
 | 
				
			||||||
 | 
					        @children
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export component VerticalBox inherits Rectangle {
 | 
				
			||||||
 | 
					    // TODO: border, shadow
 | 
				
			||||||
 | 
					    in property <int> j-elevation: 1;
 | 
				
			||||||
 | 
					    in property <length> j-rounding: Metrics.radius-md;
 | 
				
			||||||
 | 
					    in property <length> j-padding: Metrics.padding-md;
 | 
				
			||||||
 | 
					    in property <length> j-spacing: Metrics.spacing-md;
 | 
				
			||||||
 | 
					    in property <LayoutAlignment> j-alignment: stretch;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    background: DarkPalette.background[j-elevation];
 | 
				
			||||||
 | 
					    border-radius: j-rounding;
 | 
				
			||||||
 | 
					    clip: true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    VerticalLayout {
 | 
				
			||||||
 | 
					        alignment: j-alignment;
 | 
				
			||||||
 | 
					        padding: j-padding;
 | 
				
			||||||
 | 
					        spacing: j-spacing;
 | 
				
			||||||
 | 
					        @children
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export component Box inherits Rectangle {
 | 
				
			||||||
 | 
					    in property <int> j-elevation: 1;
 | 
				
			||||||
 | 
					    in property <length> j-rounding: Metrics.radius-md;
 | 
				
			||||||
 | 
					    in property <length> j-padding: Metrics.padding-md;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    background: DarkPalette.background[j-elevation];
 | 
				
			||||||
 | 
					    border-radius: j-rounding;
 | 
				
			||||||
 | 
					    clip: true;
 | 
				
			||||||
 | 
					    padding: j-padding;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @children
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -1,37 +1,18 @@
 | 
				
			||||||
import { Theme } from "../theme.slint";
 | 
					import { Metrics, DarkPalette } from "../theme.slint";
 | 
				
			||||||
 | 
					import { VerticalBox } from "layout.slint";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export component Panel inherits Rectangle {
 | 
					export component Panel inherits VerticalBox {
 | 
				
			||||||
    in property <string> title: "Title";
 | 
					    in property <string> title: "Title";
 | 
				
			||||||
    in property <TextHorizontalAlignment> title-alignment: left;
 | 
					    in property <TextHorizontalAlignment> title-alignment: left;
 | 
				
			||||||
    in property <length> content-padding: Theme.padding-md;
 | 
					 | 
				
			||||||
    in property <length> content-spacing: Theme.spacing-md;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    border-color: black;
 | 
					 | 
				
			||||||
    border-width: 1px;
 | 
					 | 
				
			||||||
    border-radius: Theme.radius-md;
 | 
					 | 
				
			||||||
    clip: true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    VerticalLayout {
 | 
					 | 
				
			||||||
        Rectangle {
 | 
					 | 
				
			||||||
            height: Theme.size-md;
 | 
					 | 
				
			||||||
            border-color: black;
 | 
					 | 
				
			||||||
            border-width: 1px;
 | 
					 | 
				
			||||||
            HorizontalLayout {
 | 
					 | 
				
			||||||
                padding-left: Theme.padding-md;
 | 
					 | 
				
			||||||
                padding-right: Theme.padding-md;
 | 
					 | 
				
			||||||
    Text {
 | 
					    Text {
 | 
				
			||||||
                    font-size: Theme.font-md;
 | 
					        height: Metrics.size-md;
 | 
				
			||||||
 | 
					        color: DarkPalette.text[4];
 | 
				
			||||||
 | 
					        font-size: Metrics.font-md;
 | 
				
			||||||
        text: title;
 | 
					        text: title;
 | 
				
			||||||
        vertical-alignment: center;
 | 
					        vertical-alignment: center;
 | 
				
			||||||
        horizontal-alignment: title-alignment;
 | 
					        horizontal-alignment: title-alignment;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        VerticalLayout {
 | 
					 | 
				
			||||||
            padding: content-padding;
 | 
					 | 
				
			||||||
            spacing: content-spacing;
 | 
					 | 
				
			||||||
    @children
 | 
					    @children
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,16 +1,20 @@
 | 
				
			||||||
 | 
					import {DarkPalette} from "../theme.slint";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export component VerticalSeparator {
 | 
					export component VerticalSeparator {
 | 
				
			||||||
 | 
					    width: 1px;
 | 
				
			||||||
    Path {
 | 
					    Path {
 | 
				
			||||||
        width: 1px;
 | 
					        width: 1px;
 | 
				
			||||||
        stroke: black;
 | 
					        stroke: DarkPalette.background[0];
 | 
				
			||||||
        stroke-width: 1px;
 | 
					        stroke-width: 1px;
 | 
				
			||||||
        commands: "M 0 0 L 0 1 Z";
 | 
					        commands: "M 0 0 L 0 1 Z";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export component HorizontalSeparator {
 | 
					export component HorizontalSeparator {
 | 
				
			||||||
 | 
					    height: 1px;
 | 
				
			||||||
    Path {
 | 
					    Path {
 | 
				
			||||||
        height: 1px;
 | 
					        height: 1px;
 | 
				
			||||||
        stroke: black;
 | 
					        stroke: DarkPalette.background[0];
 | 
				
			||||||
        stroke-width: 1px;
 | 
					        stroke-width: 1px;
 | 
				
			||||||
        commands: "M 0 0 L 1 0 Z";
 | 
					        commands: "M 0 0 L 1 0 Z";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue