Skip to content

Commit

Permalink
Merge branch 'master' into fix-context-surface
Browse files Browse the repository at this point in the history
  • Loading branch information
woelper authored Feb 29, 2024
2 parents afa1d09 + 36c03c8 commit a70d38e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ fn init(app: &mut App, gfx: &mut Graphics, plugins: &mut Plugins) -> OculanteSta
style.text_styles.get_mut(&TextStyle::Button).unwrap().size = 18. * font_scale;
style.text_styles.get_mut(&TextStyle::Small).unwrap().size = 15. * font_scale;
style.text_styles.get_mut(&TextStyle::Heading).unwrap().size = 22. * font_scale;
debug!("Accent color: {:?}", state.persistent_settings.accent_color);
style.visuals.selection.bg_fill = Color32::from_rgb(
state.persistent_settings.accent_color[0],
state.persistent_settings.accent_color[1],
Expand Down Expand Up @@ -1103,7 +1102,10 @@ fn drawe(app: &mut App, gfx: &mut Graphics, plugins: &mut Plugins, state: &mut O

if state.reset_image {
let draw_area = ctx.available_rect();
let window_size = nalgebra::Vector2::new(draw_area.width(), draw_area.height());
let window_size = nalgebra::Vector2::new(
draw_area.width().min(app.window().width() as f32),
draw_area.height().min(app.window().height() as f32),
);

if let Some(current_image) = &state.current_image {
let img_size = current_image.size_vec();
Expand Down

0 comments on commit a70d38e

Please sign in to comment.