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

Support root property updates for JS #115

Merged
merged 4 commits into from
Jun 25, 2022
Merged

Support root property updates for JS #115

merged 4 commits into from
Jun 25, 2022

Conversation

sonnyp
Copy link
Contributor

@sonnyp sonnyp commented Jun 12, 2022

Fixes #60

Needs the Vala equivalent and ready to go (as far as I can tell)

}
adoptChild(object_preview, object_root);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

since child and content are properties, and we now update all properties, we don't need this anymore

title: "My App";
description: "My App is awesome";
vexpand: true;
icon-name: "applications-science-symbolic";
Copy link
Contributor Author

@sonnyp sonnyp Jun 12, 2022

Choose a reason for hiding this comment

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

I prefer using a "standard" icon for this demo

@@ -1,47 +1,39 @@
using Gtk 4.0;
using Adw 1;

Adw.ApplicationWindow window {
Gtk.ApplicationWindow window {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

no reason to use Adw.Window / Adw.ApplicationWindow if we don't want a freeform window

icon-name: "open-menu-symbolic";
primary: true;
}
title: "My App";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

updating a root property, such as title now works as expected

primary: true;
}
title: "My App";
titlebar: Gtk.HeaderBar {
Copy link
Contributor Author

@sonnyp sonnyp Jun 12, 2022

Choose a reason for hiding this comment

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

same for widget properties of course, try removing it for example

@sonnyp sonnyp requested a review from lw64 June 12, 2022 20:24
@sonnyp
Copy link
Contributor Author

sonnyp commented Jun 12, 2022

@lw64 could you test/review this and once satisfied—implement the same algorithm on the Vala side in this branch ?

@lw64

This comment was marked as resolved.

Copy link
Contributor

@lw64 lw64 left a comment

Choose a reason for hiding this comment

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

Seems all good to me.

@sonnyp sonnyp marked this pull request as ready for review June 25, 2022 07:33
@sonnyp sonnyp changed the title Support root property updates Support root property updates for JS Jun 25, 2022
@sonnyp sonnyp mentioned this pull request Jun 25, 2022
2 tasks
@sonnyp sonnyp merged commit 1f45363 into main Jun 25, 2022
@sonnyp sonnyp deleted the root-properties branch June 25, 2022 07:39
@sonnyp sonnyp mentioned this pull request Jun 26, 2022
2 tasks
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.

Preview root object property changes
2 participants