mirror of
				https://github.com/slint-ui/slint.git
				synced 2025-10-31 12:04:33 +00:00 
			
		
		
		
	 0870585c32
			
		
	
	
		0870585c32
		
			
		
	
	
	
	
		
			
			* Added TodoMVC example (Rust mock version) * TodoMVC: use visible-width instead of width for selection items and format * TodoMVC: layout fix for qt checkbox * TdodoMVC: fix license issues in the example * Update examples/todo_mvc/ui/views/task_list_view.slint Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * TdodoMVC: fix license issues in the example * TodoMVC: code review changes * TodoMVC: code review changes * Update .reuse/dep5 Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev> * Update examples/todo_mvc/rust/src/adapters/navigation_adapter.rs Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev> * Update examples/todo_mvc/rust/src/adapters/navigation_adapter.rs Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev> * TodoMVC: refactor task list model (code review feedback) * TodoMVC: code review feedback * Update examples/todo-mvc/rust/src/mvc/controllers/task_list_controller.rs Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * TodoMVC: add missing link in dep5 * dep5 fix --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Simon Hausmann <simon.hausmann@slint.dev>
		
			
				
	
	
		
			58 lines
		
	
	
	
		
			2 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
	
		
			2 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| // Copyright © SixtyFPS GmbH <info@slint.dev>
 | |
| // SPDX-License-Identifier: MIT
 | |
| 
 | |
| import { Palette } from "std-widgets.slint";
 | |
| 
 | |
| export global AnimationSettings {
 | |
|     out property <duration> color-duration: 200ms;
 | |
|     out property <duration> move-duration: 400ms;
 | |
|     out property <easing> move-easing: cubic-bezier(0.3, 0.0, 0.8, 0.15);
 | |
| }
 | |
| 
 | |
| export global TodoPalette {
 | |
|     out property <brush> foreground: Palette.foreground;
 | |
|     out property <brush> accent-background: Palette.accent-background;
 | |
|     out property <brush> accent-foreground: Palette.accent-foreground;
 | |
|     out property <brush> focus-border: Palette.accent-background;
 | |
|     out property <brush> state-pressed: root.dark-color-scheme ? #ffffff.with-alpha(0.3) : #000000.with-alpha(0.3);
 | |
|     out property <brush> state-hovered: root.dark-color-scheme ? #ffffff.with-alpha(0.2) : #000000.with-alpha(0.2);
 | |
| 
 | |
|     property <bool> dark-color-scheme: Palette.color-scheme == ColorScheme.dark;
 | |
| }
 | |
| 
 | |
| export struct TextStyle {
 | |
|     font-size: relative-font-size,
 | |
|     font-weight: int,
 | |
| }
 | |
| 
 | |
| export global FontSettings {
 | |
|     out property <int> light-font-weight: 300;
 | |
|     out property <int> regular-font-weight: 500;
 | |
|     out property <int> semi-bold-font-weight: 600;
 | |
|     out property <TextStyle> body: {
 | |
|         font-size: 14 * 0.0769rem,
 | |
|         font-weight: root.light-font-weight,
 | |
|     };
 | |
|     out property <TextStyle> body-strong: {
 | |
|         font-size: 16 * 0.0769rem,
 | |
|         font-weight: root.semi-bold-font-weight,
 | |
|     };
 | |
| }
 | |
| 
 | |
| export global SizeSettings {
 | |
|     out property <length> control-icon-height: 16px;
 | |
|     out property <length> control-icon-big-height: 32px;
 | |
|     out property <length> control-height: 32px;
 | |
|     out property <length> control-big-height: 48px;
 | |
| }
 | |
| 
 | |
| export global SpaceSettings {
 | |
|     out property <length> default-spacing: 4px;
 | |
|     out property <length> default-padding: 8px;
 | |
| }
 | |
| 
 | |
| export global Icons {
 | |
|     out property <image> add: @image-url("../../assets/add.svg");
 | |
|     out property <image> remove: @image-url("../../assets/remove.svg");
 | |
|     out property <image> close: @image-url("../../assets/close.svg");
 | |
| }
 |