Skip to content

Commit

Permalink
restrict minimum size of window to 100x100
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Feb 2, 2024
1 parent de175f4 commit 8ca4ad2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion v2/src/wry/webview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ pub struct WebViewRenderer {

impl WebViewRenderer {
pub fn new(config: &Config, event_loop: &EventLoop, mut menu: Menu) -> Result<Self> {
let mut builder = WindowBuilder::new().with_title("Shiba").with_visible(false);
let mut builder = WindowBuilder::new()
.with_title("Shiba")
.with_visible(false)
.with_min_inner_size(PhysicalSize { width: 100, height: 100 });

let window_state = if config.window().restore { config.data_dir().load() } else { None };
let (zoom_level, always_on_top) = if let Some(state) = window_state {
Expand Down

0 comments on commit 8ca4ad2

Please sign in to comment.