Skip to content
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

Gutter view flickers and changes width oddly when resizing #240

Open
KaiTheRedNinja opened this issue Sep 19, 2022 · 1 comment
Open

Gutter view flickers and changes width oddly when resizing #240

KaiTheRedNinja opened this issue Sep 19, 2022 · 1 comment
Assignees
Labels
bug Something isn't working Editor Editor related hacktoberfest #Hacktoberfest Verified Verified bug
Milestone

Comments

@KaiTheRedNinja
Copy link
Contributor

Description

The gutter view flickers when resizing. This is due to the draw function in the gutter view, and when the view resizes, the layout manager needs a bit of time to arrange things. In the time that the layout manager is laying out views, the gutter view doesn't know what to draw so it just doesn't and returns from the function. Width also changes, which manipulates the starting edge of the code view in odd ways

To Reproduce

  1. Open a tab
  2. Resize the window
  3. Flickers and resizes in odd ways while dragging

Expected behavior

No flickering nor resizing

Version information

Aurora Editor: [e.g. 1.0]
Hash: [e.g. d06fb30]
MacOS: [e.g. 12.3.0]
Xcode: [e.g. 13.3]

Additional context

No response

@KaiTheRedNinja KaiTheRedNinja added bug Something isn't working unverified bug report what is not yet verified. labels Sep 19, 2022
@KaiTheRedNinja KaiTheRedNinja self-assigned this Sep 19, 2022
@0xWDG 0xWDG added this to the Version 1.0 milestone Sep 19, 2022
@0xWDG 0xWDG added Verified Verified bug and removed unverified bug report what is not yet verified. labels Sep 19, 2022
@nanashili nanashili added the hacktoberfest #Hacktoberfest label Sep 19, 2022
nanashili added a commit that referenced this issue Sep 19, 2022
# Description

This PR modifies some code in the gutter and minimap views:
1. Adds cache to the gutter so that it isn't re-processing all the time,
reducing the flickering effect (not completely mitigating it)
2. Splits up the minimap refresh code. Currently, the minimap is
refreshed in an odd way where its refreshed from range 0,0 to whatever
the maximum is. This means that what could be run once is run many
hundred times. Later, the minimap refresh code can be optimised to
prevent this odd refresh pattern.

This PR also puts the swiftlint build before the compile in the build
phases so that errors appear before the build process starts, saving
time.

# Related Issue

* #240 (not completely fixed)
* #241 (prep)

# Checklist

<!--- Add things that are not yet implemented above -->
- [x] I read and understood the [contributing
guide](https://github.com/AuroraEditor/AuroraEditor/blob/main/CONTRIBUTING.md)
as well as the [code of
conduct](https://github.com/AuroraEditor/AuroraEditor/blob/main/CODE_OF_CONDUCT.md)
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] I documented my code
- [x] Review requested

# Screenshots
@KaiTheRedNinja KaiTheRedNinja mentioned this issue Oct 8, 2022
5 tasks
@Maartz
Copy link
Member

Maartz commented Dec 29, 2022

I noticed the flickering when resizing.
It's somehow related to the UI so I upload a video of the current behavior.

Enregistrement.de.l.ecran.2022-12-29.a.11.19.49.mov

Got another strange behavior, the gutter just disappear and came back after I extended the window back once again multiple times.

@0xWDG 0xWDG added the Editor Editor related label Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Editor Editor related hacktoberfest #Hacktoberfest Verified Verified bug
Projects
Status: 🆕 New
Development

No branches or pull requests

4 participants