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

fix ui flashing on reloading and fast scrollong #16153

Conversation

light-and-ray
Copy link
Contributor

@light-and-ray light-and-ray commented Jul 5, 2024

Description

Fixes white UI flash after page reloading/loading and fast scrolling. It happens because css from files can't be loaded so quickly. Disadvantages of patch - black flashing on white theme. But I think it's less critical for eyes, and white themes are less popular

Screenshots/videos:

Before:

Screenrecorder-2024-07-05-18-54-20-924.mp4
Screenrecorder-2024-07-05-19-18-47-491.mp4

After:

Screenrecorder-2024-07-05-19-16-07-790.mp4
Screenrecorder-2024-07-05-19-17-47-417.mp4

Checklist:

@AUTOMATIC1111
Copy link
Owner

White is the default and it's also what I use.

@light-and-ray
Copy link
Contributor Author

I think it's less critical for eyes, and white themes are less popular

@w-e-w
Copy link
Collaborator

w-e-w commented Jul 6, 2024

@AUTOMATIC1111

I made some improvements

it will now apply different colors for light and dark theme

note based on system of browser preference
the ?__theme=light ?__theme=dark doesn't work

it resolves the color from the gradio theme background_fill_primary so every one should be happy with the result
it should not flicker "at all" as long as the theme is using background_fill_primary as the background color (which it should unless some strange thing is going on)


I've introduced a new function modules.shared_gradio_themes.resolve_var this should be able to reslove a gradio them name such as background_fill_primaryto it's color in some cases it would resolve as a function like (likergb(), linear-gradient()` ...)

but I don't know if there's too much I can do about that without overcomplicating things


personally the flicker is driving me crazy

@AUTOMATIC1111 AUTOMATIC1111 merged commit 1da4907 into AUTOMATIC1111:dev Jul 7, 2024
3 checks passed
AUTOMATIC1111 added a commit that referenced this pull request Jul 7, 2024
…d_and_fast_scrollong

fix ui flashing on reloading and fast scrollong
bluelovers added a commit to bluelovers/stable-diffusion-webui that referenced this pull request Jul 7, 2024
bluelovers added a commit to bluelovers/stable-diffusion-webui that referenced this pull request Jul 7, 2024
bluelovers added a commit to bluelovers/stable-diffusion-webui that referenced this pull request Jul 9, 2024
bluelovers added a commit to bluelovers/stable-diffusion-webui that referenced this pull request Jul 9, 2024
ruchej pushed a commit to ruchej/stable-diffusion-webui that referenced this pull request Sep 30, 2024
…hing_on_reload_and_fast_scrollong

fix ui flashing on reloading and fast scrollong
@lawchingman lawchingman mentioned this pull request Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants