From e6eb10f89a062e40fa4f0ddbf24e2aa4b69378c2 Mon Sep 17 00:00:00 2001 From: Hans Dijkema Date: Tue, 17 Feb 2026 14:18:28 +0100 Subject: [PATCH] - --- gui.rkt | 31 +++++++++++++++++++++++++++++++ play.svg | 13 +++++++++++++ rktplayer.html | 35 +++++++++++++++++++++++++++++++++++ rktplayer.rkt | 14 ++++++++++++++ styles.css | 41 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 gui.rkt create mode 100644 play.svg create mode 100644 rktplayer.html create mode 100644 rktplayer.rkt create mode 100644 styles.css diff --git a/gui.rkt b/gui.rkt new file mode 100644 index 0000000..5900fa7 --- /dev/null +++ b/gui.rkt @@ -0,0 +1,31 @@ +#lang racket + +(require web-racket + racket/runtime-path + ) + +(provide + (all-from-out web-racket) + rktplayer% + ) + +(define-runtime-path rktplayer-start "rktplayer.html") + +(define rktplayer% + (class ww-webview% + (inherit-field settings) + (super-new + [html-file rktplayer-start] + ) + + (define/override (html-loaded) + (super html-loaded) + ) + + (begin + (displayln "RktPlayer started") + ) + ) + ) + + diff --git a/play.svg b/play.svg new file mode 100644 index 0000000..41e7e73 --- /dev/null +++ b/play.svg @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/rktplayer.html b/rktplayer.html new file mode 100644 index 0000000..30da4cf --- /dev/null +++ b/rktplayer.html @@ -0,0 +1,35 @@ + + + + + + RktPlayer - A music player + + +
+
+ + + + + 0:00 + 0:00 + + +
+
+
+ Library +
+
+ Album art +
+
+
+
+ Music playing +
+
+
+ + diff --git a/rktplayer.rkt b/rktplayer.rkt new file mode 100644 index 0000000..79af6e5 --- /dev/null +++ b/rktplayer.rkt @@ -0,0 +1,14 @@ +#lang racket + +(require "gui.rkt" + simple-ini/class + ) + +(define (run) + (let* ((ini (new ini% [file 'rktplayer])) + (settings (new ww-simple-ini% [ini ini] [section 'player])) + (window (new rktplayer% [settings settings])) + ) + window) + ) + diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..8e27eab --- /dev/null +++ b/styles.css @@ -0,0 +1,41 @@ +body { + font-family: Arial; + font-size: 11pt; +} + +.pane { + height: 100%; + width: 100%; +} + +.buttons { + height: 40px; + width: 100%; + display: flex; + justify-content: center; + align-items: center; +} + +button.command { + margin: 0; + padding: 0; + width: 40px; + height: 40px; +} + +button.command img { + height: 32px; + width: 32px; + margin: 0; + padding: 2px; +} + +span.h-slider { + flex-grow: 1; +} + +.buttons span.time { + width: 5em; + font-weight: bold; + text-align: center; +}