Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Vello (new PR) #635

Merged
merged 10 commits into from
Oct 24, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix peniko deprecated
jrmoulton committed Oct 21, 2024
commit f319ecd9eb85027377ea4a5c9caf2e883b0f08e6
22 changes: 11 additions & 11 deletions examples/themes/src/main.rs
Original file line number Diff line number Diff line change
@@ -27,13 +27,13 @@ fn app_view() -> impl IntoView {
.transition(Outline, Transition::ease_in_out(100.millis()))
.focus_visible(|s| {
s.outline(2.0)
.outline_color(Color::WHITE.with_alpha_factor(0.7))
.outline_color(Color::WHITE.multiply_alpha(0.7))
})
.disabled(|s| {
s.background(Color::DARK_GRAY.with_alpha_factor(0.1))
.border_color(Color::BLACK.with_alpha_factor(0.2))
s.background(Color::DARK_GRAY.multiply_alpha(0.1))
.border_color(Color::BLACK.multiply_alpha(0.2))
})
.active(|s| s.background(Color::BLACK.with_alpha_factor(0.4)))
.active(|s| s.background(Color::BLACK.multiply_alpha(0.4)))
.padding(5.0)
.margin(3.0)
.border_radius(5.0);
@@ -52,12 +52,12 @@ fn app_view() -> impl IntoView {
let green_button = Style::new()
.background(Color::rgb8(180, 188, 175))
.disabled(|s| {
s.background(Color::rgb8(180, 188, 175).with_alpha_factor(0.3))
.border_color(Color::rgb8(131, 145, 123).with_alpha_factor(0.3))
s.background(Color::rgb8(180, 188, 175).multiply_alpha(0.3))
.border_color(Color::rgb8(131, 145, 123).multiply_alpha(0.3))
.color(Color::GRAY)
})
.active(|s| s.background(Color::rgb8(95, 105, 88)).color(Color::WHITE))
.color(Color::BLACK.with_alpha_factor(0.7))
.color(Color::BLACK.multiply_alpha(0.7))
.border(2.0)
.transition(TextColor, Transition::ease_in_out(300.millis()))
.transition(BorderColor, Transition::ease_in_out(300.millis()))
@@ -67,7 +67,7 @@ fn app_view() -> impl IntoView {
.outline_color(Color::rgba8(131, 145, 123, 0))
.focus_visible(|s| {
s.outline(10.0)
.outline_color(Color::rgb8(131, 145, 123).with_alpha_factor(0.3))
.outline_color(Color::rgb8(131, 145, 123).multiply_alpha(0.3))
})
.border_color(Color::rgb8(131, 145, 123))
.hover(|s| s.background(Color::rgb8(204, 209, 201)))
@@ -84,12 +84,12 @@ fn app_view() -> impl IntoView {
})
.class(Frame, |s| {
s.border(2.0)
.border_color(Color::rgb8(131, 145, 123).with_alpha_factor(0.2))
.border_color(Color::rgb8(131, 145, 123).multiply_alpha(0.2))
.border_radius(8.0)
.background(Color::WHITE.with_alpha_factor(0.1))
.background(Color::WHITE.multiply_alpha(0.1))
.padding(12.0)
})
.color(Color::BLACK.with_alpha_factor(0.5))
.color(Color::BLACK.multiply_alpha(0.5))
.font_size(16.0);

let (counter, set_counter) = create_signal(0);