Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
adriankumpf committed Nov 25, 2023
1 parent cc93698 commit 0855c2e
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ use oauth2::url::Url;
use simple_logger::SimpleLogger;

use muda::{Menu, PredefinedMenuItem, Submenu};
use tao::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoopBuilder, EventLoopProxy},
window::WindowBuilder,
};
#[cfg(target_os = "linux")]
use tao::platform::unix::WindowExtUnix;
#[cfg(target_os = "windows")]
use tao::platform::windows::WindowExtWindows;
use tao::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoopBuilder, EventLoopProxy},
window::WindowBuilder,
};
use wry::WebViewBuilder;

mod auth;
Expand Down Expand Up @@ -121,26 +121,26 @@ fn main() -> anyhow::Result<()> {

let proxy = event_proxy.clone();

#[cfg(any(
target_os = "windows",
target_os = "macos",
target_os = "ios",
target_os = "android"
))]
let builder = WebViewBuilder::new(&window);

#[cfg(not(any(
target_os = "windows",
target_os = "macos",
target_os = "ios",
target_os = "android"
)))]
let builder = {
use tao::platform::unix::WindowExtUnix;
use wry::WebViewBuilderExtUnix;
let vbox = window.default_vbox().unwrap();
WebViewBuilder::new_gtk(vbox)
};
#[cfg(any(
target_os = "windows",
target_os = "macos",
target_os = "ios",
target_os = "android"
))]
let builder = WebViewBuilder::new(&window);

#[cfg(not(any(
target_os = "windows",
target_os = "macos",
target_os = "ios",
target_os = "android"
)))]
let builder = {
use tao::platform::unix::WindowExtUnix;
use wry::WebViewBuilderExtUnix;
let vbox = window.default_vbox().unwrap();
WebViewBuilder::new_gtk(vbox)
};

let webview = builder
.with_initialization_script(INITIALIZATION_SCRIPT)
Expand Down

0 comments on commit 0855c2e

Please sign in to comment.