From 2949d7a0a100532899ed992a0e892a2146ff3709 Mon Sep 17 00:00:00 2001 From: astar76 Date: Fri, 27 Nov 2026 07:10:38 -0600 Subject: [PATCH] Add the --gallery page and release packaging - quince --gallery shows every control in every state, light/dark/AMOLED and four seeds; "--gallery over" runs the real chrome on a made-up film. - Fix: a toast's action button was drawn under the toast; the disabled play triangle showed a seam where its halves overlap. - tools/package.sh (from Mulberry's): tar.gz, AppImage, Arch, .deb, Nix, Windows installer and portable zip; installer.sh, LICENSE, build.rs for the exe's icon and version, Inno Setup script, PKGBUILD. - Release notes for 0.1.0 in docs/releases. Co-Authored-By: Claude Opus 5.5 --- .gitignore | 1 + LICENSE | 21 ++ README.md | 19 ++ build.rs | 29 +++ docs/STATUS.md | 18 +- docs/releases/0.1.0.md | 9 + flake.nix | 10 + installer.sh | 159 +++++++++++++++ packaging/arch/.SRCINFO | 33 +++ packaging/arch/PKGBUILD | 31 +++ packaging/nix/default.nix | 33 +++ packaging/quince.ico | Bin 0 -> 370070 bytes packaging/quince.iss | 51 +++++ src/main.rs | 6 +- src/ui/chrome.rs | 8 +- src/ui/controls.rs | 22 +- src/ui/gallery.rs | 415 ++++++++++++++++++++++++++++++++++++++ src/ui/mod.rs | 1 + tools/package.sh | 226 +++++++++++++++++++++ 19 files changed, 1079 insertions(+), 13 deletions(-) create mode 100644 LICENSE create mode 100644 build.rs create mode 100644 docs/releases/0.1.0.md create mode 100644 flake.nix create mode 100755 installer.sh create mode 100644 packaging/arch/.SRCINFO create mode 100644 packaging/arch/PKGBUILD create mode 100644 packaging/nix/default.nix create mode 100644 packaging/quince.ico create mode 100644 packaging/quince.iss create mode 100644 src/ui/gallery.rs create mode 100755 tools/package.sh diff --git a/.gitignore b/.gitignore index 39481e5..bc6c66d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target /tests/media +/dist diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..77a6e26 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Quince contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 2a92fb8..3335534 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,18 @@ folders, playlists and links (through yt-dlp). The controls float over the video - Colours from the desktop (Caelestia, KDE), your own colour or the video playing; light, dark and AMOLED; four styles, three contrast levels and four motion levels. +## Install + +Releases are on the [Releases page](https://archlinux.tail7c4f5e.ts.net/git/astar76/Quince/releases): + +- Arch: `sudo pacman -U Quince--arch-x86_64.pkg.tar.zst` +- Debian 12, Ubuntu 22.04 or newer: `sudo apt install ./Quince--amd64.deb` +- Any distribution: the AppImage, or unpack the tar.gz and run its `install.sh` (`--system` for /usr/local, + `uninstall.sh` to remove it). Both need mpv's library (libmpv) from the distribution. +- Windows 10/11: `Quince--Setup.exe` (installs for your user, no admin) or the portable zip. + +Linux builds need glibc 2.35 or newer. + ## Build Needs Rust, libmpv (mpv 0.38 or newer) and, for previews, ffmpeg. @@ -25,6 +37,13 @@ cargo build --release ./target/release/quince video.mkv ``` +`quince --gallery` opens every control in every state instead of the player (`--gallery over` starts on the page +with the real top bar, dock, menu and toasts over a made-up film), with light, dark and AMOLED and a few seed colours. + +`tools/package.sh` builds the release packages into `dist/`: tar.gz, AppImage, Arch package, .deb, the Nix file, and +the Windows installer and portable zip (cross-built with mingw, installer made with Inno Setup under wine). It needs +cargo-zigbuild, and takes appimagetool, libmpv-2.dll and the link stub for libmpv from `~/.local/opt/build-tools`. + ## Tests `cargo test` runs the unit tests. `tools/smoke.sh script.txt outdir [files]` runs the app hidden in a nested niri on Xvfb diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..121418e --- /dev/null +++ b/build.rs @@ -0,0 +1,29 @@ +//! Windows: embed the icon and version resource into quince.exe (needs windres on PATH; skipped without it). + +fn main() { + println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-changed=packaging/quince.ico"); + if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("windows") { + return; + } + let out = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap()); + let ver = std::env::var("CARGO_PKG_VERSION").unwrap(); + let nums: Vec<&str> = ver.split('.').collect(); + let comma = format!("{},{},{},0", nums[0], nums.get(1).unwrap_or(&"0"), nums.get(2).unwrap_or(&"0")); + let ico = std::fs::canonicalize("packaging/quince.ico").unwrap().to_string_lossy().replace('\\', "/"); + let rc = format!( + "1 ICON \"{ico}\"\n\ + 1 VERSIONINFO\nFILEVERSION {comma}\nPRODUCTVERSION {comma}\nBEGIN\n BLOCK \"StringFileInfo\"\n BEGIN\n BLOCK \"040904b0\"\n BEGIN\n\ + \x20 VALUE \"ProductName\", \"Quince\"\n VALUE \"FileDescription\", \"Quince video player\"\n VALUE \"FileVersion\", \"{ver}\"\n VALUE \"ProductVersion\", \"{ver}\"\n VALUE \"OriginalFilename\", \"quince.exe\"\n\ + \x20 END\n END\n BLOCK \"VarFileInfo\"\n BEGIN\n VALUE \"Translation\", 0x0409, 1200\n END\nEND\n" + ); + let rc_path = out.join("quince.rc"); + std::fs::write(&rc_path, rc).unwrap(); + let obj = out.join("quince_res.o"); + let ok = std::process::Command::new("x86_64-w64-mingw32-windres").arg(&rc_path).arg(&obj).status().map(|s| s.success()).unwrap_or(false); + if ok { + println!("cargo:rustc-link-arg-bins={}", obj.display()); + } else { + println!("cargo:warning=windres not available: quince.exe has no icon/version resource"); + } +} diff --git a/docs/STATUS.md b/docs/STATUS.md index 7dd994a..69456ab 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -29,6 +29,18 @@ Version 0.1.0, first build (2026-11-26). small thread that does the asking. - The dock covered mpv's console; a space typed in the console came out twice. -## Missing -- A `--gallery` page of every control in every state (the /material skill asks for one). -- Packaging (AppImage / tar.gz) and a release. +## Gallery and packages (2026-11-27) +- `quince --gallery`: every control at rest, chosen and disabled, in light, dark and AMOLED and four seeds; hover, + press and focus checked by hand in screenshots. `--gallery over` runs the real top bar, dock, menu, on-screen text + and toasts on a made-up film. It found two bugs, both fixed: the disabled play triangle showed a darker seam, and + a toast's action button (Undo) was drawn under the toast and never showed. +- `tools/package.sh` builds 0.1.0 into `dist/`: tar.gz, AppImage (bundles libmpv's closure), Arch package, .deb, + Nix file, Windows installer and portable zip. glibc floor 2.35. +- Smoke-tested: the AppImage plays the test clip with hardware decoding; the Windows build plays it under wine; the + installer installs per user to `AppData\Local\Programs\Quince` with a Start menu entry. + +## Not done +- No release published yet: the packages are in `dist/`, notes in `docs/releases/0.1.0.md`. +- Windows: screensaver inhibit is D-Bus only, so it does nothing there; seek previews need ffmpeg on PATH. Not tried + on real Windows. +- Text fields clip a too-long value at the edge (egui's TextEdit) instead of fading it. diff --git a/docs/releases/0.1.0.md b/docs/releases/0.1.0.md new file mode 100644 index 0000000..8f53834 --- /dev/null +++ b/docs/releases/0.1.0.md @@ -0,0 +1,9 @@ +First release of Quince, a Material You video player built on mpv. + +- Plays anything mpv plays, with hardware decoding; your mpv.conf, scripts and key bindings keep working, and mpv's console opens with `. +- Controls over the video that hide while you watch: a wavy seek bar with chapter marks and preview pictures, a play button that changes shape, volume, speed, and menus for sound, subtitles, chapters and video. +- Playlist you can reorder by dragging, and an Adjust panel for picture, sound and subtitles. +- Colours from your desktop, your own colour, or the video playing; light, dark and AMOLED; contrast and motion settings. +- Open files, folders and links, drag files in, and resume where you stopped. + +Downloads: AppImage and tar.gz for any Linux with glibc 2.35 or newer (needs libmpv), an Arch package, a .deb for Debian 12 / Ubuntu 22.04 and newer, and a Windows installer (per user, no admin) or portable zip. Checksums are in SHA256SUMS-0.1.0. diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e81b730 --- /dev/null +++ b/flake.nix @@ -0,0 +1,10 @@ +{ + description = "Material You video player built on mpv"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + outputs = { self, nixpkgs }: + let pkgs = nixpkgs.legacyPackages.x86_64-linux; + in { + packages.x86_64-linux.default = pkgs.callPackage ./packaging/nix { }; + apps.x86_64-linux.default = { type = "app"; program = "${self.packages.x86_64-linux.default}/bin/quince"; }; + }; +} diff --git a/installer.sh b/installer.sh new file mode 100755 index 0000000..34e5d24 --- /dev/null +++ b/installer.sh @@ -0,0 +1,159 @@ +#!/bin/sh +# Quince installer. Installs from a release tar.gz or AppImage, or removes an install. +# installer.sh [--user|--system] [--prefix DIR] [--url URL] [FILE] +# installer.sh --uninstall [--purge] [--user|--system] [--prefix DIR] +# --user (default): ~/.local, no root. --system: /usr/local, sudo only for the copy. +# Without FILE it uses the unpacked release folder it sits in, or Quince-*-Linux-x86_64.tar.gz or +# Quince-*-x86_64.AppImage next to it. SHA256SUMS- beside the file is checked when present. +# --purge also deletes settings and data (~/.config/quince, ~/.local/state/quince, ~/.cache/quince: settings, resume positions, previews and logs). DESTDIR=dir stages under dir (no sudo). +# Needs glibc 2.35 or newer. +set -eu + +app=quince main=quince need=2.35 +mode=install scope=user purge=0 prefix= url= file= +while [ $# -gt 0 ]; do + case $1 in + --user) scope=user ;; + --system) scope=system ;; + --prefix) [ $# -ge 2 ] || { echo "--prefix needs a folder." >&2; exit 2; }; prefix=$2; shift ;; + --url) [ $# -ge 2 ] || { echo "--url needs an address." >&2; exit 2; }; url=$2; shift ;; + --uninstall) mode=uninstall ;; + --purge) purge=1 ;; + -h|--help) sed -n '2,9p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + -*) echo "Unknown option: $1 (see --help)." >&2; exit 2 ;; + *) file=$1 ;; + esac + shift +done +[ "$purge" = 0 ] || [ "$mode" = uninstall ] || { echo "--purge only goes with --uninstall." >&2; exit 2; } +if [ -z "$prefix" ]; then + if [ "$scope" = system ]; then prefix=/usr/local; else prefix=$HOME/.local; fi +fi +case $prefix in /*) ;; *) echo "--prefix must be an absolute path." >&2; exit 2 ;; esac +prefix=${prefix%/} +destdir=${DESTDIR:-} +root=$destdir$prefix +list=$root/lib/$app/files +sudo= +if [ -z "$destdir" ] && [ "$(id -u)" != 0 ]; then + d=$root; while [ ! -e "$d" ]; do d=$(dirname "$d"); done + [ -w "$d" ] || sudo=sudo +fi + +refresh() { + [ -z "$destdir" ] || return 0 + command -v update-desktop-database >/dev/null 2>&1 && $sudo update-desktop-database -q "$root/share/applications" 2>/dev/null || true + [ -f "$root/share/icons/hicolor/index.theme" ] && command -v gtk-update-icon-cache >/dev/null 2>&1 \ + && $sudo gtk-update-icon-cache -q -t -f "$root/share/icons/hicolor" 2>/dev/null || true +} + +# Removes the files the last install listed, then the folders that became empty. +remove_listed() { + [ -f "$list" ] || return 0 + while IFS= read -r f; do + [ -n "$f" ] || continue + $sudo rm -f "$root/$f" + d=$(dirname "$f") + while [ "$d" != . ] && $sudo rmdir "$root/$d" 2>/dev/null; do d=$(dirname "$d"); done + done < "$list" + $sudo rm -f "$list" + $sudo rmdir "$root/lib/$app" "$root/lib" 2>/dev/null || true +} + +if [ "$mode" = uninstall ]; then + if [ ! -f "$list" ]; then + echo "Quince is not installed in $prefix (no $list)." >&2 + [ "$purge" = 1 ] || exit 1 + else + remove_listed + refresh + echo "Quince removed from $prefix." + fi + if [ "$purge" = 1 ]; then + rm -rf "${XDG_CONFIG_HOME:-$HOME/.config}/quince" + rm -rf "${XDG_STATE_HOME:-$HOME/.local/state}/quince" + rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/quince" + echo "Settings and data removed (~/.config/quince, ~/.local/state/quince, ~/.cache/quince: settings, resume positions, previews and logs)." + else + echo "Settings and data are kept (--purge deletes them)." + fi + exit 0 +fi + +# glibc check (MULBERRY_GLIBC overrides the detected version, for tests) +have=${MULBERRY_GLIBC:-$(getconf GNU_LIBC_VERSION 2>/dev/null | sed 's/^glibc //')} +if [ -z "$have" ]; then + echo "Quince needs glibc $need or newer, and this system does not report a glibc (musl?). Nothing was installed." >&2; exit 1 +fi +if [ "$(printf '%s\n%s\n' "$need" "$have" | sort -V | head -n 1)" != "$need" ]; then + echo "Quince needs glibc $need or newer, and this system has glibc $have. Nothing was installed." >&2; exit 1 +fi + +here=$(cd "$(dirname "$0")" && pwd) +tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT INT TERM + +if [ -n "$url" ]; then + file=$tmp/$(basename "${url%%\?*}") + if command -v curl >/dev/null 2>&1; then curl -fL -o "$file" -- "$url" + elif command -v wget >/dev/null 2>&1; then wget -O "$file" -- "$url" + else echo "Neither curl nor wget is installed, so $url cannot be fetched." >&2; exit 1; fi +fi +src= +if [ -z "$file" ]; then + if [ -f "$here/bin/$main" ]; then src=$here + else + for f in "$here"/Quince-*-Linux-x86_64.tar.gz "$here"/Quince-*-x86_64.AppImage; do + [ -f "$f" ] && { file=$f; break; } + done + fi +fi +if [ -z "$src" ]; then + [ -n "$file" ] && [ -f "$file" ] || { echo "No Quince tar.gz or AppImage was given or found next to the installer." >&2; exit 1; } + dir=$(dirname "$file"); name=$(basename "$file") + for s in "$dir"/SHA256SUMS-*; do + [ -f "$s" ] || continue + line=$(grep -F " $name" "$s" | head -n 1 || true) + [ -n "$line" ] || continue + [ "${line%% *}" = "$(sha256sum "$file" | cut -d' ' -f1)" ] \ + || { echo "The checksum of $name does not match $(basename "$s"). Nothing was installed." >&2; exit 1; } + echo "Checksum ok." + done + mkdir "$tmp/x" + case $name in + *.tar.gz) + tar -xzf "$file" -C "$tmp/x" + src=$(find "$tmp/x" -maxdepth 1 -mindepth 1 -type d | head -n 1) + [ -n "$src" ] && [ -f "$src/bin/$main" ] || { echo "$name has no bin/$main, so it is not a Quince release." >&2; exit 1; } ;; + *.AppImage) + cp "$file" "$tmp/app"; chmod 755 "$tmp/app" + (cd "$tmp/x" && "$tmp/app" --appimage-extract >/dev/null 2>&1) || true + [ -d "$tmp/x/squashfs-root/usr/share" ] || { echo "Could not read the contents of $name. Nothing was installed." >&2; exit 1; } + src=$tmp/src; mkdir -p "$src/bin" + mv "$tmp/app" "$src/bin/$main" + mv "$tmp/x/squashfs-root/usr/share" "$src/share" + [ ! -d "$tmp/x/squashfs-root/usr/lib" ] || mv "$tmp/x/squashfs-root/usr/lib" "$src/lib" ;; + *) echo "Unknown file type: $name (need .tar.gz or .AppImage)." >&2; exit 1 ;; + esac +fi + +# Stage with launchers pointing at this prefix, then copy and list every file for --uninstall. +st=$tmp/stage +mkdir -p "$st" +for d in bin lib share; do [ ! -d "$src/$d" ] || cp -R "$src/$d" "$st/$d"; done +for d in "$st"/share/applications/*.desktop; do + [ -f "$d" ] || continue + for b in "$st"/bin/*; do + b=$(basename "$b") + sed -i -e "s#^Exec=$b\( \|\$\)#Exec=$prefix/bin/$b\1#" -e "s#^TryExec=$b\$#TryExec=$prefix/bin/$b#" "$d" + done +done +chmod 755 "$st"/bin/* +(cd "$st" && find . \( -type f -o -type l \) | sed 's|^\./||' | sort) > "$tmp/files" +mkdir -p "$st/lib/$app"; echo "lib/$app/files" >> "$tmp/files"; cp "$tmp/files" "$st/lib/$app/files" + +remove_listed +$sudo mkdir -p "$root" +$sudo cp -R "$st/." "$root/" +refresh +echo "Quince installed in $prefix/bin/$main" +case ":$PATH:" in *":$prefix/bin:"*) ;; *) echo "Note: $prefix/bin is not on your PATH." ;; esac diff --git a/packaging/arch/.SRCINFO b/packaging/arch/.SRCINFO new file mode 100644 index 0000000..9ef8a5f --- /dev/null +++ b/packaging/arch/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = quince-bin + pkgdesc = Material You video player built on mpv + pkgver = 0.1.0 + pkgrel = 1 + url = https://archlinux.tail7c4f5e.ts.net/git/astar76/Quince + arch = x86_64 + license = MIT + depends = glibc>=2.35 + depends = gcc-libs + depends = mpv + depends = dbus + depends = fontconfig + depends = libglvnd + depends = wayland + depends = libxkbcommon + depends = libxkbcommon-x11 + depends = libx11 + depends = libxcb + depends = libxcursor + depends = libxi + depends = libxrender + depends = hicolor-icon-theme + optdepends = xdg-desktop-portal: open file and folder dialogs + optdepends = ffmpeg: preview pictures on the seek bar + optdepends = yt-dlp: web links + provides = quince + conflicts = quince + options = !strip + options = !debug + source = Quince-0.1.0-Linux-x86_64.tar.gz::https://archlinux.tail7c4f5e.ts.net/git/astar76/Quince/releases/download/v0.1.0/Quince-0.1.0-Linux-x86_64.tar.gz + sha256sums = 0651a250de7a2dffb10721e8d03f13fe679ab1207e6da4b87b1d5203d43fa76e + +pkgname = quince-bin diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD new file mode 100644 index 0000000..457035c --- /dev/null +++ b/packaging/arch/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: astar76 +# Built by tools/package.sh from the release tar.gz (TARBALL=file://… for an offline build); it keeps pkgver, +# sha256sums and the glibc floor current. +pkgname=quince-bin +pkgver=0.1.0 +pkgrel=1 +pkgdesc='Material You video player built on mpv' +arch=('x86_64') +url='https://archlinux.tail7c4f5e.ts.net/git/astar76/Quince' +license=('MIT') +depends=('glibc>=2.35' 'gcc-libs' 'mpv' 'dbus' 'fontconfig' 'libglvnd' 'wayland' 'libxkbcommon' 'libxkbcommon-x11' 'libx11' 'libxcb' 'libxcursor' 'libxi' 'libxrender' 'hicolor-icon-theme') +optdepends=( + 'xdg-desktop-portal: open file and folder dialogs' + 'ffmpeg: preview pictures on the seek bar' + 'yt-dlp: web links' +) +provides=('quince') +conflicts=('quince') +options=('!strip' '!debug') +source=("Quince-$pkgver-Linux-x86_64.tar.gz::${TARBALL:-$url/releases/download/v$pkgver/Quince-$pkgver-Linux-x86_64.tar.gz}") +sha256sums=('0651a250de7a2dffb10721e8d03f13fe679ab1207e6da4b87b1d5203d43fa76e') + +package() { + cd "$srcdir/quince-$pkgver" + install -d "$pkgdir/usr" + for d in bin lib share; do [ ! -d "$d" ] || cp -R "$d" "$pkgdir/usr/"; done + if [ -d "$pkgdir/usr/share/licenses/quince" ] && [ "$pkgname" != quince ]; then + mv "$pkgdir/usr/share/licenses/quince" "$pkgdir/usr/share/licenses/$pkgname" + fi + install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" +} diff --git a/packaging/nix/default.nix b/packaging/nix/default.nix new file mode 100644 index 0000000..7b34ade --- /dev/null +++ b/packaging/nix/default.nix @@ -0,0 +1,33 @@ +# Quince for Nix, from the release tar.gz. Written by tools/package.sh (version and hash); edit the header there. +# nix build .#default or nix profile install . (from the repo), or callPackage this file. +{ lib, stdenv, fetchurl, autoPatchelfHook, makeWrapper, libGL, wayland, libxkbcommon, xorg, fontconfig, dbus, mpv-unwrapped }: + +stdenv.mkDerivation rec { + pname = "quince"; + version = "0.1.0"; + src = fetchurl { + url = "https://archlinux.tail7c4f5e.ts.net/git/astar76/Quince/releases/download/v${version}/Quince-${version}-Linux-x86_64.tar.gz"; + hash = "sha256-BlGiUN56Lf+xByHo0D8T/measSB+baS4ex1SA9Q/p24="; + }; + nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; + buildInputs = [ mpv-unwrapped stdenv.cc.cc.lib ]; + # Loaded with dlopen at run time, so autoPatchelf can't see them. + runtimeDependencies = [ libGL wayland libxkbcommon xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr fontconfig dbus ]; + dontBuild = true; + installPhase = '' + runHook preInstall + mkdir -p $out + for d in bin lib share; do [ ! -d $d ] || cp -R $d $out/; done + install -Dm644 README.md $out/share/doc/quince/README.md + runHook postInstall + ''; + + meta = { + description = "Material You video player built on mpv"; + homepage = "https://archlinux.tail7c4f5e.ts.net/git/astar76/Quince"; + license = lib.licenses.mit; + platforms = [ "x86_64-linux" ]; + mainProgram = "quince"; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + }; +} diff --git a/packaging/quince.ico b/packaging/quince.ico new file mode 100644 index 0000000000000000000000000000000000000000..c472ae8069707d476f7d6487598e0f4df9fa952c GIT binary patch literal 370070 zcmZQzU}Rup5D);-3Je)63=C-u3=9ei5dI1Q28MGi3=9SaP`)YyLzyT8gM$Nvui?bN zAZN|M(9i(ob1*Wv)iQtqBZC5ih5`#iUMnMm1_J|w0LWYhh&r$W7BD%e35(rRHLZ6~ zvT)cxl?Ucf5E~>0l7oq1qpf#OUTD30%6};SX}x>OF(?MHq2iMlV$%yU8>$bg4sH$x zAEXxD44a)(%#rn*ENlL6Ft-LnFGvkYExLY)AE&_GsZy8xpT|b`zj%bpf8(W%$maY6 zsYTZh;@j++auj4f2!r%I@#~P<+h3cL25v1v0;!LNG}M(^;>Ea zr61%b>)n{{7YlPH%Ke})0oe<~q=p|TPGEWo(IB<>;M0ZAUTj4kXn!)kX{URL<-n! znI>qxYsxMhW!4L;-BT7>@19x+!Vvb97g*Kqnz9RI7LnG%mEo})xy~Vuy=%%YxWPm) zK;eefFNivvID3)QgUlqtYOoSe+)>~DDS2SSi6E?ZO{t=`{U9@muo|ocl!o!yFP-A| zUp&g~zrp-kqT>N%CfINy2%8;~^zqrx?_&HP(uUFgFO}^3-(-0UL3e=6B*JQllK=l1 zt#?m(j>`>j`$6p}OYQ$W*1G@Y^Fsfdt?R<&j^|j*42W%5NobzNY96}%;IOdN{?BWt z_g|?r=D+3UJ`{Z*v#?r%N6=>1)M8@&53`@!QU@F_{LaSzO;@(T-2gHRk5yQuKzat! zeo&Z^YCqM&e}K~;D6io1J4hU!{;X(||3GC0$R1pn*5wbVti)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6tX-xtRSZU{}1&(vOF|0ASwvS!-5CN0F)$vBo1dnOootfK_mu5225fJK5$%uCE=+9 zNiT?r6u^Y^V+nqg2p}YnC3+YbkRpiI@>rrDC5w&9gAxQ9M#> zO96+Jz5o9ol}As#s13w{4j)>l4?^bCI)4x{pVs9AA@ea(2Ll5Gs9b|#3gu~Cz7sN^ z*7X}9^C_*rX{{ei_8)CuBUK=y;e(|Bpkw&ZI{gzepHTiLBu}V(qEw#Z_AR0Mfl&QL zNS;vrizS00C9nSk$A_>)0C+47R)1j$V5H%b|NpTBAWSQSh6NC=@iAxsu>b!L^(xBn z61)Lg4;$%2ZGOQ#2p+S77=Sdo0&)Sw17JTv{EF&)$OsqIPLNxmOpsOx28A$K`~UwS e15iR2tb)M!CRoiVF&YA+Aut*Oqai@I5C8za{{{R2 literal 0 HcmV?d00001 diff --git a/packaging/quince.iss b/packaging/quince.iss new file mode 100644 index 0000000..76dfdad --- /dev/null +++ b/packaging/quince.iss @@ -0,0 +1,51 @@ +; Inno Setup script: per-user install (no admin), Start menu entry, uninstaller. +; Built by tools/package.sh under wine: iscc /DVersion= /DSrc= /DOut= quince.iss +#ifndef Version + #define Version "0.0.0" +#endif +#ifndef Src + #define Src "..\dist\Quince" +#endif +#ifndef Out + #define Out "..\dist" +#endif + +[Setup] +AppId={{B87F98FA-E5F3-4869-A1EB-25FA4BC2F0DF} +AppName=Quince +AppVersion={#Version} +AppVerName=Quince {#Version} +AppPublisher=astar76 +AppPublisherURL=https://archlinux.tail7c4f5e.ts.net/git/astar76/Quince +VersionInfoVersion={#Version} +VersionInfoProductName=Quince +VersionInfoDescription=Quince Setup +DefaultDirName={localappdata}\Programs\Quince +DisableProgramGroupPage=yes +DisableDirPage=auto +PrivilegesRequired=lowest +ArchitecturesAllowed=x64compatible +ArchitecturesInstallIn64BitMode=x64compatible +OutputDir={#Out} +OutputBaseFilename=Quince-{#Version}-Setup +SetupIconFile=quince.ico +UninstallDisplayIcon={app}\quince.exe +UninstallDisplayName=Quince +LicenseFile=..\LICENSE +Compression=lzma2/max +SolidCompression=yes +WizardStyle=modern +CloseApplications=yes + +[Tasks] +Name: "desktopicon"; Description: "Create a desktop shortcut"; Flags: unchecked + +[Files] +Source: "{#Src}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs + +[Icons] +Name: "{userprograms}\Quince"; Filename: "{app}\quince.exe" +Name: "{userdesktop}\Quince"; Filename: "{app}\quince.exe"; Tasks: desktopicon + +[Run] +Filename: "{app}\quince.exe"; Description: "Launch Quince"; Flags: nowait postinstall skipifsilent diff --git a/src/main.rs b/src/main.rs index 9fd0c9e..e56b6fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,13 +20,14 @@ use eframe::egui; fn main() -> eframe::Result { let args: Vec = std::env::args().skip(1).collect(); if args.iter().any(|a| a == "--help" || a == "-h") { - println!("Usage: quince [FILE or LINK]...\n\nPlays videos and sound with mpv. Settings live in ~/.config/quince."); + println!("Usage: quince [FILE or LINK]...\n quince --gallery [over] every control in every state\n\nPlays videos and sound with mpv. Settings live in ~/.config/quince."); return Ok(()); } if args.iter().any(|a| a == "--version") { println!("quince {}", env!("CARGO_PKG_VERSION")); return Ok(()); } + let gallery = args.iter().position(|a| a == "--gallery").map(|i| usize::from(args.get(i + 1).is_some_and(|p| p == "over"))); let files: Vec = args .into_iter() .filter(|a| !a.starts_with("--")) @@ -48,6 +49,9 @@ fn main() -> eframe::Result { renderer: eframe::Renderer::Glow, ..Default::default() }; + if let Some(page) = gallery { + return eframe::run_native("Quince", options, Box::new(move |cc| Ok(Box::new(ui::gallery::Gallery::new(cc, page))))); + } eframe::run_native("Quince", options, Box::new(move |cc| Ok(Box::new(app::App::new(cc, files))))) } diff --git a/src/ui/chrome.rs b/src/ui/chrome.rs index 47cee44..f08b21d 100644 --- a/src/ui/chrome.rs +++ b/src/ui/chrome.rs @@ -422,10 +422,14 @@ pub fn toasts(ctx: &egui::Context, v: &mut View, list: &mut Vec) { area(ctx, &format!("toast-btn-{key}"), br, Order::Foreground, |ui| { let resp = ui.interact(br, Id::new(("toast-btn", key)), Sense::click()); let f = feel(&resp, true); + // painted on the toast's own layer: the area's layer may sit under it if f.tint > 0.001 { - ui.painter().rect_filled(br, cr(radius::FULL), alpha(t.inverse_primary, f.tint)); + p2.rect_filled(br, cr(radius::FULL), alpha(t.inverse_primary, f.tint)); } - ui.painter().text(br.center(), Align2::CENTER_CENTER, label, fonts::med(text::BODY), t.inverse_primary); + if f.focus { + crate::widgets::ring(&p2, t, br, cr(radius::FULL)); + } + p2.text(br.center(), Align2::CENTER_CENTER, label, fonts::med(text::BODY), t.inverse_primary); clicked = resp.clicked(); }); if clicked { diff --git a/src/ui/controls.rs b/src/ui/controls.rs index d2eb612..db990f3 100644 --- a/src/ui/controls.rs +++ b/src/ui/controls.rs @@ -61,13 +61,21 @@ pub fn play_pause_glyph(p: &Painter, c: Pos2, s: f32, k: f32, color: Color32) { [(-0.30, -0.36), (-0.08, -0.36), (-0.08, 0.36), (-0.30, 0.36)], [(0.08, -0.36), (0.30, -0.36), (0.30, 0.36), (0.08, 0.36)], ]; - for (a, b) in play.iter().zip(pause.iter()) { - let pts: Vec = a - .iter() - .zip(b.iter()) - .map(|(x, y)| c + vec2(lerp(x.0, y.0, k), lerp(x.1, y.1, k)) * s) - .collect(); - p.add(Shape::convex_polygon(pts, color, Stroke::new(s * 0.06, color))); + let halves: Vec> = play + .iter() + .zip(pause.iter()) + .map(|(a, b)| a.iter().zip(b.iter()).map(|(x, y)| c + vec2(lerp(x.0, y.0, k), lerp(x.1, y.1, k)) * s).collect()) + .collect(); + let stroke = Stroke::new(s * 0.06, color); + if k.abs() < 0.05 { + // While the halves still touch they are one triangle: two would overlap at their seam, which shows when the + // colour is see-through (a disabled button). + let (l, r) = (&halves[0], &halves[1]); + p.add(Shape::convex_polygon(vec![l[0], r[1], r[2], l[3]], color, stroke)); + return; + } + for pts in halves { + p.add(Shape::convex_polygon(pts, color, stroke)); } } diff --git a/src/ui/gallery.rs b/src/ui/gallery.rs new file mode 100644 index 0000000..8b089ff --- /dev/null +++ b/src/ui/gallery.rs @@ -0,0 +1,415 @@ +//! Every control in every state (`quince --gallery`). For whoever builds Quince: nothing plays here, and the words +//! are the gallery's own. "Controls" lays out each control at rest, chosen and disabled (hover, press and focus come +//! from the hand); "Over the video" runs the real top bar, dock, menus, on-screen text and toasts on a made-up film. + +use super::controls::{self, keycap, play_button, row, seek_bar, slider, tabs, text_field}; +use super::glyphs as g; +use super::menu::{self, Menu}; +use super::{View, chrome, menus}; +use crate::app::{Act, MenuKind, Osd, Toast}; +use crate::config::Settings; +use crate::fonts; +use crate::motion::{self, Motion}; +use crate::mpv::{Chapter, Entry, State, Track}; +use crate::script::Script; +use crate::theme::{self, Appearance, Contrast, Scheme, Theme, mix}; +use crate::thumbs::Thumbs; +use crate::tokens::{size, space, text}; +use crate::widgets::{Kind, button, chip, icon_button, segmented, switch}; +use eframe::egui::{self, Color32, Id, Rect, ScrollArea, Sense, Ui, UiBuilder, pos2, vec2}; + +const PAGES: [&str; 2] = ["Controls", "Over the video"]; +const LOOKS: [&str; 3] = ["Light", "Dark", "AMOLED"]; +/// Seeds to try the controls under: the desktop's, Quince's own gold, and two far from it. +const SEEDS: [(&str, &str); 4] = [("Desktop", ""), ("Gold", "#c9a227"), ("Leaf", "#5f8f2f"), ("Sea", "#2f6f9f")]; +/// Left column with the names of the rows. +const NAMES_W: f32 = 132.0; + +pub struct Gallery { + theme: Theme, + page: usize, + look: usize, + seed: usize, + desktop: (Option, Option), + script: Option