mirror of
https://github.com/Stremio/stremio-shell-ng.git
synced 2026-01-11 22:40:32 +00:00
Format BorderBreaker changes
This commit is contained in:
parent
2e66df3ad7
commit
1ae83be225
4 changed files with 12 additions and 16 deletions
|
|
@ -462,4 +462,3 @@ impl MainWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,15 +5,13 @@ use std::{
|
|||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use crate::stremio_app::{
|
||||
stremio_player::{BoolProp, FpProp, InMsg, InMsgArgs, InMsgFn, PropKey, PropVal, StrProp},
|
||||
window_helper,
|
||||
};
|
||||
use flume::Sender;
|
||||
use once_cell::sync::Lazy;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use crate::stremio_app::{
|
||||
stremio_player::{
|
||||
BoolProp, FpProp, InMsg, InMsgArgs, InMsgFn, PropKey, PropVal, StrProp,
|
||||
},
|
||||
window_helper,
|
||||
};
|
||||
|
||||
static CONFIG_DIR: Lazy<PathBuf> = Lazy::new(|| {
|
||||
env::var("APPDATA")
|
||||
|
|
@ -124,7 +122,10 @@ pub struct AspectController {
|
|||
|
||||
impl AspectController {
|
||||
pub fn new() -> Self {
|
||||
Self::with_paths(CONFIG_DIR.join("aspect.json"), window_helper::primary_monitor_ratio())
|
||||
Self::with_paths(
|
||||
CONFIG_DIR.join("aspect.json"),
|
||||
window_helper::primary_monitor_ratio(),
|
||||
)
|
||||
}
|
||||
|
||||
fn with_paths(config_path: PathBuf, display_ratio: f32) -> Self {
|
||||
|
|
@ -279,11 +280,7 @@ mod tests {
|
|||
AspectMode::AutoDetect.overlay_label(ratio),
|
||||
format!("Auto ({:.2}:1)", ratio)
|
||||
);
|
||||
assert_eq!(
|
||||
AspectMode::Ratio21x9.overlay_label(ratio),
|
||||
"21:9 Ultrawide"
|
||||
);
|
||||
assert_eq!(AspectMode::Ratio21x9.overlay_label(ratio), "21:9 Ultrawide");
|
||||
assert_eq!(AspectMode::Cinema.overlay_label(ratio), "Cinema");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ pub mod player;
|
|||
pub use player::Player;
|
||||
pub mod communication;
|
||||
pub use communication::{
|
||||
BoolProp, CmdVal, FpProp, InMsg, InMsgArgs, InMsgFn, PlayerEnded, PlayerEvent, PlayerProprChange,
|
||||
PlayerResponse, PropKey, PropVal, StrProp,
|
||||
BoolProp, CmdVal, FpProp, InMsg, InMsgArgs, InMsgFn, PlayerEnded, PlayerEvent,
|
||||
PlayerProprChange, PlayerResponse, PropKey, PropVal, StrProp,
|
||||
};
|
||||
#[cfg(test)]
|
||||
mod communication_tests;
|
||||
|
|
|
|||
|
|
@ -163,4 +163,4 @@ pub fn primary_monitor_ratio() -> f32 {
|
|||
} else {
|
||||
width / height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue