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

Make positive input prompt drag resizable. #1236

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

FeepingCreature
Copy link
Contributor

@FeepingCreature FeepingCreature commented Sep 30, 2024

As per mention in Discord.

Problem: Drag bar currently occupies five invisible pixels at the bottom of the text widget. Not sure how to fix that in the layout.

@FeepingCreature FeepingCreature force-pushed the fix/drag-resize branch 4 times, most recently from b0ea6b8 to 4cebcb5 Compare September 30, 2024 21:08
@Acly
Copy link
Owner

Acly commented Oct 21, 2024

It works pretty well.

Would be nice to have a visual indicator, and to avoid the extra layout space. You can put the widget on top of the text box by not adding it to the layout and using move to set a fixed position instead.

This is how the translation button is positioned, same code should work (could also consider moving it to the same place): https://github.com/Acly/krita-ai-diffusion/blob/main/ai_diffusion/ui/region.py#L393

As for visual indicator, something like this?
image

Diagonal lines in the bottom right are also typical, but the translation button is already there and moving it looks a bit weird:
image

@krigeta
Copy link

krigeta commented Jan 14, 2025

any planning to add this feature with the main branch?

@FeepingCreature
Copy link
Contributor Author

Sorry! I'll try to get to it.

@krigeta
Copy link

krigeta commented Jan 14, 2025

Sorry! I'll try to get to it.

np, please let me know when you are done

@FeepingCreature
Copy link
Contributor Author

FeepingCreature commented Jan 22, 2025

As for visual indicator, something like this?

How bout now?

drag_marker

@FeepingCreature FeepingCreature force-pushed the fix/drag-resize branch 4 times, most recently from 20b17db to 4dcbc96 Compare January 22, 2025 18:00
@FeepingCreature
Copy link
Contributor Author

I don't understand why the test is red tbh.

@Acly
Copy link
Owner

Acly commented Jan 22, 2025

How bout now?

Looks lovely, but only when negative prompt is enabled (no button otherwise) and you're using a light theme (barely visible otherwise).

I don't understand why the test is red tbh.

Don't worry about it, is fixed but still on a branch

@FeepingCreature
Copy link
Contributor Author

FeepingCreature commented Jan 23, 2025

  • fix in light mode
  • off-by-one pixel error
  • fix with negative prompt off

@Acly
Copy link
Owner

Acly commented Jan 23, 2025

Nice!

found one more thing, you can get it to this state:
image

But I think I know why: when you toggle neg prompt in settings, it uses isVisible to determine if it's already enabled on the positive prompt. This doesn't work properly for the text box in other than the active workspace (eg. Live box when you are in Generate mode), because it inherits visibility from parent.

I can just fix it after merge though since I was curious and more or less did it already now :)

@Acly Acly merged commit 343f908 into Acly:main Jan 23, 2025
1 of 2 checks passed
@FeepingCreature
Copy link
Contributor Author

Ah yeah oops - I ran into that a bunch, but I didn't think to check for switching workspaces.

Cheers!

@FeepingCreature FeepingCreature deleted the fix/drag-resize branch January 23, 2025 10:30
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