Skip to content

Commit 6ae6976

Browse files
committed
convert colors to float first
1 parent 14e8287 commit 6ae6976

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/wkwebview/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,10 @@ impl InnerWebView {
375375
webview.setOpaque(false);
376376

377377
let color = objc2_ui_kit::UIColor::colorWithRed_green_blue_alpha(
378-
(red / 255).into(),
379-
(green / 255).into(),
380-
(blue / 255).into(),
381-
(alpha / 255).into(),
378+
red as f64 / 255.0,
379+
green as f64 / 255.0,
380+
blue as f64 / 255.0,
381+
alpha as f64 / 255.0,
382382
);
383383

384384
if !is_child {
@@ -854,10 +854,10 @@ r#"Object.defineProperty(window, 'ipc', {
854854
let (red, green, blue, alpha) = _background_color;
855855

856856
let color = objc2_ui_kit::UIColor::colorWithRed_green_blue_alpha(
857-
(red / 255).into(),
858-
(green / 255).into(),
859-
(blue / 255).into(),
860-
(alpha / 255).into(),
857+
red as f64 / 255.0,
858+
green as f64 / 255.0,
859+
blue as f64 / 255.0,
860+
alpha as f64 / 255.0,
861861
);
862862

863863
if !self.is_child {

0 commit comments

Comments
 (0)