Skip to content

Commit

Permalink
Problems on first start. fixes #208 (#210)
Browse files Browse the repository at this point in the history
- Image not visible until fit / fixed button press
- Help screen shows without button highlighted
  • Loading branch information
DougLau authored Nov 2, 2023
1 parent c743656 commit 9197704
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ fn main() {
});
}
let help_visible = Cell::new(first_launch);
bottom_bar.set_help_visible(help_visible.get());
help_screen.set_visible(help_visible.get());
{
let help_screen = help_screen;
Expand Down
3 changes: 2 additions & 1 deletion src/widgets/picture_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ impl PictureWidgetData {
pub fn set_img_size_to_orig(&mut self) {
self.img_texel_size = 1.0;
self.scaling = ScalingMode::Fixed;
self.config.lock().unwrap().set_scaling(self.scaling);
self.update_scaling_buttons();
self.render_validity.invalidate();
}
Expand Down Expand Up @@ -519,7 +520,7 @@ impl PictureWidget {

program,
bright_shade: 0.95,
img_texel_size: 0.0,
img_texel_size: 1.0,
scaling,
img_pos: Default::default(),
antialiasing,
Expand Down

0 comments on commit 9197704

Please sign in to comment.