[gnome-2048/arnaudb/wip/gtk4: 21/48] Adapt UI files.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-2048/arnaudb/wip/gtk4: 21/48] Adapt UI files.
- Date: Wed, 29 Jul 2020 15:38:29 +0000 (UTC)
commit 02b4e0e64cd25cc19b8f4b208e2a36e5211b913f
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue Apr 28 09:06:00 2020 +0200
Adapt UI files.
data/congrats.ui | 8 +-------
data/game-headerbar.ui | 36 ++++++++++--------------------------
data/help-overlay.ui | 13 +------------
data/mainwindow.ui | 25 ++++++++-----------------
4 files changed, 20 insertions(+), 62 deletions(-)
---
diff --git a/data/congrats.ui b/data/congrats.ui
index 9434c3e..6bd8fb5 100644
--- a/data/congrats.ui
+++ b/data/congrats.ui
@@ -16,7 +16,7 @@
along with GNOME 2048. If not, see <https://www.gnu.org/licenses/>.
-->
<interface>
- <requires lib="gtk+" version="3.12"/>
+ <requires lib="gtk+" version="3.98"/>
<object class="GtkMessageDialog" id="congratsdialog">
<property name="can-focus">False</property>
<!-- Translators: title of the dialog that appears (with default settings) when you reach 2048 -->
@@ -28,21 +28,16 @@
<object class="GtkBox">
<child>
<object class="GtkImage">
- <property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">64</property>
<property name="icon-name">face-wink</property>
<property name="icon-size">6</property>
</object>
- <packing>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
<child type="action">
<object class="GtkButton" id="new-game-button">
- <property name="visible">True</property>
<!-- Translators: button in the "Congratulations" dialog that appears (with default settings) when
you reach 2048 (with a mnemonic that appears pressing Alt)-->
<property name="label" translatable="yes">_New Game</property>
<property name="use-underline">True</property>
@@ -50,7 +45,6 @@
</child>
<child type="action">
<object class="GtkButton" id="continue-button">
- <property name="visible">True</property>
<!-- Translators: button in the "Congratulations" dialog that appears (with default settings) when
you reach 2048; the player can continue playing after reaching 2048 (with a mnemonic that appears pressing
Alt) -->
<property name="label" translatable="yes">_Keep Playing</property>
<property name="use-underline">True</property>
diff --git a/data/game-headerbar.ui b/data/game-headerbar.ui
index e01573a..54048bb 100644
--- a/data/game-headerbar.ui
+++ b/data/game-headerbar.ui
@@ -16,18 +16,16 @@
along with GNOME 2048. If not, see <https://www.gnu.org/licenses/>.
-->
<interface>
- <requires lib="gtk+" version="3.12"/>
+ <requires lib="gtk+" version="3.98"/>
<template class="GameHeaderBar" parent="GtkHeaderBar">
- <property name="visible">True</property>
<property name="can-focus">False</property>
<!-- Translators: title of the window, displayed in the headerbar -->
<property name="title" translatable="yes">GNOME 2048</property>
- <property name="show-close-button">True</property>
+ <property name="show-title-buttons">True</property>
<child>
<object class="GtkMenuButton" id="_new_game_button">
<!-- Translators: button in the headerbar (with a mnemonic that appears pressing Alt) -->
<property name="label" translatable="yes">_New Game</property>
- <property name="visible">True</property>
<property name="valign">center</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
@@ -35,36 +33,22 @@
<property name="focus-on-click">False</property>
</object>
</child>
- <child>
+ <child type="end">
+ <object class="GtkLabel" id="_score">
+ <property name="can-focus">False</property>
+ <property name="label">0</property>
+ </object>
+ </child>
+ <child type="end">
<object class="GtkMenuButton" id="_hamburger_button">
- <property name="visible">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="focus-on-click">False</property>
+ <property name="icon-name">open-menu-symbolic</property>
<style>
<class name="image-button"/>
</style>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="icon-name">open-menu-symbolic</property>
- <property name="icon-size">1</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="_score">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label">0</property>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
</template>
</interface>
diff --git a/data/help-overlay.ui b/data/help-overlay.ui
index c9c281a..4fd29a2 100644
--- a/data/help-overlay.ui
+++ b/data/help-overlay.ui
@@ -16,20 +16,17 @@
along with GNOME 2048. If not, see <https://www.gnu.org/licenses/>.
-->
<interface domain="gnome-2048">
- <requires lib="gtk+" version="3.12"/>
+ <requires lib="gtk+" version="3.98"/>
<object class="GtkShortcutsWindow" id="help_overlay">
<child>
<object class="GtkShortcutsSection">
- <property name="visible">True</property>
<property name="max-height">11</property>
<child>
<object class="GtkShortcutsGroup">
- <property name="visible">True</property>
<!-- Translators: header of the "Play with arrows" shortcut section -->
<property name="title" translatable="yes" context="shortcut window">Game</property>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">True</property>
<!-- Translators: the application has no help, so the use of arrows for playing is
documented here -->
<property name="title" translatable="yes" context="shortcut window">Play with
arrows</property>
<property name="accelerator">Left Up Right Down</property>
@@ -39,12 +36,10 @@
</child>
<child>
<object class="GtkShortcutsGroup">
- <property name="visible">True</property>
<!-- Translators: header of the "Choose a new game" and "Start a new game" shortcuts section -->
<property name="title" translatable="yes" context="shortcut window">New game</property>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">True</property>
<!-- Translators: shortcut that opens the New Game menu, allowing to choose the board size
of the next game -->
<property name="title" translatable="yes" context="shortcut window">Choose a new
game</property>
<property name="accelerator"><Primary>n</property>
@@ -52,7 +47,6 @@
</child>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">True</property>
<!-- Translators: shortcut that starts immediately a new game, with similar options -->
<property name="title" translatable="yes" context="shortcut window">Start a new
game</property>
<property name="accelerator"><Shift><Primary>n</property>
@@ -62,12 +56,10 @@
</child>
<child>
<object class="GtkShortcutsGroup">
- <property name="visible">True</property>
<!-- Translators: header of the "Toggle main menu," "Keyboard shortcuts," "About," and "Quit,"
shortcuts section -->
<property name="title" translatable="yes" context="shortcut window">Generic</property>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">True</property>
<!-- Translators: shortcut that toggles the hamburger menu -->
<property name="title" translatable="yes" context="shortcut window">Toggle main
menu</property>
<property name="accelerator">F10 Menu</property>
@@ -75,7 +67,6 @@
</child>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">True</property>
<!-- Translators: shortcut that opens Keyboard Shortcuts window -->
<property name="title" translatable="yes" context="shortcut window">Keyboard
shortcuts</property>
<property name="accelerator"><Primary>question <Primary>F1</property>
@@ -83,7 +74,6 @@
</child>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">True</property>
<!-- Translators: shortcut that opens About dialog -->
<property name="title" translatable="yes" context="shortcut window">About</property>
<property name="accelerator"><Shift>F1</property>
@@ -91,7 +81,6 @@
</child>
<child>
<object class="GtkShortcutsShortcut">
- <property name="visible">True</property>
<!-- Translators: shortcut that quits application -->
<property name="title" translatable="yes" context="shortcut window">Quit</property>
<property name="accelerator"><Primary>q</property>
diff --git a/data/mainwindow.ui b/data/mainwindow.ui
index a963710..1ca6229 100644
--- a/data/mainwindow.ui
+++ b/data/mainwindow.ui
@@ -16,7 +16,7 @@
along with GNOME 2048. If not, see <https://www.gnu.org/licenses/>.
-->
<interface>
- <requires lib="gtk+" version="3.12"/>
+ <requires lib="gtk+" version="3.98"/>
<template class="GameWindow" parent="GtkApplicationWindow">
<property name="can-focus">False</property>
<property name="window-position">center</property>
@@ -26,23 +26,17 @@
<property name="show-menubar">False</property>
<signal name="destroy" handler="on_destroy"/>
<child type="titlebar">
- <object class="GameHeaderBar" id="_header_bar">
- <property name="visible">True</property>
- </object>
+ <object class="GameHeaderBar" id="_header_bar"/>
</child>
<child>
<object class="GtkOverlay">
- <property name="visible">True</property>
<child>
<object class="GtkAspectFrame">
- <property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
- <object class="GtkClutterEmbed" id="_embed">
- <property name="visible">True</property>
- </object>
+ <object class="Board" id="_board"/>
</child>
</object>
</child>
@@ -52,19 +46,16 @@
<property name="halign">end</property>
<property name="valign">start</property>
<property name="action-name">ui.unfullscreen</property>
- <property name="margin">6</property>
+ <property name="icon-name">view-restore-symbolic</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
<style>
<class name="image-button"/>
<!-- class name="unfullscreen-button"/ -->
<class name="flat"/>
</style>
- <child>
- <object class="GtkImage">
- <property name="icon-name">view-restore-symbolic</property>
- <property name="visible">True</property>
- <property name="icon-size">1</property>
- </object>
- </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]