mirror of
https://github.com/libratbag/piper.git
synced 2026-04-24 00:09:08 -04:00
The welcome and error screens both require a different "perspective" into Piper, while being in the same window. For this reason, we introduce a titlebar and a regular stack and the concept of a "perspective", which is defined as a certain view into Piper. A perspective needs to implement an interface of sorts of two methods: one to retrieve its string name, and another to retrieve its widget titlebar. Different scenarios can then show different perspectives, that have full control over the main widget and the titlebar displayed. This commit introduces the MousePerspective, which is a perspective showing the mouse configuration. Future commits will add an ErrorPerspective and a WelcomePerspective, and even further into the future we can add a KeyboardPerspective as well.
31 lines
1017 B
XML
31 lines
1017 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- Generated with glade 3.20.0 -->
|
|
<interface>
|
|
<requires lib="gtk+" version="3.20"/>
|
|
<template class="Window" parent="GtkApplicationWindow">
|
|
<property name="can_focus">False</property>
|
|
<child>
|
|
<object class="GtkStack" id="stack_perspectives">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="transition_duration">300</property>
|
|
<property name="transition_type">crossfade</property>
|
|
<child>
|
|
<placeholder/>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child type="titlebar">
|
|
<object class="GtkStack" id="stack_titlebar">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="hhomogeneous">False</property>
|
|
<property name="vhomogeneous">False</property>
|
|
<child>
|
|
<placeholder/>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
</interface>
|