mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Compare commits
5 commits
404ae76787
...
a4e0c3701b
Author | SHA1 | Date | |
---|---|---|---|
|
a4e0c3701b | ||
|
c1fbcef6d0 | ||
|
e07da3c339 | ||
|
2ae41020ab | ||
|
f48b840cfa |
3 changed files with 5 additions and 5 deletions
|
@ -225,12 +225,12 @@ class Flag(AstNode):
|
|||
return self.tokens["value"]
|
||||
|
||||
@property
|
||||
def value(self) -> T.Optional[int]:
|
||||
def value(self) -> T.Optional[str]:
|
||||
type = self.context[ValueTypeCtx].value_type
|
||||
if not isinstance(type, Enumeration):
|
||||
return None
|
||||
elif member := type.members.get(self.name):
|
||||
return member.value
|
||||
return member.nick
|
||||
else:
|
||||
return None
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ Blueprint is a markup language and compiler for GTK 4 user interfaces.
|
|||
|
||||
using Gtk 4.0;
|
||||
|
||||
template MyAppWindow : ApplicationWindow {
|
||||
template $MyAppWindow: ApplicationWindow {
|
||||
default-width: 600;
|
||||
default-height: 300;
|
||||
title: _("Hello, Blueprint!");
|
||||
|
@ -35,7 +35,7 @@ Blueprint is a markup language and compiler for GTK 4 user interfaces.
|
|||
HeaderBar {}
|
||||
|
||||
Label {
|
||||
label: bind MyAppWindow.main_text;
|
||||
label: bind template.main_text;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ corresponding .blp file and regenerate this file with blueprint-compiler.
|
|||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GApplication">
|
||||
<property name="flags">1|4</property>
|
||||
<property name="flags">is-service|handles-open</property>
|
||||
</object>
|
||||
<object class="GtkEventControllerScroll">
|
||||
<property name="flags">1</property>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue