ui: recreate 1:1 replica of gpu-screen-recorder-ui
1
Cargo.lock
generated
|
|
@ -3715,6 +3715,7 @@ dependencies = [
|
||||||
"global-hotkey",
|
"global-hotkey",
|
||||||
"gtk",
|
"gtk",
|
||||||
"gtk-layer-shell",
|
"gtk-layer-shell",
|
||||||
|
"image",
|
||||||
"libc",
|
"libc",
|
||||||
"memmap2",
|
"memmap2",
|
||||||
"mp4",
|
"mp4",
|
||||||
|
|
|
||||||
|
|
@ -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"] }
|
||||||
|
|
|
||||||
BIN
assets/images/checkbox_background.png
Normal file
|
After Width: | Height: | Size: 982 B |
BIN
assets/images/checkbox_circle.png
Normal file
|
After Width: | Height: | Size: 727 B |
BIN
assets/images/combobox_arrow.png
Normal file
|
After Width: | Height: | Size: 330 B |
BIN
assets/images/cross.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
assets/images/delete.png
Normal file
|
After Width: | Height: | Size: 511 B |
BIN
assets/images/folder.png
Normal file
|
After Width: | Height: | Size: 738 B |
BIN
assets/images/gpu_screen_recorder_logo.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
assets/images/info.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/images/masked.png
Normal file
|
After Width: | Height: | Size: 930 B |
BIN
assets/images/pause.png
Normal file
|
After Width: | Height: | Size: 392 B |
BIN
assets/images/play.png
Normal file
|
After Width: | Height: | Size: 872 B |
BIN
assets/images/ps4_cross.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/images/ps4_dpad_down.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/images/ps4_dpad_left.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/images/ps4_dpad_right.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/images/ps4_dpad_up.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/images/ps4_home.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
assets/images/ps4_options.png
Normal file
|
After Width: | Height: | Size: 801 B |
BIN
assets/images/ps4_triangle.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/images/question_mark.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/images/record.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
assets/images/replay.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
assets/images/save.png
Normal file
|
After Width: | Height: | Size: 614 B |
BIN
assets/images/screenshot.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
assets/images/settings.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
assets/images/settings_extra_small.png
Normal file
|
After Width: | Height: | Size: 959 B |
BIN
assets/images/settings_small.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
assets/images/stop.png
Normal file
|
After Width: | Height: | Size: 333 B |
BIN
assets/images/stream.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
assets/images/trash.png
Normal file
|
After Width: | Height: | Size: 410 B |
BIN
assets/images/unmasked.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/images/up_arrow.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/images/warning.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
|
|
@ -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);
|
||||||
|
|
|
||||||