mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Change template syntax
Templates now use a TypeName instead of an identifier, which makes it clearer that it's an extern symbol (or that it's a Gtk.ListItem).
This commit is contained in:
parent
aebf8be278
commit
04509e4b2e
31 changed files with 175 additions and 55 deletions
|
@ -1,10 +1,10 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
template TestTemplate : ApplicationWindow {
|
||||
template $TestTemplate : ApplicationWindow {
|
||||
test-property: "Hello, world";
|
||||
test-signal => $on_test_signal();
|
||||
}
|
||||
|
||||
Dialog {
|
||||
transient-for: TestTemplate;
|
||||
transient-for: template;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
template MyTemplate : Box {
|
||||
prop1: bind MyTemplate.prop2 as <$MyObject>.prop3;
|
||||
template $MyTemplate : Box {
|
||||
prop1: bind template.prop2 as <$MyObject>.prop3;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
template MyTemplate : $MyParentClass {
|
||||
prop1: bind MyTemplate.prop2 as <$MyObject>.prop3;
|
||||
template $MyTemplate : $MyParentClass {
|
||||
prop1: bind template.prop2 as <$MyObject>.prop3;
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
template GtkListItem {}
|
||||
template Gtk.ListItem {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue