Skip to content

Update notan #666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Update notan #666

wants to merge 8 commits into from

Conversation

woelper
Copy link
Owner

@woelper woelper commented Apr 6, 2025

This update brings egui up to date with the recent changes in notan.

Known issues / to fix:

  • Crash when opening settings : placer.rs:149:9: You cannot advance the cursor when in a grid layout
  • Recent menu grows out of bounds
  • Info panel is too wide and has overlapping scrollbar (most likely caused by zoomed image being too large)

Things we can do now:

  • Test global UI scale option
  • egui should now have pixel-perfect rendering, fonts should look better now. Verify on various resolutions
  • We can have windows that float next to the main window. Can we identify candidates for it?

Things that should have independent issues:

  • Painting always loses previous stroke

As this is a huge jump in versioning, more testing is appreciated.
egui_modal has been removed and replaced with a simple custom modal solution based on existing egui modal code.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

src/ui/mod.rs:132

  • Changing the return type of get_rounding from f32 to u8 could lead to loss of precision compared to the previous implementation. Ensure that this change does not affect UI layout or visual consistency.
fn get_rounding(&self, height: f32) -> u8 {

src/ui/edit_ui.rs:471

  • [nitpick] Consider using a more descriptive modal id instead of "modal" to avoid potential collisions or confusion with multiple modals in your UI.
let modal = super::Modal::new("modal", ctx);


ui.allocate_ui_at_rect(recent_rect, |ui| {

// FIXME: This overflows
Copy link
Preview

Copilot AI Apr 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overflow issue indicated by the FIXME comment for the recent menu should be addressed; consider adjusting the layout or maximum rectangle to ensure UI elements remain within bounds.

Suggested change
// FIXME: This overflows
// Adjusted to fit within bounds

Copilot uses AI. Check for mistakes.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't say... how about an actual suggestion about how the code will not overflow and grow the recent list :) ?

@woelper
Copy link
Owner Author

woelper commented Apr 19, 2025

@Stoppedpuma

As the info panel needed to be fixed, I took another look at making it resizable. It can be done, but with the following limitations (scrollbars are the problem)

  • Scrollbars are always visible (the default now)
  • Scrollbars are never visible (but scrolling works)
  • Preview window always has fixed size and does not scale when resizing panel

In addition, the sidebar can also be fixed again in size.

@Stoppedpuma
Copy link
Collaborator

Stoppedpuma commented Apr 19, 2025

@Stoppedpuma

As the info panel needed to be fixed, I took another look at making it resizable. It can be done, but with the following limitations (scrollbars are the problem)

  • Scrollbars are always visible (the default now)
  • Scrollbars are never visible (but scrolling works)
  • Preview window always has fixed size and does not scale when resizing panel

In addition, the sidebar can also be fixed again in size.

Hmm, I can't say for certain. I can definitely understand the appeal of allowing it to be resizable but I'm not too sure about the preview window not being able to resize as well. That is probably my only gripe. Besides that though, I'll leave the scrollbar preference with you. Is there anything we would be able to have show next to the picker if it's resized large enough? Such as a prettier HEX info display?

Are the scrollbar limitations still a problem if it's not resizable? If not then this still may be the way to go so that we aren't either A. Having a scrollbar there for nothing most of the time, or B. Not having an indicator that the user can scroll down. I think the current way handles this well as it only shows when there's a reason to scroll down.

On the topic of resizing, a way to quickly resize to default would be nice. This would work by just double clicking either the info or edit panel (the resize indicator would be an even better spot if that's possible) and resizing the one double clicked to default. If this is hard to implement then don't worry about it.

@Stoppedpuma
Copy link
Collaborator

@woelper few things I've found in my testing:

  • Closing the preferences window crashes Oculante
  • Custom sliders seem to be broken (see picture below)
    image
  • Position icon is offset (I'll fix this one at some point)
  • Sliderbar being visible at all times looks weird, makes some buttons unnecessarily large like semi-transparent toggle, shortens image info. (Discussion is likely needed here for figuring something out)
  • Perspective crop disappears completely and won't return until the application is restarted if the viewpoint is moved at all (scrolling in / out included)
  • original and modified buttons don't work when paint mode is open
  • Histogram does not update to filters (This happens on master as well)
  • Histogram updates take longer compared to master
  • Draw frame around image is broken (see video below)
1748104706.mp4
  • Interpolation settings don't apply in live time, the you have to change images for it to apply (not sure if this is specific to this PR or not.)
  • Expanding imageinfo panel too much makes basically everything disappear (see image below)
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants