Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev
sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev libasound2-dev

- name: Build example
run: cargo build --example ${{inputs.example_name}} --release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hotpath.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev
sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev libasound2-dev
- name: Create metrics directory
run: mkdir -p /tmp/metrics
- name: Head timing metrics
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
- name: Install linux dependencies
if: runner.os == 'Linux'
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev libasound2-dev
- name: Install the rust toolchain
uses: dtolnay/rust-toolchain@aad518f59d88bae90133242f9ddac7f8bbc5dddf # 1.94
- run: cargo publish --features skia-engine --workspace --exclude "examples" --exclude "android" --exclude "freya-devtools-app"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fetch-depth: 2
submodules: true
- name: Install linux dependencies
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev libasound2-dev
- name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@aad518f59d88bae90133242f9ddac7f8bbc5dddf # 1.94
- name: Install just
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fetch-depth: 2
submodules: true
- name: Install linux dependencies
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev libasound2-dev
- name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@aad518f59d88bae90133242f9ddac7f8bbc5dddf # 1.94
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install stable rust toolchain
uses: dtolnay/rust-toolchain@aad518f59d88bae90133242f9ddac7f8bbc5dddf # 1.94
- name: Install linux dependencies
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev libasound2-dev
- name: Set up cargo cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
if: github.ref != 'refs/heads/main'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install linux dependencies
if: runner.os == 'Linux'
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev
run: sudo apt update && sudo apt install build-essential libssl-dev pkg-config libglib2.0-dev libgtk-3-dev libudev-dev libxdo-dev libwebkit2gtk-4.1-dev libasound2-dev
- name: Remove unused programs in linux
if: runner.os == 'Linux'
run: |
Expand Down
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ members = [
"./crates/freya-edit",
"./crates/freya-winit",
"./crates/freya-components",
"./crates/freya-video",
"./crates/pathgraph",
"./crates/freya-animation",
"./crates/freya-router",
Expand Down Expand Up @@ -58,6 +59,7 @@ freya-clipboard = { path = "./crates/freya-clipboard", version = "0.4.0-rc.18" }
freya-edit = { path = "./crates/freya-edit", version = "0.4.0-rc.18" }
freya-winit = { path = "./crates/freya-winit", version = "0.4.0-rc.18" }
freya-components = { path = "./crates/freya-components", version = "0.4.0-rc.18" }
freya-video = { path = "./crates/freya-video", version = "0.4.0-rc.18" }
pathgraph = { path = "./crates/pathgraph/", version = "0.4.0-rc.18" }
freya-animation = { path = "./crates/freya-animation", version = "0.4.0-rc.18" }
freya-router = { path = "./crates/freya-router", version = "0.4.0-rc.18" }
Expand Down Expand Up @@ -94,6 +96,7 @@ futures-util = "0.3.31"
futures-channel = "0.3.31"
futures-lite = "2.6.1"
async-io = "2.5.0"
async-channel = "2.3"
blocking = "1.6.2"
ureq = "3.1.4"
serde = { version = "1", features = ["derive"] }
Expand Down Expand Up @@ -155,6 +158,10 @@ thiserror = "2.0.17"
# Images
image = "0.25.8"

# Video
ffmpeg-sidecar = "2.3"
rodio = { version = "0.20", default-features = false }

# SDK
tokio = { version = "1.0", default-features = false }

Expand Down
30 changes: 21 additions & 9 deletions crates/freya-components/src/slider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,22 @@ impl Component for Slider {
.alignment(BorderAlignment::Inner)
};

let (slider_width, slider_height) = if direction_is_vertical {
(Size::px(6.), self.size.clone())
} else {
(self.size.clone(), Size::px(6.))
};
let (slider_width, slider_height, inner_slider_width, inner_slider_height) =
if direction_is_vertical {
(
Size::auto(),
self.size.clone(),
Size::px(6.),
self.size.clone(),
)
} else {
(
self.size.clone(),
Size::auto(),
self.size.clone(),
Size::px(6.),
)
};

let track_size = Size::func_data(
move |ctx| Some(value as f32 / 100. * (ctx.parent - 15.)),
Expand Down Expand Up @@ -251,8 +262,7 @@ impl Component for Slider {
.padding(4.)
.child(
rect()
.width(Size::fill())
.height(Size::fill())
.expanded()
.background(theme.thumb_inner_background.mul_if(!self.enabled, 0.85))
.corner_radius(50.),
),
Expand Down Expand Up @@ -280,10 +290,12 @@ impl Component for Slider {
.border(border)
.corner_radius(50.)
.padding(padding)
.width(slider_width)
.height(slider_height)
.child(
rect()
.width(slider_width)
.height(slider_height)
.width(inner_slider_width)
.height(inner_slider_height)
.background(theme.background.mul_if(!self.enabled, 0.85))
.corner_radius(50.)
.direction(self.direction)
Expand Down
4 changes: 4 additions & 0 deletions crates/freya-engine/src/mocked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,10 @@ impl Image {
unimplemented!("This is mocked")
}

pub fn unique_id(&self) -> u32 {
unimplemented!("This is mocked")
}

pub fn encode<'a>(
&self,
context: impl Into<Option<&'a mut DirectContext>>,
Expand Down
31 changes: 31 additions & 0 deletions crates/freya-video/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[package]
name = "freya-video"
version = "0.4.0-rc.18"
edition = "2024"
description = "Video playback component for Freya apps"
license = "MIT"
authors = ["Marc Espín <mespinsanz@gmail.com>"]
readme = "../../README.md"
homepage = "https://freyaui.dev/"
repository = "https://github.com/marc2332/freya"
keywords = ["gui", "ui", "video", "skia"]
categories = ["gui", "multimedia"]

[lints]
workspace = true

[dependencies]
freya-core = { workspace = true }
freya-components = { workspace = true }
freya-engine = { workspace = true }
torin = { workspace = true }

ffmpeg-sidecar = { workspace = true }
async-channel = { workspace = true }
rodio = { workspace = true }
async-io = { workspace = true }
blocking = { workspace = true }

tracing = { workspace = true }
anyhow = { workspace = true }
accesskit = { workspace = true }
Loading
Loading