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

feat: Added support for scrolling through text in text paragraph dialog #2810

Merged
merged 4 commits into from Sep 26, 2022

Conversation

mohamedAdhamc
Copy link
Contributor

@mohamedAdhamc mohamedAdhamc commented Aug 24, 2022

before:

before_vid.mp4

After:

after_vid.mp4

One thing I'm not sure about though... with the current implementation if the user manually resized the dialog to a greater vertical size, if he then deletes a line then the dialog is auto-adjusted to the size fitting to the number of lines he has, is this okay? or should it be that if it's manually resized the size of the resize is the new minimum size?

Also I just thought of this, should this auto shrink be only when we are deleting the last line?

p.s. excuse the horrendous video quality I had to compress to upload xD.

@mohamedAdhamc mohamedAdhamc changed the title feat: Allow the text paragraph dialog to shrink if new lines are erased feat: Allow text paragraph dialog to shrink if new lines are erased Aug 24, 2022
@ice0
Copy link
Collaborator

ice0 commented Aug 25, 2022

One thing I'm not sure about though... with the current implementation if the user manually resized the dialog

Can we detect manual resizing?

@mohamedAdhamc
Copy link
Contributor Author

Can we detect manual resizing?

not in a direct way, but if needed I think we can use the button_press,button_release, and check_resize signal to get insight onto whether the resize was by mouse (manual). i.e. if between the button press and release there was a resize then this was a manual resize. And to be even more sure we could even make sure that during this no key was pressed.

@ice0
Copy link
Collaborator

ice0 commented Aug 26, 2022

Can we detect manual resizing?

not in a direct way, but if needed I think we can use the button_press,button_release, and check_resize signal to get insight onto whether the resize was by mouse (manual). i.e. if between the button press and release there was a resize then this was a manual resize. And to be even more sure we could even make sure that during this no key was pressed.

If you notice that something is starting to get overcomplicated (like here), then you may just be moving in the wrong direction.
Please check Gtk::ScrolledWindow widget.

@mohamedAdhamc
Copy link
Contributor Author

If you notice that something is starting to get overcomplicated (like here), then you may just be moving in the wrong direction. Please check Gtk::ScrolledWindow widget.

I agree, also yes I think I saw scrolled windows being used with text-views so yes I think it'll probably make sense, I'll look into it.

@mohamedAdhamc
Copy link
Contributor Author

@ice0 done.

@mohamedAdhamc mohamedAdhamc changed the title feat: Allow text paragraph dialog to shrink if new lines are erased feat: Added support for scrolling text in text paragraph dialog Aug 30, 2022
@mohamedAdhamc mohamedAdhamc changed the title feat: Added support for scrolling text in text paragraph dialog feat: Added support for scrolling through text in text paragraph dialog Aug 30, 2022
synfig-studio/src/gui/app.cpp Outdated Show resolved Hide resolved
synfig-studio/src/gui/app.cpp Outdated Show resolved Hide resolved
synfig-studio/src/gui/app.cpp Outdated Show resolved Hide resolved
@mohamedAdhamc
Copy link
Contributor Author

@ice0 done, this is the new default size

new def size

@ice0 ice0 merged commit 630eddc into synfig:master Sep 26, 2022
@ice0
Copy link
Collaborator

ice0 commented Sep 26, 2022

Merged. Thank you!

@mohamedAdhamc
Copy link
Contributor Author

Great! hopefully many more to come :)

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.

None yet

2 participants