Skip to content

feat: simplified canvas resize - #1895

Merged
rodolforg merged 1 commit into
synfig:masterfrom
Keyikedalube:canvas_prop_simple
Jan 28, 2023
Merged

rodolforg merged 1 commit into
synfig:masterfrom
Keyikedalube:canvas_prop_simple

Conversation

@Keyikedalube

@Keyikedalube Keyikedalube commented Dec 7, 2020 •

Copy link
Copy Markdown
Contributor

Closes #777

  • Canvas Resize - Resizes both canvas and content
  • Set Dimensions - Resizes only the canvas

20201209_19h15m47s_grim

New dialog update

Screenshot_2021-05-29_06-07-07
Screenshot_2021-05-29_06-07-15

@Keyikedalube

This comment has been minimized.

@Keyikedalube

This comment has been minimized.

@Keyikedalube
Keyikedalube marked this pull request as ready for review December 9, 2020 14:00
@ice0
ice0 requested a review from morevnaproject December 13, 2020 05:19
@ice0 ice0 added the GUI label Dec 13, 2020
@ice0 ice0 changed the title Simplified canvas settings [Synfig Studio] Simplified canvas settings Dec 13, 2020
@rodolforg

Copy link
Copy Markdown
Contributor

@Keyikedalube @morevnaproject do you think it would be good to have a label on each dialog explaining what it will change? The PR description does explain :P

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

@Keyikedalube @morevnaproject do you think it would be good to have a label on each dialog explaining what it will change? The PR description does explain :P

@rodolforg I agree :)
@morevnaproject approval required.

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

Another suggestion... Maybe just rename menu item labels?

Instead of

  • Set dimensions...
  • Resize...

What about

  • Resize canvas only...
  • Resize both canvas & content...

That way the user easily knows what each dialogs intentions are reading from the menu item.

@FirasH

FirasH commented Dec 21, 2020 •

Copy link
Copy Markdown
Member

Another suggestion... Maybe just rename menu item labels?

Instead of

* **Set dimensions...**

* **Resize...**

What about

* **Resize canvas only...**

* **Resize both canvas & content...**

That way the user easily knows what each dialogs intentions are reading from the menu item.

I suggest a simpler label:

  • Resize Canvas...
  • Resize Canvas & Content...

or alternatively a Resize sub-menu under which you find:

  • Canvas...
  • Canvas & Content...

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

I suggest a simpler label:

  • Resize Canvas...
  • Resize Canvas & Content...

I love this suggestion better :)

@FirasH

FirasH commented Dec 22, 2020

Copy link
Copy Markdown
Member

I'm trying to understand how the current Canvas Properties dialog works (and probably will never understand it fully 😂).

These are my general thoughts about UI:
Many open source projects are very capable and interesting like Synfig, but for average users understanding 20% of how they work is a huge effort (if they don't quit before).
As an example, current Canvas Properties dialog only its developer probably understands how to use it...
Not to mention when things get hidden somewhere in a dialog inside other dialogs and all that madness.

Today after 1 year of using Synfig intensively I found a how to resize Canvas and content reading what @morevnaproject wrote in the linked issue.
I've always used open source graphics software (especially Inkscape and Scribus to which I contributed a lot) and still struggle to suggest it to non-techincal people.

Software has to serve a purpose, not become the purpose itself.

Things have to be simple and intuitive.
I thought about this improvement you're working on and is going in the right direction of keeping things simple and intuitive.

What if we could simplify things even more by having a single entry:
Canvas > Resize...
in which you find the same dialog with "Canvas size" instead of "Image size", and in that dialog a checkbox where you enable/disable content resizing without having to think about anything else (like physical width, X/Y resolutions, etc.)?

@Keyikedalube

Keyikedalube commented Dec 23, 2020 •

Copy link
Copy Markdown
Contributor Author

@FirasH

I'm trying to understand how the current Canvas Properties dialog works (and probably will never understand it fully 😂).

I'm on the same boat LOL. The maintainer had to explain to me in detail the expected behavior for the linked issue.

What if we could simplify things even more by having a single entry:
Canvas > Resize...

But that would mean both dialogs would have to share the same toggled behavior status.
In this PR, Resize is on while Set Dimensions is off.

Maybe, the maintainer intentions were...

  • Freely set dimensions in any resolution (Set Dimensions)
    1. Then user import images
    2. Starts working on the animation
    3. Now the user wants to resize
      at this point both canvas and content have to be locked. Hence, the default toggled on behavior in...
  • Resize current animation file (Resize)
    Both canvas and content are manipulated through this dialog

So, if we were to go with your proposed suggestion Canvas > Resize... the dialog would be a lil more complicated.
Imagine, the user enables content resizing. Do we turn on toggled behavior at the same time automatically if it's current status was off, to make sure content isn't stretched horizontally/vertically more than necessary?

@FirasH

FirasH commented Dec 23, 2020

Copy link
Copy Markdown
Member

Ok, I get what you mean a bit better.

  • 1st dialog Set Dimensions resizes everything (Canvas and Content toghether) as a solid block.
  • 2nd dialog Resize resizes with custom settings, including the options in current Canvas Properties Dialog cleaning a bit the layout

At this point the dialog Canvas > Properties... is going to be disassembled (right?) in smaller dialogs, something like:
Canvas in the top menu (as of now) and a list of entries like:

  • Properties... dialog which contains Name/Description/Gamma correction (not as a tab)
  • Grid... dialog which contains parts from Canvas > Options...
  • Guides... dialog (when implemented hopefully) for all guides stuff (maybe with conversions from internal unit to px or whatever)
  • Time... dialog which contains Time tabs from Canvas > Properties... and Canvas > Options... not as a tab, but as a specific whole dialog
  • Units.. dialog (when implemented) for all units/convertions and all that stuff
  • Resize Canvas... dialog which resizes everything as a solid block
  • Resize Content & Canvas... dialog which contains Image and Other tabs with a clean layout

you get the idea, just splitting options in specific dialogs (without repeating options across different dialogs).

@morevnaproject

morevnaproject commented Dec 23, 2020 •

Copy link
Copy Markdown
Member

Hi everyone! Apologies for delay with review.

I have tested this PR and when I build with Autotools (Linux) I got the following error when application starts -

screenshot_002

After closing the dialog I am choosing "File" - "New" and nothing happens, just got the following error in console -

(synfigstudio:10770): glibmm-CRITICAL **: 21:11:27.387: 
unhandled exception (type Glib::Error) in signal handler:
domain: g-file-error-quark
code  : 4
what  : Failed to open file “/home/konstantin/sources/synfig/_production/build/share/synfig/ui/canvas_properties_simple.glade”: No such file or directory`

Another suggestion... Maybe just rename menu item labels?

Instead of

* **Set dimensions...**

* **Resize...**

What about

* **Resize canvas only...**
* **Resize both canvas & content...**

How about this? -

  • Set canvas dimensions
  • Resize image

BTW, here's what we have in Krita for same operations -

screenshot_001

What if we could simplify things even more by having a single entry:
Canvas > Resize...

But that would mean both dialogs would have to share the same toggled behavior status.
In this PR, Resize is on while Set Dimensions is off.

+1 for @Keyikedalube's arguments

At this point the dialog Canvas > Properties... is going to be disassembled (right?) in smaller dialogs, something like:
Canvas in the top menu (as of now) and a list of entries like:

* **Properties...** dialog which contains Name/Description/Gamma correction (not as a tab)
* **Grid...** dialog which contains parts from `Canvas > Options...`
* **Guides...** dialog (when implemented hopefully) for all guides stuff (maybe with conversions from internal unit to px or whatever)
* **Time...** dialog which contains Time tabs from `Canvas > Properties...` and `Canvas > Options...` not as a tab, but as a specific whole dialog
* **Units..** dialog (when implemented) for all units/convertions and all that stuff
* **Resize Canvas...** dialog which resizes everything as a solid block
* **Resize Content & Canvas...** dialog which contains Image and Other tabs with a clean layout

I like this idea - to continue splitting options in specific dialogs ^__^

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

At this point the dialog Canvas > Properties... is going to be disassembled (right?) in smaller dialogs,

I like this idea - to continue splitting options in specific dialogs ^__^

List of new issues to open...

@Keyikedalube

Copy link
Copy Markdown
Contributor Author
  • this

    • Set canvas dimensions
    • Resize image
  • or this

    • Resize Canvas...
    • Resize Canvas & Content...

I prefer the second one because those menu items are more readable (to me)

@morevnaproject @FirasH ..?

@FirasH

FirasH commented Dec 24, 2020

Copy link
Copy Markdown
Member

Set Canvas dimensions... vs Resize Canvas...

I prefer the second one because it’s the same meaning but shorter

Resize Image... vs Resize Canvas & Content...

In this case it depends on what you mean with Image (it’s also used in Canvas Properties dialog as Image Area IIRC with the meaning of objects on canvas?), but I think it’s easy to confuse with Image layers or something else.

@FirasH

FirasH commented Dec 24, 2020

Copy link
Copy Markdown
Member

Alternatively:

  • Canvas > Set dimensions... or Canvas > Resize...
  • Canvas > Resize with Content...

which should be closer to what @morevnaproject suggested.

This way we’re not repeating the word Canvas every time...

Comment thread synfig-studio/src/gui/app.cpp Resolved
@Keyikedalube

This comment has been minimized.

@FirasH

FirasH commented Dec 24, 2020

Copy link
Copy Markdown
Member

Tested the last commit and I think Resize and Resize with Content are swapped.
Other than that changing size with mouse scroll is "blocked" when width and height are linked but that is already known.

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

Tested the last commit and I think Resize and Resize with Content are swapped.
Other than that changing size with mouse scroll is "blocked" when width and height are linked but that is already known.

Thanks! It's been a while I came back to this PR so my mistake here.
Correcting it...

@morevnaproject

Copy link
Copy Markdown
Member
* `Canvas > Set dimensions...` or `Canvas > Resize...`

I am more inclined for "Set dimensions...", than "Resize" (possibly, because for me "Resize" is always associated with changing canvas size and content). ^__^

In any case, this is just an opinion and this not prevents the PR from merging.
I have tested the PR and it works great for me.
Much thanks to @Keyikedalube, one more step toward simplicity and intuitive functionality! ^__^

morevnaproject
morevnaproject previously approved these changes Dec 26, 2020
@rodolforg

Copy link
Copy Markdown
Contributor

I am more inclined for "Set dimensions...", than "Resize" (possibly, because for me "Resize" is always associated with changing canvas size and content). ^__^

@morevnaproject What about "Set size…" ?

rodolforg
rodolforg previously approved these changes Jan 15, 2023

@rodolforg rodolforg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code-wise I think it is fine.
I didn't test the dialog itself, though.

@morevnaproject morevnaproject left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I tested and it looks good to me now!

@morevnaproject morevnaproject left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Waiting for fix of line 206 in synfig-studio/src/gui/dialogs/canvasresize.cpp ^__^

@FirasH

FirasH commented Jan 16, 2023

Copy link
Copy Markdown
Member

I didn't look into the code, but testing it I noticed this issue:

  1. Create a new animation (I use size by default a vertical cavas with dimensions 1080x1920)
  2. Canvas > Resize...
  3. Enable Link width and height
  4. Change Width value to 500, Height will be set as 888
  5. Press OK to resize the Canvas

The Canvas is now square with size 500x500, instead of 500x888.

Not sure if this is related to what @rodolforg reported.

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

@FirasH @rodolforg @morevnaproject
For canvas properties dialog apply action immediately copies new rend_desc to the old one. However, for this dialog I assumed manually setting only those new values instead of copying/assigning it entirely would be nore efficient.

A year ago the code worked fine LOL. More problems creeping up when it's about time to merge. Yikes!

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

"Link width and height" option enabled by default (2).

That'd be conflicting with the current Canvas Properties dialog rend desc state. I suggest a new PR to link width/height by default so each dialog shares the same rend desc object.

Ok, so I made a mistake assuming Canvas properties link width/height wasn't toggled by default (my memory defaults to older Synfig v1.2x when the toggle wasn't enabled by default so my silly ignorance here). This PR dialog simply reads the current rend_desc object and un-toggles the link by default.

Do we want the link and unlink state to be saved when the dialog changes are applied? Canvas properties doesn't. It reverts to toggled state when:

  1. Open Canvas Properties dialog
  2. Input new resolution
  3. Untoggle link
  4. OK
  5. Reopen dialog
  6. Link remains toggled violating previous changes

@FirasH

FirasH commented Jan 24, 2023

Copy link
Copy Markdown
Member

I didn't look into the code, but testing it I noticed this issue:

1. Create a new animation (I use size by default a vertical cavas with dimensions 1080x1920)

2. `Canvas` > `Resize...`

3. Enable `Link width and height`

4. Change `Width` value to 500, `Height` will be set as 888

5. Press `OK` to resize the Canvas

The Canvas is now square with size 500x500, instead of 500x888.

Not sure if this is related to what @rodolforg reported.

@Keyikedalube this is fixed now!

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

@morevnaproject @rodolforg all squashed and done. Please review in your free time.

@rodolforg

Copy link
Copy Markdown
Contributor

Code looks fine, and it seem to work great!
@morevnaproject do you want to try it again before we merge this PR?

rodolforg
rodolforg previously approved these changes Jan 26, 2023
@rodolforg

Copy link
Copy Markdown
Contributor

@Keyikedalube I don't have access to AppVeyor.
Could you rebase your PR to current master and force-push it again to trigger the AppVeyor? Otherwise it can't be merged.

@rodolforg

Copy link
Copy Markdown
Contributor

As it is in a good state, I'll merge it. If @morevnaproject sees something to fix, we (a.k.a. @Keyikedalube ;) ) can fix it later

@rodolforg
rodolforg merged commit 38a85c0 into synfig:master Jan 28, 2023
@rodolforg

Copy link
Copy Markdown
Contributor

Thank you!

@ice0

ice0 commented Jan 28, 2023

Copy link
Copy Markdown
Collaborator

Do we want the link and unlink state to be saved when the dialog changes are applied? Canvas properties doesn't. It reverts to toggled state when:

I think yes. It's not noticeable in Canvas properties because they're complex, but here I noticed it right away.

@ice0

ice0 commented Jan 28, 2023

Copy link
Copy Markdown
Collaborator

@rodolforg @Keyikedalube

I don't have access to AppVeyor.

Can you check your access to AppVeyor now?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify canvas settings window

5 participants