Skip to content

Commit

Permalink
refactor: set min window size to show all panel options (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
pewsheen authored Dec 6, 2024
1 parent 6f17f66 commit 74bead3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/components/prompt/prompt.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ body {
.dialog {
display: flex;
background: #ffffff;
width: 400px;
min-height: 110px;
width: 300px;
min-height: 60px;
max-height: 300px;
flex-direction: column;
align-items: center;
Expand All @@ -24,6 +24,6 @@ body {
.msg {
display: inline-block;
width: 100%;
min-height: 90px;
min-height: 50px;
text-align: center;
}
5 changes: 5 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ fn parse_cli_args() -> Result<CliArgs, getopts::Fail> {

let mut window_attributes = winit::window::Window::default_attributes();

// set min inner size
// should be at least able to show the whole control panel
// FIXME: url input has weird behavior that will expand lager when having long text
window_attributes = window_attributes.with_min_inner_size(dpi::LogicalSize::new(480, 72));

let width = matches.opt_get::<u32>("width").unwrap_or_else(|e| {
log::error!("Failed to parse width command line argument: {e}");
None
Expand Down

0 comments on commit 74bead3

Please sign in to comment.