ui: recreate 1:1 replica of gpu-screen-recorder-ui

This commit is contained in:
katR 2026-09-16 05:12:13 +05:30
parent 1e224edceb
commit 7dd1769524
37 changed files with 1390 additions and 901 deletions

1
Cargo.lock generated
View file

@ -3715,6 +3715,7 @@ dependencies = [
"global-hotkey", "global-hotkey",
"gtk", "gtk",
"gtk-layer-shell", "gtk-layer-shell",
"image",
"libc", "libc",
"memmap2", "memmap2",
"mp4", "mp4",

View file

@ -30,6 +30,7 @@ cpal = "0.18.2"
rubato = "5.0.0" rubato = "5.0.0"
eframe = "0.31" eframe = "0.31"
egui = "0.31" egui = "0.31"
image = { version = "0.25", default-features = false, features = ["png"] }
[target.'cfg(target_os = "linux")'.dependencies] [target.'cfg(target_os = "linux")'.dependencies]
ashpd = { version = "0.13.13", features = ["screencast"] } ashpd = { version = "0.13.13", features = ["screencast"] }

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

BIN
assets/images/cross.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/images/delete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

BIN
assets/images/folder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
assets/images/info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/images/masked.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

BIN
assets/images/pause.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

BIN
assets/images/play.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

BIN
assets/images/ps4_cross.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/images/ps4_home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 801 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/images/record.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
assets/images/replay.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
assets/images/save.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

BIN
assets/images/settings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/images/stop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

BIN
assets/images/stream.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
assets/images/trash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

BIN
assets/images/unmasked.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/images/up_arrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/images/warning.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -21,6 +21,7 @@ pub enum ToastIcon {
Cursor, Cursor,
Info, Info,
Error, Error,
Screenshot,
} }
impl ToastIcon { impl ToastIcon {
@ -30,6 +31,7 @@ impl ToastIcon {
"record" | "recording" | "start" => ToastIcon::Record, "record" | "recording" | "start" => ToastIcon::Record,
"save" | "saved" | "stop" => ToastIcon::Save, "save" | "saved" | "stop" => ToastIcon::Save,
"cursor" => ToastIcon::Cursor, "cursor" => ToastIcon::Cursor,
"screenshot" => ToastIcon::Screenshot,
"error" => ToastIcon::Error, "error" => ToastIcon::Error,
_ => ToastIcon::Info, _ => ToastIcon::Info,
} }
@ -42,6 +44,7 @@ pub fn spawn_toast(title: &str, subtitle: &str, icon: ToastIcon) {
ToastIcon::Record => "record", ToastIcon::Record => "record",
ToastIcon::Save => "save", ToastIcon::Save => "save",
ToastIcon::Cursor => "cursor", ToastIcon::Cursor => "cursor",
ToastIcon::Screenshot => "screenshot",
ToastIcon::Error => "error", ToastIcon::Error => "error",
ToastIcon::Info => "info", ToastIcon::Info => "info",
}; };
@ -478,6 +481,18 @@ pub fn show_shadowplay_toast(title: &str, subtitle: &str, icon: ToastIcon) {
cr.line_to(cx - 5.0, cy + 5.0); cr.line_to(cx - 5.0, cy + 5.0);
let _ = cr.stroke(); let _ = cr.stroke();
} }
ToastIcon::Screenshot => {
cr.set_source_rgb(accent_rgb.0, accent_rgb.1, accent_rgb.2);
cr.set_line_width(1.8);
cr.set_line_cap(gtk::cairo::LineCap::Round);
cr.set_line_join(gtk::cairo::LineJoin::Round);
cr.rectangle(cx - 7.0, cy - 4.5, 14.0, 10.0);
let _ = cr.stroke();
cr.arc(cx, cy + 0.5, 2.5, 0.0, PI * 2.0);
let _ = cr.stroke();
cr.rectangle(cx - 3.5, cy - 7.0, 4.0, 2.5);
let _ = cr.fill();
}
ToastIcon::Info => { ToastIcon::Info => {
cr.set_source_rgb(accent_rgb.0, accent_rgb.1, accent_rgb.2); cr.set_source_rgb(accent_rgb.0, accent_rgb.1, accent_rgb.2);
cr.arc(cx, cy, 4.5, 0.0, PI * 2.0); cr.arc(cx, cy, 4.5, 0.0, PI * 2.0);

File diff suppressed because it is too large Load diff