import "../assets/fonts/DejaVuSans.ttf"; import "../assets/fonts/DejaVuSans-Bold.ttf"; import "../assets/fonts/DejaVuSansMono.ttf"; export global Strings { in-out property window-title: "Reclaim - File Recovery"; in-out property language: "Language"; in-out property appearance: "Appearance"; in-out property no-source-selected: "No source selected"; in-out property select-a-file-to-inspect: "Select a file to inspect its details."; in-out property reclaim: "reclaim"; in-out property a-second-chance-for-your: "A second chance for your files"; in-out property sources: "Sources"; in-out property recovered-files: "Recovered files"; in-out property settings-help: "Settings & help"; in-out property read-only-by-design: "Read-only by design"; in-out property your-source-stays-untouched-save: "Your source stays untouched. Save recovered files to another drive."; in-out property choose-a-drive-or-disk: "Choose a drive or disk image to search for deleted files."; in-out property inspect-candidates-choose-your-files: "Inspect candidates, choose your files, and recover them safely."; in-out property appearance-updates-and-a-little: "Appearance, updates, and a little guidance."; in-out property available-sources: "AVAILABLE SOURCES"; in-out property refresh: "Refresh"; in-out property open-disk-image: "Open disk image"; in-out property no-drives-found-open-a: "No drives found. Open a disk image or connect a drive and refresh."; in-out property selected-source: "SELECTED SOURCE"; in-out property start-scanning: "Start scanning"; in-out property search-name-or-offset: "Search name or offset…"; in-out property all-files: "All files"; in-out property pictures: "Pictures"; in-out property documents: "Documents"; in-out property archives: "Archives"; in-out property audio: "Audio"; in-out property video: "Video"; in-out property applications: "Applications"; in-out property icons: "Icons"; in-out property select-all: "Select all"; in-out property choose-a-drive: "Choose a drive"; in-out property minimize: "Minimize"; in-out property maximize: "Maximize"; in-out property restore: "Restore"; in-out property close: "Close"; in-out property save-to-a-different-physical-drive: "Save to a different physical drive"; in-out property separator: " · "; in-out property searching-candidates-will-appear-here: "Searching… candidates will appear here."; in-out property no-matching-files-yet-start: "No matching files yet. Start a scan from Sources."; in-out property file-inspector: "FILE INSPECTOR"; in-out property candidates-may-be-incomplete-verify: "Candidates may be incomplete. Verify recovered files before relying on them."; in-out property recover-selected: "Recover selected"; in-out property system-language: "System language"; in-out property light: "Light"; in-out property dark: "Dark"; in-out property system: "System"; in-out property general: "General"; in-out property about: "About"; in-out property version: "Version"; in-out property recover-in-three-steps: "Recover in three steps"; in-out property <[string]> recovery-step-list; in-out property supported-formats: "Supported formats"; in-out property photos-documents-archives-audio-video: "Photos, documents, archives, audio, video, applications, and small NTFS resident files. Unused-space scanning on FAT, exFAT, NTFS, ext2/3/4, and HFS+ volumes."; in-out property check-for-updates: "Check for updates"; in-out property restart-as-administrator: "Restart as administrator"; in-out property updates: "Updates"; in-out property whats-new: "What’s new"; in-out property later: "Later"; in-out property hide-details: "Hide details"; in-out property update-when-ready: "You can keep working and update later."; in-out property no-release-notes: "No release notes."; in-out property project-website: "Project website"; in-out property built-with-rust-and-slint: "Built with Rust and Slint · MIT licensed application"; in-out property stop: "Stop"; in-out property stop-recovery: "Stop recovery"; in-out property review-recovery-destination: "Review recovery destination"; in-out property saving-here-can-overwrite: "Saving here can overwrite the deleted files you are trying to recover and damage them permanently. Choose a folder on a different physical drive, such as a USB drive."; in-out property saving-to-the-same-drive: "Saving recovered files to the same physical drive you scanned can overwrite and permanently damage data you are trying to recover. Choose a folder on a different physical drive. Continue only if this destination is on another drive."; in-out property choose-another-folder: "Choose another folder"; in-out property save-here-anyway: "Save here anyway"; in-out property cancel: "Cancel"; in-out property phones-and-cameras-connect-for: "Phones and cameras connect for file transfer only, so Reclaim can’t search them for deleted files. If yours has a memory card, put the card in a card reader and scan it here. Also check its Trash or Recently deleted folder."; } import { CheckBox, LineEdit, ScrollView, ListView as NativeListView, Palette as NativePalette } from "std-widgets.slint"; export enum DriveIcon { disk, usb, volume, locked, phone } export struct DriveItem { name: string, device: string, icon: DriveIcon, detail: string, size: string, available: bool } export struct FileItem { name: string, kind: string, size: string, selected: bool, index: int } export struct ReleaseNoteBlock { text: string, kind: int } export global Locale { in-out property rtl; } // Design tokens. Every colour in the interface comes from here so both themes stay consistent. export global Palette { // 0 follows the system colour scheme, 1 is light, 2 is dark. in-out property theme: 0; changed theme => { NativePalette.color-scheme = self.theme == 2 ? ColorScheme.dark : self.theme == 1 ? ColorScheme.light : ColorScheme.unknown; } // The widget style resolves the system scheme; its background tells us which one it picked. property native-background: NativePalette.background; out property dark: theme == 2 || (theme == 0 && native-background.to-hsv().value < 0.5); out property bg: dark ? #1c2028 : #f4f6f9; out property surface: dark ? #252a33 : #ffffff; out property subtle: dark ? #303641 : #eef1f6; out property hover: dark ? #2c313c : #f3f5f9; out property selected: dark ? #31415f : #e6eeff; out property line: dark ? #3b424f : #dfe4ec; out property ink: dark ? #e6e9ef : #151c2b; out property muted: dark ? #aab3c2 : #5b6880; // Supporting text that must stay readable, between ink and muted. out property secondary: dark ? #c9d0db : #3f4b60; out property accent: dark ? #a3bdff : #2c5cc5; out property primary: dark ? #4c7be0 : #2c5cc5; out property primary-hover: dark ? #5c89ea : #3567d3; out property primary-pressed: dark ? #416cc9 : #244ea8; out property danger: dark ? #ffaaa4 : #b42318; // Filled Stop buttons. White text keeps at least 4.5:1 on each state, and // the dark fill keeps 3:1 against the card it sits on. out property stop: dark ? #d13c30 : #c42b1c; out property stop-hover: dark ? #c0392b : #b42318; out property stop-pressed: dark ? #b8322a : #a3261a; } // Shared metrics: one control height, one radius scale, spacing in multiples of 4. global Metrics { out property control: 36px; out property radius: 8px; } // A reserved gutter keeps the scrollbar clear of row controls in both directions. // Flickable retains Slint's wheel/touch scrolling and ListView virtualization. component FileScrollView { out property visible-width <=> viewport.width; out property visible-height <=> viewport.height; in-out property content-width <=> viewport.content-width; in-out property content-height <=> viewport.content-height; in-out property content-x <=> viewport.content-x; in-out property content-y <=> viewport.content-y; private property maximum: max(0px, root.content-height - viewport.height); private property thumb-height: min(rail.height, max(32px, rail.height * viewport.height / max(1px, root.content-height))); private property travel: max(0px, rail.height - root.thumb-height); min-width: 50px; min-height: 50px; horizontal-stretch: 1; vertical-stretch: 1; preferred-width: 100%; preferred-height: 100%; forward-focus: keyboard; keyboard := FocusScope { key-pressed(event) => { if event.text == Key.DownArrow { root.content-y = max(-root.maximum, root.content-y - 52px); return accept; } if event.text == Key.UpArrow { root.content-y = min(0px, root.content-y + 52px); return accept; } if event.text == Key.PageDown { root.content-y = max(-root.maximum, root.content-y - viewport.height); return accept; } if event.text == Key.PageUp { root.content-y = min(0px, root.content-y + viewport.height); return accept; } if event.text == Key.Home { root.content-y = 0px; return accept; } if event.text == Key.End { root.content-y = -root.maximum; return accept; } return reject; } } viewport := Flickable { x: Locale.rtl ? 14px : 0px; width: max(0px, parent.width - 14px); height: parent.height; mouse-drag-pan-enabled: false; content-width: self.width; @children } rail := Rectangle { x: Locale.rtl ? 0px : parent.width - self.width; width: 14px; height: parent.height; visible: root.maximum > 0px; Rectangle { x: (parent.width - self.width) / 2; y: root.maximum > 0px ? clamp(-root.content-y / root.maximum, 0, 1) * root.travel : 0px; width: drag.has-hover || drag.pressed ? 8px : 6px; height: root.thumb-height; border-radius: self.width / 2; background: drag.pressed ? Palette.accent : drag.has-hover ? Palette.secondary : Palette.muted.with-alpha(0.45); } drag := TouchArea { private property start-value; pointer-event(event) => { if event.button == PointerEventButton.left && event.kind == PointerEventKind.down { keyboard.focus(); // Clicking the track places the thumb around the pointer. if self.mouse-y < -root.content-y / root.maximum * root.travel || self.mouse-y > -root.content-y / root.maximum * root.travel + root.thumb-height { root.content-y = -clamp((self.mouse-y - root.thumb-height / 2) / max(1px, root.travel), 0, 1) * root.maximum; } self.start-value = root.content-y; } } moved => { if self.pressed { root.content-y = clamp(self.start-value - (self.mouse-y - self.pressed-y) * root.maximum / max(1px, root.travel), -root.maximum, 0px); } } scroll-event(event) => { root.content-y = clamp(root.content-y + event.delta-y, -root.maximum, 0px); return accept; } } } } // Slint recognizes the ListView name to position and virtualize repeated rows. component ListView inherits FileScrollView { @children accessible-role: list; accessible-orientation: Orientation.vertical; } component Label inherits Text { vertical-stretch: 0; horizontal-alignment: Locale.rtl ? right : left; } component Row inherits FlexboxLayout { flex-direction: Locale.rtl ? FlexboxLayoutDirection.row-reverse : FlexboxLayoutDirection.row; flex-wrap: no-wrap; alignment: stretch; cross-axis-alignment: center; } component SectionLabel inherits Label { color: Palette.muted; font-size: 11px; font-weight: 700; letter-spacing: Locale.rtl ? 0px : 0.4px; } component Body inherits Label { color: Palette.muted; font-size: 13px; wrap: word-wrap; } component Divider inherits Rectangle { height: 1px; background: Palette.line; vertical-stretch: 0; } component Card inherits Rectangle { clip: true; background: Palette.surface; border-radius: 12px; border-width: 1px; border-color: Palette.line; } // One button component: filled for the single primary action of a page, filled red (`stop`) // for stopping work in progress, outlined otherwise, borderless (`quiet`) for low-emphasis actions. // Rotate the path coordinates: the software renderer does not implement item rotation. component RefreshSpin inherits Path { private property phase: mod(animation-tick() / 1ms, 700) / 700 * 360deg; pure function rx(x: float, y: float) -> float { return 12 + (x - 12) * cos(root.phase) - (y - 12) * sin(root.phase); } pure function ry(x: float, y: float) -> float { return 12 + (x - 12) * sin(root.phase) + (y - 12) * cos(root.phase); } viewbox-width: 24; viewbox-height: 24; fill: transparent; stroke-width: 1.3px; stroke-line-cap: round; stroke-line-join: round; MoveTo { x: root.rx(20, 7); y: root.ry(20, 7); } ArcTo { radius-x: 9; radius-y: 9; large-arc: true; sweep: false; x: root.rx(21, 16); y: root.ry(21, 16); } MoveTo { x: root.rx(20, 2); y: root.ry(20, 2); } LineTo { x: root.rx(20, 8); y: root.ry(20, 8); } LineTo { x: root.rx(14, 8); y: root.ry(14, 8); } } component Action inherits Rectangle { in property text; in property icon; in property primary; in property stop; in property quiet; in property enabled: true; in property spinning; // Never narrower than its caption: for dialogs, where a cut-off choice is unreadable. in property fit; private property filled: root.primary || root.stop; callback clicked(); height: Metrics.control; min-width: root.fit ? max(64px, root.preferred-width) : 64px; horizontal-stretch: 0; preferred-width: caption.preferred-width + (root.icon.width > 0 ? 26px : 0px) + 30px; forward-focus: focus; accessible-role: button; accessible-label: root.text; accessible-enabled: root.enabled; accessible-action-default => { if root.enabled { root.clicked(); } } border-radius: Metrics.radius; border-width: focus.has-focus ? 2px : root.filled || quiet ? 0px : 1px; border-color: focus.has-focus ? Palette.accent : Palette.line; background: stop ? (touch.pressed ? Palette.stop-pressed : touch.has-hover ? Palette.stop-hover : Palette.stop) : primary ? (touch.pressed ? Palette.primary-pressed : touch.has-hover ? Palette.primary-hover : Palette.primary) : touch.pressed ? Palette.line : touch.has-hover ? Palette.subtle : quiet ? transparent : Palette.surface; animate background { duration: 120ms; } opacity: enabled || spinning ? 1 : 0.45; focus := FocusScope { enabled: root.enabled; key-pressed(event) => { if event.text == Key.Space || event.text == Key.Return { root.clicked(); return accept; } return reject; } } Row { padding-left: 14px; padding-right: 14px; spacing: 8px; if root.icon.width > 0 : Rectangle { width: 18px; height: 18px; if root.spinning : RefreshSpin { width: parent.width; height: parent.height; stroke: root.filled ? white : Palette.accent; } if !root.spinning : Image { width: parent.width; height: parent.height; source: root.icon; colorize: root.filled ? white : Palette.accent; } } caption := Label { font-size: 13px; font-weight: root.filled ? 600 : 500; min-width: 0px; horizontal-stretch: 1; overflow: elide; text: root.text; color: root.filled ? white : Palette.ink; vertical-alignment: center; } } touch := TouchArea { enabled: root.enabled; mouse-cursor: pointer; clicked => { focus.focus(); root.clicked(); } } } // Sidebar destination. The current page is tinted, never filled, so it does not compete with primary buttons. component NavItem inherits Rectangle { in property text; in property icon; in property current; callback clicked(); min-height: 40px; vertical-stretch: 0; forward-focus: focus; accessible-role: button; accessible-label: root.text; accessible-action-default => { root.clicked(); } border-radius: Metrics.radius; border-width: focus.has-focus ? 2px : 0px; border-color: Palette.accent; background: current ? Palette.selected : touch.has-hover ? Palette.hover : transparent; animate background { duration: 120ms; } focus := FocusScope { key-pressed(event) => { if event.text == Key.Space || event.text == Key.Return { root.clicked(); return accept; } return reject; } } Row { padding: 8px; padding-left: 12px; padding-right: 12px; spacing: 12px; Image { source: root.icon; width: 18px; height: 18px; colorize: root.current ? Palette.accent : Palette.muted; } Label { font-size: 13px; font-weight: root.current ? 600 : 400; min-width: 0px; horizontal-stretch: 1; wrap: word-wrap; text: root.text; color: root.current ? Palette.ink : Palette.muted; vertical-alignment: center; } } touch := TouchArea { mouse-cursor: pointer; clicked => { focus.focus(); root.clicked(); } } } // Icon-only segmented choice between light, dark and system themes. component ThemeOption inherits Rectangle { in property value; in property label; in property icon; property current: Palette.theme == root.value; width: 40px; height: 30px; border-radius: 6px; forward-focus: focus; accessible-role: button; accessible-label: root.label; accessible-checkable: true; accessible-checked: root.current; accessible-action-default => { Palette.theme = root.value; } background: current ? Palette.surface : touch.has-hover ? Palette.line : transparent; border-width: focus.has-focus ? 2px : current ? 1px : 0px; border-color: focus.has-focus ? Palette.accent : Palette.line; animate background { duration: 120ms; } Image { source: root.icon; width: 18px; height: 18px; colorize: root.current ? Palette.accent : Palette.muted; } focus := FocusScope { key-pressed(event) => { if event.text == Key.Space || event.text == Key.Return { Palette.theme = root.value; return accept; } return reject; } } touch := TouchArea { mouse-cursor: pointer; clicked => { focus.focus(); Palette.theme = root.value; } } } component ThemePicker inherits Rectangle { width: 132px; height: Metrics.control; horizontal-stretch: 0; border-radius: Metrics.radius; background: Palette.subtle; Row { padding: 3px; spacing: 3px; ThemeOption { value: 1; label: Strings.light; icon: @image-url("icons/sun.svg"); } ThemeOption { value: 2; label: Strings.dark; icon: @image-url("icons/moon.svg"); } ThemeOption { value: 0; label: Strings.system; icon: @image-url("icons/system.svg"); } } } component Choice inherits Rectangle { in property <[string]> model; in-out property current-index; callback selected(int); height: Metrics.control; min-width: 150px; horizontal-stretch: 1; background: touch.has-hover ? Palette.subtle : Palette.surface; border-radius: Metrics.radius; border-color: focus.has-focus ? Palette.accent : Palette.line; border-width: focus.has-focus ? 2px : 1px; forward-focus: focus; accessible-role: combobox; accessible-label: model[current-index]; accessible-expanded: popup.is-open; accessible-action-default => { focus.focus(); if popup.is-open { popup.close(); } else { popup.show(); } } Row { padding-left: 12px; padding-right: 10px; spacing: 8px; Label { text: root.model[root.current-index]; font-size: 13px; color: Palette.ink; overflow: elide; vertical-alignment: center; min-width: 0px; horizontal-stretch: 1; } Image { source: @image-url("icons/chevron.svg"); colorize: Palette.muted; width: 16px; height: 16px; } } callback key-handler(KeyEvent) -> EventResult; key-handler(event) => { if event.text == Key.Escape { popup.close(); return accept; } if event.text == Key.Space || event.text == Key.Return { if popup.is-open { popup.close(); } else { popup.show(); } return accept; } if event.text == Key.DownArrow || event.text == Key.UpArrow { root.current-index = clamp(root.current-index + (event.text == Key.DownArrow ? 1 : -1), 0, root.model.length - 1); root.selected(root.current-index); return accept; } return reject; } focus := FocusScope { key-pressed(event) => { root.key-handler(event) } } touch := TouchArea { mouse-cursor: pointer; clicked => { focus.focus(); if popup.is-open { popup.close(); } else { popup.show(); } } } popup := PopupWindow { y: root.height + 4px; width: root.width; height: min(320px, root.model.length * 36px + 10px); close-policy: close-on-click-outside; forward-focus: popup-focus; popup-focus := FocusScope { key-pressed(event) => { root.key-handler(event) } Rectangle { background: Palette.surface; border-width: 1px; border-color: Palette.line; border-radius: Metrics.radius; drop-shadow-blur: 16px; drop-shadow-offset-y: 4px; drop-shadow-color: #00000040; NativeListView { x: 5px; y: 5px; width: parent.width - 10px; height: parent.height - 10px; for value[index] in root.model : Rectangle { height: 36px; border-radius: 6px; background: index == root.current-index ? Palette.selected : option.has-hover ? Palette.subtle : transparent; Label { x: 10px; width: parent.width - 20px; height: parent.height; vertical-alignment: center; text: value; font-size: 13px; color: Palette.ink; overflow: elide; } option := TouchArea { mouse-cursor: pointer; clicked => { root.current-index = index; root.selected(index); popup.close(); } } } } } } } } // Release notes are rendered as bounded Markdown blocks, without executing links or HTML. component ReleaseNotes inherits Rectangle { in property <[ReleaseNoteBlock]> notes; height: min(190px, max(48px, notes-content.preferred-height + 8px)); ScrollView { width: parent.width; height: parent.height; notes-content := VerticalLayout { padding: 0px; padding-left: Locale.rtl ? 16px : 0px; padding-right: Locale.rtl ? 0px : 16px; spacing: 8px; alignment: start; if root.notes.length == 0 : Label { text: Strings.no-release-notes; color: Palette.secondary; wrap: word-wrap; } for block in root.notes : Label { text: block.text; wrap: word-wrap; min-width: 0px; color: block.kind == 1 ? Palette.ink : Palette.secondary; font-size: block.kind == 1 ? 15px : 13px; font-weight: block.kind == 1 ? 700 : 400; font-family: block.kind == 3 ? "DejaVu Sans Mono" : "DejaVu Sans"; } } } } component StepBadge inherits Rectangle { in property number; width: 32px; height: 24px; horizontal-stretch: 0; vertical-stretch: 0; Rectangle { width: 24px; height: 24px; border-radius: 12px; background: Palette.selected; Text { text: root.number; color: Palette.accent; font-size: 12px; font-weight: 700; horizontal-alignment: center; vertical-alignment: center; } } } // Settings building blocks: every row has the same icon tile, label column and trailing control edge. component GroupTitle inherits Label { color: Palette.muted; font-size: 12px; font-weight: 600; } component IconTile inherits Rectangle { in property icon; // Full-colour artwork (the app icon) is shown as is, larger and untinted. in property full-colour: false; width: 32px; height: 32px; border-radius: Metrics.radius; background: root.full-colour ? transparent : Palette.subtle; Image { source: root.icon; width: root.full-colour ? 30px : 18px; height: self.width; colorize: root.full-colour ? transparent : Palette.accent; } } component SettingRow inherits Row { in property icon; in property title; in property detail; in property full-colour-icon: false; padding: 12px; padding-left: 16px; padding-right: 16px; spacing: 12px; min-height: 60px; IconTile { icon: root.icon; full-colour: root.full-colour-icon; } VerticalLayout { horizontal-stretch: 1; min-width: 0px; spacing: 2px; alignment: center; Label { text: root.title; color: Palette.ink; font-size: 13px; font-weight: 500; wrap: word-wrap; } if root.detail != "" : Label { text: root.detail; color: Palette.muted; font-size: 12px; wrap: word-wrap; } } @children } // Divider that starts at the label column, so rows read as one group. component RowDivider inherits Rectangle { height: 1px; vertical-stretch: 0; Rectangle { x: Locale.rtl ? 16px : 60px; width: parent.width - 76px; background: Palette.line; } } // Centered icon + message for lists that have nothing to show yet. component EmptyState inherits VerticalLayout { in property text; in property icon; // Optional next step, shown as a button under the message. in property action; in property action-icon; callback activated(); alignment: center; spacing: 12px; padding: 24px; HorizontalLayout { alignment: center; Rectangle { width: 48px; height: 48px; border-radius: 24px; background: Palette.subtle; Image { source: root.icon; width: 22px; height: 22px; colorize: Palette.muted; } } } Text { text: root.text; color: Palette.muted; font-size: 13px; wrap: word-wrap; horizontal-alignment: center; } if root.action != "" : HorizontalLayout { alignment: center; padding-top: 4px; Action { text: root.action; icon: root.action-icon; clicked => { root.activated(); } } } } // What a scan is doing right now: status line, Stop, progress and any error. component ScanStatus inherits VerticalLayout { in property needs-administrator; callback restart-as-administrator(); in property status; // Quiet progress beside the status, such as "2.1 GiB of 5.7 GiB". in property detail; in property error; in property busy; in property progress; callback stop(); spacing: 10px; Row { spacing: 12px; min-height: 28px; Rectangle { width: 8px; height: 8px; border-radius: 4px; background: root.error != "" ? Palette.danger : root.busy ? Palette.primary : Palette.line; } // One steady line while busy; longer results after a scan may wrap. A zero preferred // width makes it take only the leftover space, so its width never follows the text. headline := Label { text: root.status; color: Palette.ink; font-size: 13px; wrap: root.busy ? TextWrap.no-wrap : TextWrap.word-wrap; overflow: elide; vertical-alignment: center; min-width: 0px; preferred-width: 0px; horizontal-stretch: 1; } if root.busy && root.detail != "" : Label { text: root.detail; color: Palette.secondary; font-size: 13px; vertical-alignment: center; horizontal-stretch: 0; } if root.busy : Action { height: 28px; text: Strings.stop; icon: @image-url("icons/stop.svg"); stop: true; clicked => { root.stop(); } } } if root.busy || root.progress > 0 : Rectangle { height: 4px; background: Palette.line; border-radius: 2px; clip: true; if root.busy && root.progress == 0 : Rectangle { x: (parent.width + self.width) * mod(animation-tick() / 1ms, 1800) / 1800 - self.width; width: parent.width / 4; border-radius: 2px; background: Palette.primary; } Rectangle { x: Locale.rtl ? parent.width - self.width : 0px; width: parent.width * root.progress; background: Palette.primary; border-radius: 2px; animate width { duration: 250ms; } } } if root.error != "" : Label { text: root.error; color: Palette.danger; wrap: word-wrap; font-size: 12px; } if root.needs-administrator && !root.busy : Row { Action { text: Strings.restart-as-administrator; icon: @image-url("icons/shield.svg"); primary: true; clicked => { root.restart-as-administrator(); } } Rectangle { horizontal-stretch: 1; } } } // System device name (nvme0n1p1, disk2s1, C:) set apart from human-readable labels. component DeviceTag inherits Rectangle { in property text; height: 18px; width: tag.preferred-width + 10px; border-radius: 4px; background: Palette.subtle; tag := Text { text: root.text; font-family: "DejaVu Sans Mono"; font-size: 11px; color: Palette.muted; } } // One caption button of the custom title bar. Close turns red on hover, as on Windows. component CaptionButton inherits Rectangle { in property icon; in property label; in property danger; callback clicked(); width: 46px; height: 36px; accessible-role: button; accessible-label: root.label; accessible-action-default => { root.clicked(); } background: touch.pressed ? (root.danger ? #a52a1f : Palette.line) : touch.has-hover ? (root.danger ? #c42b1c : Palette.subtle) : transparent; animate background { duration: 100ms; } Image { source: root.icon; width: 16px; height: 16px; colorize: root.danger && touch.has-hover ? #ffffff : Palette.ink; } touch := TouchArea { clicked => { root.clicked(); } } } // Title bar for the frameless window on Windows and Linux: drag to move, // double-click to maximize, caption buttons at the inline end (left in RTL). component TitleBar inherits Rectangle { in property maximized; callback minimize(); callback toggle-maximize(); callback close(); height: 36px; WindowMoveArea { TouchArea { double-clicked => { root.toggle-maximize(); } } } Row { alignment: end; CaptionButton { icon: @image-url("icons/window-minimize.svg"); label: Strings.minimize; clicked => { root.minimize(); } } CaptionButton { icon: root.maximized ? @image-url("icons/window-restore.svg") : @image-url("icons/window-maximize.svg"); label: root.maximized ? Strings.restore : Strings.maximize; clicked => { root.toggle-maximize(); } } CaptionButton { icon: @image-url("icons/window-close.svg"); label: Strings.close; danger: true; clicked => { root.close(); } } } } export component AppWindow inherits Window { title: Strings.window-title; icon: @image-url("../assets/icons/reclaim.png"); preferred-width: 1160px; preferred-height: 780px; min-width: 900px; min-height: 640px; background: Palette.bg; default-font-family: "DejaVu Sans"; default-font-size: 13px; // Draw our own title bar (Windows, Linux). macOS keeps its native traffic lights. in property custom-frame: true; no-frame: root.custom-frame; callback close-window(); in property <[DriveItem]> drives; in property <[FileItem]> files; in property source: Strings.no-source-selected; in property status; in property error; in property needs-administrator; callback restart-as-administrator(); in property summary; in property detail: Strings.select-a-file-to-inspect; in property preview; in-out property preview-error-raw; in-out property preview-error; in-out property preview-token; in property busy; in property drives-refreshing; // A phone or camera is connected; the Sources page explains why it cannot be scanned. in property phone-connected; in-out property refresh-feedback; Timer { interval: 700ms; running: root.refresh-feedback; triggered => { root.refresh-feedback = false; } } in-out property update-check-feedback; Timer { interval: 700ms; running: root.update-check-feedback; triggered => { root.update-check-feedback = false; } } in property can-scan; in property can-recover; // Recovery runs on its own, also while a scan continues. in property recovering; // The latest recovery message; empty shows the destination hint instead. in property recovery-status; // Every visible result is ticked (drives the list's "Select all" box). in-out property all-selected; // The scan produced results, so an empty list means the filters hide them. in property has-results; // The status strip has something to say beyond the first-run prompt. in property show-status: true; in property progress; in property scan-detail; in property selected-drive: -1; in property inspected: -1; in property version; in-out property page: 0; in-out property query; in-out property category; in property update-status; in property updates-managed; in property <[ReleaseNoteBlock]> update-notes; in property update-busy; in property update-installing; in property update-notice; in property update-title; in-out property update-details-open; in property update-available; in property update-label; in property update-progress; in-out property language; callback change-language(int); callback open-project(); callback apply-update(); callback dismiss-update(); callback open-image(); callback refresh(); callback select-drive(int); callback scan(); callback stop(); // A recovery folder that may share a drive with the scanned source waits here // for the user's decision. A same-drive folder can only be replaced, never accepted. in property destination-review; in property destination-same-drive; in property destination-path; callback choose-another-destination(); callback save-here-anyway(); callback cancel-destination(); callback recover(); callback toggle-file(int); callback inspect(int); callback select-all(bool); callback filter(); callback check-update(); Row { cross-axis-alignment: stretch; // ── Sidebar ───────────────────────────────────────────── Rectangle { width: 232px; background: Palette.surface; VerticalLayout { padding: 16px; spacing: 4px; // Brand: icon and name kept together at the inline start; drags the window. Rectangle { height: 36px; Row { alignment: start; spacing: 8px; Image { width: 32px; height: 32px; source: @image-url("../assets/icons/reclaim-64.png"); } Label { text: Strings.reclaim; color: Palette.ink; font-size: 19px; font-weight: 700; vertical-alignment: center; horizontal-stretch: 0; } } if root.custom-frame : WindowMoveArea { } } Rectangle { height: 6px; } Label { text: Strings.a-second-chance-for-your; color: Palette.secondary; font-size: 12px; wrap: word-wrap; } Rectangle { height: 20px; } NavItem { text: Strings.sources; icon: @image-url("icons/drive.svg"); current: root.page == 0; clicked => { root.page = 0; } } NavItem { text: Strings.recovered-files; icon: @image-url("icons/files.svg"); current: root.page == 1; clicked => { root.page = 1; } } NavItem { text: Strings.settings-help; icon: @image-url("icons/settings.svg"); current: root.page == 2; clicked => { root.page = 2; } } Rectangle { vertical-stretch: 1; min-height: 24px; } Rectangle { border-radius: 10px; background: Palette.bg; vertical-stretch: 0; VerticalLayout { padding: 12px; spacing: 6px; Row { spacing: 8px; Image { source: @image-url("icons/shield.svg"); width: 16px; height: 16px; colorize: Palette.accent; } Label { text: Strings.read-only-by-design; color: Palette.ink; font-size: 12px; font-weight: 600; min-width: 0px; horizontal-stretch: 1; wrap: word-wrap; } } Label { text: Strings.your-source-stays-untouched-save; color: Palette.secondary; wrap: word-wrap; font-size: 12px; } } } Rectangle { height: 12px; } // Footer: product and version, aligned with the card's text. Row { alignment: start; spacing: 6px; padding-left: 12px; padding-right: 12px; height: 18px; Label { text: "Reclaim"; color: Palette.muted; font-size: 11px; font-weight: 600; vertical-alignment: center; horizontal-stretch: 0; } DeviceTag { text: "v" + root.version; } } } } Rectangle { width: 1px; background: Palette.line; } // ── Page ──────────────────────────────────────────────── VerticalLayout { horizontal-stretch: 1; padding: 24px; padding-top: root.custom-frame ? 40px : 20px; spacing: 16px; VerticalLayout { spacing: 4px; vertical-stretch: 0; Label { text: root.page == 0 ? Strings.sources : root.page == 1 ? Strings.recovered-files : Strings.settings-help; color: Palette.ink; font-size: 22px; font-weight: 700; } Body { text: root.page == 0 ? Strings.choose-a-drive-or-disk : root.page == 1 ? Strings.inspect-candidates-choose-your-files : Strings.appearance-updates-and-a-little; } } // Sources: pick a drive, then start the scan. if root.page == 0 : VerticalLayout { vertical-stretch: 1; spacing: 12px; Row { height: Metrics.control; cross-axis-alignment: stretch; spacing: 8px; SectionLabel { text: Strings.available-sources; vertical-alignment: center; } Rectangle { horizontal-stretch: 1; height: 1px; } Action { text: Strings.refresh; icon: @image-url("icons/refresh.svg"); spinning: root.drives-refreshing || root.refresh-feedback; enabled: !root.busy && !root.drives-refreshing && !root.refresh-feedback; clicked => { root.refresh-feedback = true; root.refresh(); } } Action { text: Strings.open-disk-image; icon: @image-url("icons/files.svg"); enabled: !root.busy; clicked => { root.open-image(); } } } // Sized to its rows so the action bar sits right under a short list; // a long list fills the space and scrolls. Rows are 48px + 4px gaps. Card { vertical-stretch: 1000; max-height: root.drives.length == 0 ? 220px : root.drives.length * 52px + 12px; if root.drives.length == 0 : EmptyState { text: Strings.no-drives-found-open-a; icon: @image-url("icons/drive.svg"); } if root.drives.length > 0 : ScrollView { VerticalLayout { padding: 8px; spacing: 4px; alignment: start; for drive[i] in root.drives : Rectangle { height: 48px; border-radius: Metrics.radius; opacity: drive.available ? 1 : 0.5; background: root.selected-drive == i ? Palette.selected : area.has-hover ? Palette.hover : transparent; animate background { duration: 120ms; } Row { padding-left: 8px; padding-right: 12px; spacing: 10px; Rectangle { width: 32px; height: 32px; border-radius: Metrics.radius; background: root.selected-drive == i ? Palette.surface : Palette.subtle; Image { width: 18px; height: 18px; colorize: drive.icon == DriveIcon.locked || drive.icon == DriveIcon.phone ? Palette.muted : Palette.accent; source: drive.icon == DriveIcon.usb ? @image-url("icons/usb.svg") : drive.icon == DriveIcon.volume ? @image-url("icons/volume.svg") : drive.icon == DriveIcon.locked ? @image-url("icons/lock.svg") : drive.icon == DriveIcon.phone ? @image-url("icons/phone.svg") : @image-url("icons/drive.svg"); } } VerticalLayout { horizontal-stretch: 1; min-width: 0px; spacing: 1px; alignment: center; Row { spacing: 6px; Label { text: drive.name; color: Palette.ink; font-size: 14px; font-weight: 600; overflow: elide; min-width: 0px; horizontal-stretch: 0; } if drive.device != "" : DeviceTag { text: drive.device; } Rectangle { horizontal-stretch: 1; } } Label { text: drive.detail; color: Palette.muted; font-size: 12px; overflow: elide; } } Label { text: drive.size; color: Palette.muted; font-size: 13px; vertical-alignment: center; } Rectangle { width: 18px; height: 18px; border-radius: 9px; border-width: 2px; border-color: root.selected-drive == i ? Palette.primary : Palette.line; Rectangle { visible: root.selected-drive == i; width: 8px; height: 8px; border-radius: 4px; background: Palette.primary; } } } forward-focus: drive-focus; accessible-role: button; accessible-label: drive.name; accessible-enabled: !root.busy && drive.available; accessible-action-default => { if !root.busy && drive.available { root.select-drive(i); } } border-width: drive-focus.has-focus ? 2px : 0px; border-color: Palette.accent; drive-focus := FocusScope { enabled: !root.busy && drive.available; key-pressed(event) => { if event.text == Key.Space || event.text == Key.Return { root.select-drive(i); return accept; } return reject; } } area := TouchArea { enabled: !root.busy && drive.available; mouse-cursor: pointer; clicked => { drive-focus.focus(); root.select-drive(i); } } } } } } // Phones are listed but cannot be scanned; say why and what works instead. if root.phone-connected : Row { spacing: 8px; padding-left: 4px; padding-right: 4px; VerticalLayout { padding-top: 1px; alignment: start; Image { source: @image-url("icons/phone.svg"); width: 16px; height: 16px; colorize: Palette.muted; } } phone-note := Label { text: Strings.phones-and-cameras-connect-for; color: Palette.secondary; font-size: 12px; wrap: word-wrap; min-width: 0px; horizontal-stretch: 1; } } Rectangle { vertical-stretch: 1; } // One action bar: what will be scanned, the button that scans it, and, // only while something runs or failed, the scan status. Card { vertical-stretch: 0; VerticalLayout { padding: 12px; padding-left: 16px; padding-right: 16px; spacing: 12px; Row { spacing: 16px; VerticalLayout { horizontal-stretch: 1; min-width: 0px; spacing: 4px; alignment: center; SectionLabel { text: Strings.selected-source; } Label { text: root.source; color: root.can-scan || root.busy ? Palette.ink : Palette.muted; font-size: 14px; overflow: elide; } } Action { height: 40px; text: Strings.start-scanning; icon: @image-url("icons/search.svg"); primary: true; enabled: root.can-scan; clicked => { root.scan(); } } } if root.busy || root.error != "" : Divider {} if root.busy || root.error != "" : ScanStatus { status: root.status; detail: root.scan-detail; error: root.error; needs-administrator: root.needs-administrator; restart-as-administrator => { root.restart-as-administrator(); } busy: root.busy; progress: root.progress; stop => { root.stop(); } } } } } // Recovered files: filter, inspect, select, recover. // Two columns all the way down: the list column (search, list, hint) and the // inspector column (category, details, Recover), so every edge lines up. if root.page == 1 : VerticalLayout { vertical-stretch: 1; spacing: 12px; Row { height: Metrics.control; cross-axis-alignment: stretch; spacing: 12px; LineEdit { height: Metrics.control; min-width: 120px; horizontal-stretch: 1; font-size: 13px; horizontal-alignment: Locale.rtl ? right : left; placeholder-text: Strings.search-name-or-offset; text <=> root.query; edited => { root.filter(); } } Choice { horizontal-stretch: 0; width: 264px; model: [Strings.all-files, Strings.pictures, Strings.documents, Strings.archives, Strings.audio, Strings.video, Strings.applications, Strings.icons]; current-index <=> root.category; selected(_) => { root.filter(); } } } Row { cross-axis-alignment: stretch; vertical-stretch: 1; spacing: 12px; Card { horizontal-stretch: 1; min-width: 0px; VerticalLayout { // List header: one "select all" box above the row boxes, with the counts // under its caption. Stacked, each line gets the full width of the narrow // list column, so neither is cut off in German at the compact size. They // never elide; the layout tests check both stay inside the list column. Row { height: 44px; vertical-stretch: 0; padding-left: 18px; padding-right: 18px; spacing: 10px; CheckBox { horizontal-stretch: 0; enabled: root.files.length > 0; checked <=> root.all-selected; accessible-label: Strings.select-all; toggled => { root.select-all(self.checked); } } VerticalLayout { horizontal-stretch: 1; alignment: center; spacing: 1px; select-all-caption := Label { text: Strings.select-all; color: root.files.length > 0 ? Palette.ink : Palette.muted; font-size: 13px; font-weight: 500; min-width: self.preferred-width; } list-summary := Label { text: root.summary; color: Palette.muted; font-size: 12px; min-width: self.preferred-width; } } } Divider { } Rectangle { vertical-stretch: 1; if root.files.length == 0 : EmptyState { width: parent.width; height: parent.height; text: root.busy ? Strings.searching-candidates-will-appear-here : Strings.no-matching-files-yet-start; icon: @image-url("icons/search.svg"); action: root.busy || root.has-results ? "" : Strings.choose-a-drive; action-icon: @image-url("icons/drive.svg"); activated => { root.page = 0; } } if root.files.length > 0 : files-view := ListView { x: 8px; y: 6px; width: parent.width - 16px; height: parent.height - 12px; content-height: root.files.length * 52px; for file in root.files : Rectangle { height: 52px; accessible-role: list-item; accessible-label: file.name; accessible-action-default => { root.inspect(file.index); } Rectangle { y: 2px; height: parent.height - 4px; border-radius: Metrics.radius; background: file.index == root.inspected ? Palette.selected : row.has-hover ? Palette.hover : transparent; border-width: row-focus.has-focus ? 2px : 0px; border-color: Palette.accent; row-focus := FocusScope { key-pressed(event) => { if event.text == Key.Return { root.inspect(file.index); return accept; } return reject; } } row := TouchArea { mouse-cursor: pointer; clicked => { row-focus.focus(); root.inspect(file.index); } } Row { padding-left: 10px; padding-right: 10px; spacing: 10px; CheckBox { horizontal-stretch: 0; checked: file.selected; accessible-label: file.name; toggled => { root.toggle-file(file.index); } } Image { source: @image-url("icons/files.svg"); width: 20px; height: 20px; colorize: Palette.accent; } VerticalLayout { horizontal-stretch: 1; min-width: 0px; spacing: 2px; alignment: center; Label { text: file.name; color: Palette.ink; font-size: 13px; font-weight: 500; overflow: elide; } Label { text: file.kind + Strings.separator + file.size; color: Palette.muted; font-size: 11px; overflow: elide; } } } } } } } } } Card { width: 264px; VerticalLayout { padding: 16px; spacing: 12px; SectionLabel { text: Strings.file-inspector; } if root.preview.width > 0 : Rectangle { height: 132px; vertical-stretch: 0; border-radius: Metrics.radius; background: Palette.bg; clip: true; Image { source: root.preview; width: parent.width - 8px; height: parent.height - 8px; image-fit: contain; } } if root.inspected < 0 : EmptyState { vertical-stretch: 1; padding: 8px; text: root.detail; icon: @image-url("icons/files.svg"); } if root.inspected >= 0 : ScrollView { vertical-stretch: 1; Label { x: Locale.rtl ? 12px : 0px; y: 0px; width: parent.width - 12px; height: self.preferred-height; vertical-alignment: top; text: root.detail; font-size: 13px; color: Palette.ink; wrap: word-wrap; } } if root.preview-error != "" : Label { text: root.preview-error; color: Palette.danger; wrap: word-wrap; font-size: 12px; } Divider { } Label { text: Strings.candidates-may-be-incomplete-verify; color: Palette.muted; wrap: word-wrap; font-size: 11px; } } } } // Hint under the list, Recover under the inspector: same column widths as above. Row { height: 40px; cross-axis-alignment: center; spacing: 12px; Row { horizontal-stretch: 1; min-width: 0px; spacing: 8px; padding-left: 4px; padding-right: 4px; Image { source: @image-url("icons/shield.svg"); width: 16px; height: 16px; colorize: Palette.muted; } // Recovery messages may take two lines; the row keeps its height. recovery-message := Label { text: root.recovery-status != "" ? root.recovery-status : Strings.save-to-a-different-physical-drive; color: root.recovery-status != "" ? Palette.ink : Palette.muted; font-size: 12px; vertical-alignment: center; min-width: 0px; height: 30px; horizontal-stretch: 1; wrap: word-wrap; overflow: elide; } } // While recovering, the same button turns red and stops the recovery. Action { width: 264px; height: 40px; text: root.recovering ? Strings.stop-recovery : Strings.recover-selected; icon: root.recovering ? @image-url("icons/stop.svg") : @image-url("icons/reclaim.svg"); primary: !root.recovering; stop: root.recovering; enabled: root.can-recover; clicked => { root.recover(); } } } } // Settings & help: preferences, then guidance, then version and project details. // The scroll area reaches 16px into the page padding so its scrollbar never covers a card. if root.page == 2 : Rectangle { vertical-stretch: 1; ScrollView { x: 0px; y: 0px; width: parent.width + 16px; height: parent.height; VerticalLayout { padding-right: 16px; spacing: 8px; alignment: start; GroupTitle { text: Strings.updates; } Card { VerticalLayout { SettingRow { icon: @image-url("icons/download.svg"); title: Strings.version + " " + root.version; detail: root.update-available && !root.update-busy && root.update-title != "" ? root.update-title : root.update-status; if root.update-available : Action { text: root.update-details-open ? Strings.hide-details : Strings.whats-new; quiet: true; clicked => { root.update-details-open = !root.update-details-open; } } if !root.updates-managed : Action { enabled: !root.update-busy && (root.update-available ? !root.busy : !root.update-check-feedback); spinning: root.update-busy || (!root.update-available && root.update-check-feedback); primary: root.update-available; text: root.update-available ? root.update-label : Strings.check-for-updates; icon: root.update-available ? @image-url("icons/download.svg") : @image-url("icons/refresh.svg"); clicked => { if root.update-available { root.apply-update(); } else { root.update-check-feedback = true; root.check-update(); } } } } if root.update-details-open || root.update-installing : VerticalLayout { padding: 16px; padding-top: 4px; padding-left: Locale.rtl ? 16px : 60px; padding-right: Locale.rtl ? 60px : 16px; spacing: 12px; if root.update-details-open : ReleaseNotes { notes: root.update-notes; } if root.update-installing : Rectangle { height: 4px; border-radius: 2px; clip: true; background: Palette.line; Rectangle { x: Locale.rtl ? parent.width - self.width : 0px; width: parent.width * clamp(root.update-progress, 0, 1); background: Palette.primary; animate width { duration: 200ms; } } } } } } Rectangle { height: 8px; } GroupTitle { text: Strings.general; } Card { VerticalLayout { SettingRow { icon: @image-url("icons/globe.svg"); title: Strings.language; VerticalLayout { horizontal-stretch: 0; width: 220px; alignment: center; Choice { model: [Strings.system-language, "English", "עברית", "Español", "Français", "Deutsch", "العربية", "Русский"]; current-index <=> root.language; selected(i) => { root.change-language(i); } } } } RowDivider { } SettingRow { icon: @image-url("icons/contrast.svg"); title: Strings.appearance; ThemePicker { accessible-role: groupbox; accessible-label: Strings.appearance; } } } } Rectangle { height: 8px; } GroupTitle { text: Strings.recover-in-three-steps; } Card { VerticalLayout { padding: 16px; spacing: 12px; // A box layout (not Row's flexbox) so wrapped text is measured at its final width. for step[i] in Strings.recovery-step-list : HorizontalLayout { spacing: 12px; if !Locale.rtl : StepBadge { number: i + 1; } Label { text: step; color: Palette.ink; font-size: 13px; wrap: word-wrap; min-width: 0px; horizontal-stretch: 1; vertical-alignment: center; } if Locale.rtl : StepBadge { number: i + 1; } } Divider { } Label { text: Strings.supported-formats; color: Palette.ink; font-size: 13px; font-weight: 600; } Body { text: Strings.photos-documents-archives-audio-video; } } } Rectangle { height: 8px; } GroupTitle { text: Strings.about; } Card { VerticalLayout { SettingRow { icon: @image-url("../assets/icons/reclaim-64.png"); full-colour-icon: true; title: Strings.reclaim; detail: Strings.built-with-rust-and-slint; Action { text: Strings.project-website; icon: @image-url("icons/external.svg"); clicked => { root.open-project(); } } } } } } } } // Status strip for Recovered files. Sources shows status inside its action bar; // Settings has nothing to do with scanning, so it only appears there while a scan runs or failed. if (root.page == 1 && root.show-status) || (root.page == 2 && (root.busy || root.error != "")) : Card { vertical-stretch: 0; ScanStatus { padding: 12px; padding-left: 16px; padding-right: 16px; status: root.status; detail: root.scan-detail; error: root.error; needs-administrator: root.needs-administrator; restart-as-administrator => { root.restart-as-administrator(); } busy: root.busy; progress: root.progress; stop => { root.stop(); } } } } } // The update notice is a centered dialog over a dimmed backdrop. The backdrop swallows // clicks so nothing behind it is triggered by accident; it is dismissed only with Later. if root.update-notice && !root.busy && !root.update-installing && root.page != 2 : Rectangle { background: #00000066; TouchArea { } Rectangle { x: (parent.width - self.width) / 2; y: (parent.height - self.height) / 2; width: min(460px, parent.width - 40px); height: min(notice-content.preferred-height, parent.height - 40px); clip: true; background: Palette.surface; border-radius: 12px; border-width: 1px; border-color: Palette.line; drop-shadow-blur: 24px; drop-shadow-offset-y: 6px; drop-shadow-color: #00000050; notice-content := VerticalLayout { padding: 20px; spacing: 12px; Row { spacing: 12px; IconTile { icon: @image-url("icons/download.svg"); } VerticalLayout { horizontal-stretch: 1; min-width: 0px; spacing: 4px; Label { text: root.update-title; color: Palette.ink; font-size: 16px; font-weight: 700; wrap: word-wrap; } Body { text: Strings.update-when-ready; font-size: 12px; } } } if root.update-details-open : ReleaseNotes { notes: root.update-notes; } Row { spacing: 8px; Action { text: root.update-details-open ? Strings.hide-details : Strings.whats-new; quiet: true; clicked => { root.update-details-open = !root.update-details-open; } } Rectangle { horizontal-stretch: 1; } Action { text: Strings.later; quiet: true; clicked => { root.dismiss-update(); } } Action { text: root.update-label; primary: true; enabled: !root.update-busy; clicked => { root.apply-update(); } } } } } } // Recovery destination review: same backdrop and card as the update notice. It names // the chosen folder, explains the risk and offers the safe choice first. Escape cancels. if root.destination-review : destination-keys := FocusScope { x: 0px; y: 0px; width: root.width; height: root.height; init => { self.focus(); } key-pressed(event) => { if event.text == Key.Escape { root.cancel-destination(); return accept; } return reject; } Rectangle { background: #00000066; TouchArea { } } destination-card := Rectangle { x: (parent.width - self.width) / 2; y: (parent.height - self.height) / 2; width: min(620px, parent.width - 40px); height: min(destination-content.preferred-height, parent.height - 40px); clip: true; background: Palette.surface; border-radius: 12px; border-width: 1px; border-color: Palette.line; drop-shadow-blur: 24px; drop-shadow-offset-y: 6px; drop-shadow-color: #00000050; destination-content := VerticalLayout { padding: 20px; spacing: 14px; Row { spacing: 12px; IconTile { icon: @image-url("icons/drive.svg"); } VerticalLayout { horizontal-stretch: 1; min-width: 0px; spacing: 2px; alignment: center; Label { text: Strings.review-recovery-destination; color: Palette.ink; font-size: 16px; font-weight: 700; wrap: word-wrap; } destination-folder := Label { text: root.destination-path; color: Palette.muted; font-size: 12px; overflow: elide; min-width: 0px; } } } Body { text: root.destination-same-drive ? Strings.saving-here-can-overwrite : Strings.saving-to-the-same-drive; color: Palette.secondary; } Row { spacing: 8px; Rectangle { horizontal-stretch: 1; } Action { text: Strings.cancel; quiet: true; fit: true; clicked => { root.cancel-destination(); } } if !root.destination-same-drive : Action { text: Strings.save-here-anyway; fit: true; clicked => { root.save-here-anyway(); } } Action { text: Strings.choose-another-folder; icon: @image-url("icons/files.svg"); primary: true; fit: true; clicked => { root.choose-another-destination(); } } } } } } // The page column's title bar, drawn over its top padding. if root.custom-frame : TitleBar { x: Locale.rtl ? 0px : 233px; y: 0px; width: root.width - 233px; maximized: root.maximized; minimize => { root.minimized = true; } toggle-maximize => { root.maximized = !root.maximized; } close => { root.close-window(); } } // A hairline edge, since a frameless window has no system border. if root.custom-frame && !root.maximized : Rectangle { border-width: 1px; border-color: Palette.line; } }