Skip to content

Implemented canvasproperties dialog glade file - #1577

Closed
Keyikedalube wants to merge 1 commit into
synfig:masterfrom
Keyikedalube:canvasprop_res_ui
Closed

Keyikedalube wants to merge 1 commit into
synfig:masterfrom
Keyikedalube:canvasprop_res_ui

Conversation

@Keyikedalube

@Keyikedalube Keyikedalube commented Jul 22, 2020 •

Copy link
Copy Markdown
Contributor
  • Slight improvement to UI alignment

  • Use filesystem instead of gresource due to CMake feature issue

  • Duplicated Widget_RendDesc class to CanvasProperties class
    Issue User-friendly rendering dialogue #721 wants a new render layout with minimal options so
    Widget_RendDesc is safe to be deprecated

Attempted fix for issue #1552

@Keyikedalube

This comment has been minimized.

@Keyikedalube Keyikedalube left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is intentional. For testing purpose since it's still a work in progress PR

The present() call in CanvasProperties constructor

EDIT: Removed present() since this PR is ready :)

@Keyikedalube

This comment has been minimized.

@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.

By the way, did you give on the Glib::property?

Comment thread synfig-studio/ui/synfig-catalog.xml Resolved
Comment thread synfig-studio/src/gui/mainwindow.cpp Resolved
Comment thread synfig-studio/src/gui/CMakeLists.txt Resolved
Comment thread synfig-studio/ui/synfig-catalog.xml Resolved
Comment thread synfig-studio/ui/synfig-catalog.xml Resolved
Comment thread synfig-studio/ui/synfig-catalog.xml Resolved
@Keyikedalube
Keyikedalube marked this pull request as draft July 23, 2020 03:58
@Keyikedalube

Copy link
Copy Markdown
Contributor Author

It'd be nice if someone could help me with updating the autotools build script...

@rodolforg

Copy link
Copy Markdown
Contributor

By the way, where's synfig.gresource.xml ? :)

@Keyikedalube

Keyikedalube commented Jul 25, 2020 •

Copy link
Copy Markdown
Contributor Author

@rodolforg In the top_srcdir/synfig-studio/ui/ directory

@rodolforg

Copy link
Copy Markdown
Contributor

Is it on this PR?

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

Hohoho..! I missed that file ;P

It's not my fault though because when I do git status my synfig.gresource.xml isn't listed

This line is the reason

*.xml

Pushing the changes...

@Keyikedalube
Keyikedalube marked this pull request as ready for review July 25, 2020 15:30
@Keyikedalube

This comment has been minimized.

@Keyikedalube

This comment has been minimized.

@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.

Your code is pretty clean and easy to read :)
I wonder if synfig will be this way one day... lol

The only thing that bothers me is that lock thing. But it's okay if it works.

Anyway I'll code the autotools changes and make a PR for your... PR ;)

@rodolforg

Copy link
Copy Markdown
Contributor

Sorry I delayed too long here with you.

There's something 'bothering' me in this PR: it does two 'unrelated' things: migrate to g_resource and reimplement dialog.
I guess it would be better split into two PRs.
My reasoning:

@rodolforg

Copy link
Copy Markdown
Contributor

Ops. I didn't have the intention to push that! How did it happen???

@rodolforg

Copy link
Copy Markdown
Contributor
* it would be better to have only one way to ui loading/storing in code. Synfig is complicated enough to provide two different ways to do something 'basic'

What I mean is: let's migrate the existent ones first or right after this PR merge :)

@rodolforg

Copy link
Copy Markdown
Contributor

Could you please rebase?

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

resources (new folder) > ui

Hmm... That will make it easier for build scripts to use the relative path of resources from the current source directory instead of recursing backward like I did on CMake

Keep it for future enhancement too. I don't want to touch the autoconfigure and automake files. Might mishandle them :(

@rodolforg

Copy link
Copy Markdown
Contributor

I don't want to touch the autoconfigure and automake files.

I did the autotools changes here. I'll add to your PR as soon it's rebased.

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

Still building [322/704]

Rebase in 20 min...

Sorry, I've got this slow hardware -> 2.0 GHz

@rodolforg

Copy link
Copy Markdown
Contributor

How many cores do you have? :)

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

2 physical cores and 2 virtual cores

I use j -2 only because I don't want the build to swap out my firefox session

Shameful hardware for a big project but this is my first computer so no regrets

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

Rebase done :)

Have a great day!

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

@rodolforg And thanks for looking into this PR. You made it so much better with reviews 👍 👍 👍

@rodolforg

Copy link
Copy Markdown
Contributor

And thanks for looking into this PR

You're welcome - I'm always afraid I demand too much XD

Great job here :)

So if the checks run fine, we could squash it all, right? Or does leaving those separated commits make sense?

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

squashing is better

review commits are dirty once they get merged on master branch

@rodolforg

Copy link
Copy Markdown
Contributor

ok. I'll do something here before.

@Keyikedalube

This comment has been minimized.

Keyikedalube added a commit to Keyikedalube/synfig that referenced this pull request Oct 14, 2020
shortcuts

Can be tested either on CMake or Autotools

Thanks to rodolforg previous commit on my PR synfig#1577
Saved me more time on Autotools part :P
@ghost

ghost commented Oct 15, 2020 •

Copy link
Copy Markdown

Congratulations 🎉. DeepCode analyzed your code in 2.641 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

👉 View analysis in DeepCode’s Dashboard | Configure the bot

@Keyikedalube
Keyikedalube force-pushed the canvasprop_res_ui branch 2 times, most recently from 105f9bf to 6b4819c Compare October 15, 2020 16:18
@Keyikedalube

Copy link
Copy Markdown
Contributor Author

There's something 'bothering' me in this PR: it does two 'unrelated' things: migrate to g_resource and reimplement dialog.
I guess it would be better split into two PRs.

Now it does one thing only :)

GResource is delayed because of old CMake version from Travis.

@rodolforg

Copy link
Copy Markdown
Contributor

Are you sure Widget_RendDesc should be deprecated? It's used in Render dialog too…

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

Are you sure Widget_RendDesc should be deprecated? It's used in Render dialog too…

For this #721 I'm thinking @morevnaproject wants the Gtk::FileChooserDialog for:

  1. Image render
  2. Video render

And if my guess is right because to me that dialog is simple and user-friendly... Widget_RendDesc has to go away. There's no way we can attach a gamma pattern or notebook tab in filechooserdialog. It's possible but that's bad design and the dialog is gonna be so big.

Keyikedalube added a commit to Keyikedalube/synfig that referenced this pull request Oct 21, 2020
shortcuts

Can be tested either on CMake or Autotools

Thanks to rodolforg previous commit on my PR synfig#1577
Saved me more time on Autotools part :P
@rodolforg

Copy link
Copy Markdown
Contributor

@Keyikedalube please rebase it to fix the CMakeLists.txt conflict and add the missing License notices to your newly created files:

  • synfig-studio/src/gui/widgets/widget_gammapattern.cpp
  • synfig-studio/src/gui/widgets/widget_gammapattern.h

Please copy the text from #1793 , as it will be in all file headers. ;)

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

I think this PR should be closed and instead implement new glade files with this issue #777

Because the current dialog implementation looks too biggish with too many widgets packed together in one dialog window
Screenshot from 2020-10-31 09-33-40

@rodolforg

Copy link
Copy Markdown
Contributor

Maybe it's just a matter of limiting char length for entry widgets?

@ice0

ice0 commented Nov 1, 2020

Copy link
Copy Markdown
Collaborator

@Keyikedalube I think it might be better to merge this PR and continue on top of these changes?

The only reason why it still not merged - is because I need to check is all whose signals is really required, or we can do without them.

	entry_width ->signal_value_changed().connect(sigc::mem_fun(*this, &CanvasProperties::on_width_changed));
	entry_height->signal_value_changed().connect(sigc::mem_fun(*this, &CanvasProperties::on_height_changed));
	entry_xres  ->signal_value_changed().connect(sigc::mem_fun(*this, &CanvasProperties::on_xres_changed));

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

Don't merge yet. I'm still testing rodolforg's suggestion...

@Keyikedalube

Keyikedalube commented Nov 1, 2020 •

Copy link
Copy Markdown
Contributor Author

Maybe it's just a matter of limiting char length for entry widgets?

Left width/height untouched because there's no way we can know what user resolution preferences might be.
Could be big or small.

  • Not maximized
    Screenshot from 2020-11-01 15-02-48

  • Maximized
    Screenshot from 2020-11-01 15-02-54

Using width chars breaks the UI when dialog is maximized. Look at X/YRes and Physical ....
The latter sticks to width size specified but not the former.

Using expand CENTER property is not a good alternative because if a user enters larger number maybe he wants to work at 16K resolution, he might resize the dialog window to make the widget's length bigger.
In that case, he'll notice Physical Width/Height is broken and report it as a UI bug.

@Keyikedalube

Keyikedalube commented Nov 1, 2020 •

Copy link
Copy Markdown
Contributor Author

I think it might be better to merge this PR and continue on top of these changes?

@ice0 I'm thinking merging and working on top of these changes is inefficient now.

  • I've implemented CSS in synfig-studio/src/gui/resources/css folder
  • This PR uses old synfig-studio/ui folder

@rodolforg has plans to migrate those UI contents to resources folder like CSS

So if someone contributes to issue #777 he has to migrate UI stuff and strip down my glade files for each dialog. Too much work.
Instead, we could first

  1. Migrate the old synfig-studio/ui folder to synfig-studio/src/gui/resources/ui
  2. Then implement new ones in one go for the above issue. Thus, saving more time for all of us :)

And keep git history changes clean.
More efficient, right?

I'm absolutely positive this PR needs to be closed and instead implement new glade files from scratch.

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

Closed in favor of #777

Read above comments for reason

@rodolforg

Copy link
Copy Markdown
Contributor

Maybe it's just a matter of limiting char length for entry widgets?

Left width/height untouched because there's no way we can know what user resolution preferences might be.
Could be big or small.

* Not maximized
  ![Screenshot from 2020-11-01 15-02-48](https://user-images.githubusercontent.com/24214509/97799568-fcdb6780-1c54-11eb-8abe-b245a014d102.png)

* Maximized
  ![Screenshot from 2020-11-01 15-02-54](https://user-images.githubusercontent.com/24214509/97799607-2e543300-1c55-11eb-99ee-631846cfc453.png)

Using width chars breaks the UI when dialog is maximized. Look at X/YRes and Physical ....
The latter sticks to width size specified but not the former.

Using expand CENTER property is not a good alternative because if a user enters larger number maybe he wants to work at 16K resolution, he might resize the dialog window to make the widget's length bigger.
In that case, he'll notice Physical Width/Height is broken and report it as a UI bug.

Well, we don't need to let the internal grid expands together with window maximization. We don't have to let it be maximized at all :)

@Keyikedalube

Copy link
Copy Markdown
Contributor Author

@rodolforg I proposed a new re-ordered layout for Image tab over here 👉🏽 #777 (comment). Also, proposed removal of Image Area tab in the next comment and how those widgets values can be handled internally based on Image width and height values so users don't have to get frustrated with more canvas tweaking.

I'd love your suggestions :)

If the new proposal is agreed then it'd be easier for me to rebase this PR and resubmit again under a new branch name LOL.

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