mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
tests: Test XML outputs
Load the outputs of the tests in Gtk.Builder and make sure they work. Some of them don't and need to be fixed. Others will require a bit more work to set up callbacks, templates, etc.
This commit is contained in:
parent
219891584c
commit
8758bac40a
7 changed files with 46 additions and 24 deletions
|
@ -1,6 +1,6 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
template MyDialog : Dialog {
|
||||
Dialog {
|
||||
[action response=cancel]
|
||||
Button cancel_button {
|
||||
label: _("Cancel");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<template class="MyDialog" parent="GtkDialog">
|
||||
<object class="GtkDialog">
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="cancel_button">
|
||||
<property name="label" translatable="true">Cancel</property>
|
||||
|
@ -22,7 +22,7 @@
|
|||
<action-widget response="9">custom_response_button</action-widget>
|
||||
<action-widget response="ok" default="True">ok_button</action-widget>
|
||||
</action-widgets>
|
||||
</template>
|
||||
</object>
|
||||
<object class="GtkInfoBar">
|
||||
<child type="action">
|
||||
<object class="GtkButton" id="ok_info_button">
|
||||
|
|
|
@ -2,6 +2,7 @@ using Gtk 4.0;
|
|||
|
||||
Gtk.Label {
|
||||
xalign: .5;
|
||||
margin-end: 1_000_000;
|
||||
height-request: 1_000_000;
|
||||
margin-top: 0x30;
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="margin-end">1000000</property>
|
||||
<property name="height-request">1000000</property>
|
||||
<property name="margin-top">48</property>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
template TestTemplate : Label {
|
||||
test-property: Button {
|
||||
label: "Hello, world!";
|
||||
Range {
|
||||
adjustment: Adjustment {
|
||||
lower: 10;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<template class="TestTemplate" parent="GtkLabel">
|
||||
<property name="test-property">
|
||||
<object class="GtkButton">
|
||||
<property name="label">Hello, world!</property>
|
||||
<object class="GtkRange">
|
||||
<property name="adjustment">
|
||||
<object class="GtkAdjustment">
|
||||
<property name="lower">10</property>
|
||||
</object>
|
||||
</property>
|
||||
</template>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue