[gnome-taquin] Reorder the headerbar.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-taquin] Reorder the headerbar.
- Date: Mon, 21 Jan 2019 06:12:39 +0000 (UTC)
commit 076b51c34feeedec5a7ed35c66a37bd302a2ad0a
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Jan 19 06:25:41 2019 +0100
Reorder the headerbar.
The 'undo' button should evolve as a menu
entry in an history popover, with a moves
count, game's history, a 'restart' entry.
data/game-headerbar.ui | 11 ++++-------
src/game-headerbar.vala | 10 +++++-----
2 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/data/game-headerbar.ui b/data/game-headerbar.ui
index b916eaa..a0b1673 100644
--- a/data/game-headerbar.ui
+++ b/data/game-headerbar.ui
@@ -24,6 +24,10 @@
<property name="visible">False</property>
<property name="orientation">horizontal</property>
</object>
+ <packing>
+ <property name="pack-type">end</property>
+ <property name="position">5</property>
+ </packing>
</child>
<child>
<object class="GtkButton" id="back_button">
@@ -43,10 +47,6 @@
</object>
</child>
</object>
- <packing>
- <property name="pack-type">start</property>
- <property name="position">1</property>
- </packing>
</child>
<child>
<object class="GtkButton" id="new_game_button">
@@ -60,9 +60,6 @@
<!-- Translators: during a game, tooltip text of the Start Over button -->
<property name="tooltip-text" translatable="yes">Start a new game</property>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
</template>
</interface>
diff --git a/src/game-headerbar.vala b/src/game-headerbar.vala
index b3e3488..8d2ef38 100644
--- a/src/game-headerbar.vala
+++ b/src/game-headerbar.vala
@@ -90,7 +90,7 @@ private class GameHeaderBar : BaseHeaderBar
* * adaptative stuff
\*/
- private bool is_quite_thin = true;
+ private bool is_extra_thin = true;
protected override void set_window_size (AdaptativeWidget.WindowSize new_size)
{
base.set_window_size (new_size);
@@ -98,17 +98,17 @@ private class GameHeaderBar : BaseHeaderBar
if (!window_has_name)
return;
- bool _is_quite_thin = AdaptativeWidget.WindowSize.is_quite_thin (new_size);
- if (_is_quite_thin == is_quite_thin)
+ bool _is_extra_thin = AdaptativeWidget.WindowSize.is_extra_thin (new_size);
+ if (_is_extra_thin == is_extra_thin)
return;
- is_quite_thin = _is_quite_thin;
+ is_extra_thin = _is_extra_thin;
set_default_widgets_default_states (this);
}
protected override void set_default_widgets_default_states (BaseHeaderBar _this)
{
string? headerbar_label_text;
- if (((GameHeaderBar) _this).is_quite_thin)
+ if (((GameHeaderBar) _this).is_extra_thin)
headerbar_label_text = null;
else
headerbar_label_text = ((GameHeaderBar) _this).window_name;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]