window.ui 8.22 KB
Newer Older
Vivien Kraus's avatar
Vivien Kraus committed
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!-- tarot implements the rules of the tarot game
3
Copyright (C) 2017, 2018, 2019, 2020  Vivien Kraus
Vivien Kraus's avatar
Vivien Kraus committed
4

5
This program is free software: you can redistribute it and/or modify
Vivien Kraus's avatar
Vivien Kraus committed
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, version 3 of the License.
Vivien Kraus's avatar
Vivien Kraus committed
8

9
10
11
12
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.
Vivien Kraus's avatar
Vivien Kraus committed
13
14

You should have received a copy of the GNU General Public License
15
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Vivien Kraus's avatar
Vivien Kraus committed
16
-->
Vivien Kraus's avatar
Vivien Kraus committed
17
18
<interface>
  <requires lib="gtk+" version="3.20"/>
Vivien Kraus's avatar
Vivien Kraus committed
19
20
21
22
23
  <object class="GtkImage" id="image1">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="icon_name">open-menu-symbolic</property>
  </object>
Vivien Kraus's avatar
Vivien Kraus committed
24
25
  <template class="TarotWindow" parent="GtkApplicationWindow">
    <property name="can_focus">False</property>
26
27
    <property name="default_width">300</property>
    <property name="default_height">600</property>
Vivien Kraus's avatar
Vivien Kraus committed
28
    <property name="icon_name">eu.planete_kraus.Tarot</property>
Vivien Kraus's avatar
Vivien Kraus committed
29
    <child type="titlebar">
Vivien Kraus's avatar
Vivien Kraus committed
30
      <object class="GtkHeaderBar">
Vivien Kraus's avatar
Vivien Kraus committed
31
32
        <property name="visible">True</property>
        <property name="can_focus">False</property>
Vivien Kraus's avatar
Vivien Kraus committed
33
        <property name="title" translatable="yes">Tarot</property>
Vivien Kraus's avatar
Vivien Kraus committed
34
        <property name="show_close_button">True</property>
35
36
37
38
39
40
41
42
43
44
45
        <child>
          <object class="GtkButton" id="button_new_game">
            <property name="label">gtk-new</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="use_stock">True</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="show_new_game_page" swapped="no"/>
          </object>
        </child>
Vivien Kraus's avatar
Vivien Kraus committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
        <child>
          <object class="GtkButton" id="menu_button">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="image">image1</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="show_menu_popover" swapped="no"/>
          </object>
          <packing>
            <property name="pack_type">end</property>
            <property name="position">1</property>
          </packing>
        </child>
Vivien Kraus's avatar
Vivien Kraus committed
60
61
62
      </object>
    </child>
    <child>
63
      <object class="GtkStack" id="pages">
Vivien Kraus's avatar
Vivien Kraus committed
64
65
        <property name="visible">True</property>
        <property name="can_focus">False</property>
66
67
68
69
70
71
72
73
74
75
76
77
        <property name="transition_type">slide-up-down</property>
        <child>
          <object class="TarotWidget" id="tarot_widget">
            <property name="visible">True</property>
            <property name="can_focus">False</property>
          </object>
          <packing>
            <property name="name">page0</property>
            <property name="title" translatable="yes">page0</property>
          </packing>
        </child>
        <child>
Vivien Kraus's avatar
Vivien Kraus committed
78
          <object class="GtkListBox" id="page_select_players">
79
80
            <property name="visible">True</property>
            <property name="can_focus">False</property>
Vivien Kraus's avatar
Vivien Kraus committed
81
82
            <property name="valign">center</property>
            <property name="selection_mode">none</property>
83
            <child>
Vivien Kraus's avatar
Vivien Kraus committed
84
85
86
              <object class="GtkListBoxRow">
                <property name="width_request">100</property>
                <property name="height_request">80</property>
87
                <property name="visible">True</property>
Vivien Kraus's avatar
Vivien Kraus committed
88
89
                <property name="can_focus">True</property>
                <property name="selectable">False</property>
90
                <child>
Vivien Kraus's avatar
Vivien Kraus committed
91
                  <object class="GtkButton">
92
93
94
95
                    <property name="label" translatable="yes">3 players</property>
                    <property name="visible">True</property>
                    <property name="can_focus">True</property>
                    <property name="receives_default">True</property>
Vivien Kraus's avatar
Vivien Kraus committed
96
                    <property name="relief">none</property>
97
                    <signal name="clicked" handler="new_game_3p" swapped="no"/>
Vivien Kraus's avatar
Vivien Kraus committed
98
99
100
                    <style>
                      <class name="button_variant"/>
                    </style>
101
102
                  </object>
                </child>
Vivien Kraus's avatar
Vivien Kraus committed
103
104
105
106
107
108
109
110
111
112
              </object>
            </child>
            <child>
              <object class="GtkListBoxRow">
                <property name="width_request">100</property>
                <property name="height_request">80</property>
                <property name="visible">True</property>
                <property name="can_focus">True</property>
                <property name="selectable">False</property>
                <signal name="activate" handler="new_game_4p" swapped="no"/>
113
                <child>
Vivien Kraus's avatar
Vivien Kraus committed
114
                  <object class="GtkButton">
115
116
117
118
                    <property name="label" translatable="yes">4 players</property>
                    <property name="visible">True</property>
                    <property name="can_focus">True</property>
                    <property name="receives_default">True</property>
Vivien Kraus's avatar
Vivien Kraus committed
119
                    <property name="relief">none</property>
120
                    <signal name="clicked" handler="new_game_4p" swapped="no"/>
Vivien Kraus's avatar
Vivien Kraus committed
121
122
123
124
                    <style>
                      <class name="button_variant"/>
                      <class name="best_variant"/>
                    </style>
125
126
127
128
129
                  </object>
                </child>
              </object>
            </child>
            <child>
Vivien Kraus's avatar
Vivien Kraus committed
130
131
132
              <object class="GtkListBoxRow">
                <property name="width_request">100</property>
                <property name="height_request">80</property>
133
                <property name="visible">True</property>
Vivien Kraus's avatar
Vivien Kraus committed
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
                <property name="can_focus">True</property>
                <property name="selectable">False</property>
                <child>
                  <object class="GtkButton">
                    <property name="label" translatable="yes">5 players</property>
                    <property name="visible">True</property>
                    <property name="can_focus">True</property>
                    <property name="receives_default">True</property>
                    <property name="relief">none</property>
                    <signal name="clicked" handler="new_game_5p" swapped="no"/>
                    <style>
                      <class name="button_variant"/>
                    </style>
                  </object>
                </child>
149
150
151
152
153
154
155
              </object>
            </child>
          </object>
          <packing>
            <property name="position">1</property>
          </packing>
        </child>
Vivien Kraus's avatar
Vivien Kraus committed
156
157
158
      </object>
    </child>
  </template>
Vivien Kraus's avatar
Vivien Kraus committed
159
160
161
162
  <object class="GtkPopoverMenu" id="menu_popover">
    <property name="can_focus">False</property>
    <property name="relative_to">menu_button</property>
    <child>
163
      <object class="GtkBox">
Vivien Kraus's avatar
Vivien Kraus committed
164
        <property name="visible">True</property>
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
        <property name="can_focus">False</property>
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkButton" id="button_about">
            <property name="label">gtk-dialog-info</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="relief">none</property>
            <property name="use_stock">True</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="open_info_dialog" swapped="no"/>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">0</property>
          </packing>
        </child>
Vivien Kraus's avatar
Vivien Kraus committed
184
185
186
      </object>
      <packing>
        <property name="submenu">main</property>
187
        <property name="position">1</property>
Vivien Kraus's avatar
Vivien Kraus committed
188
189
190
      </packing>
    </child>
  </object>
Vivien Kraus's avatar
Vivien Kraus committed
191
</interface>