Commit 076b51c3 authored by Arnaud Bonatti's avatar Arnaud Bonatti

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.
parent e0cb2833
......@@ -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>
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment