... | ... | @@ -69,7 +69,11 @@ After importing libhandy into the project, replace [`GtkStackSwitcher`](https:// |
|
|
|
|
|
Set the [policy](https://gnome.pages.gitlab.gnome.org/libhandy/HdyViewSwitcher.html#HdyViewSwitcher--policy) to [`wide`](https://gnome.pages.gitlab.gnome.org/libhandy/HdyViewSwitcher.html#HdyViewSwitcherPolicy):
|
|
|
```xml
|
|
|
<property name="policy">wide</property>
|
|
|
<object class="HdyViewSwitcher">
|
|
|
<property name="visible">True</property>
|
|
|
<property name="stack">stack</property>
|
|
|
<property name="policy">wide</property>
|
|
|
</object>
|
|
|
```
|
|
|
|
|
|
```c
|
... | ... | @@ -83,10 +87,17 @@ While [`HdyViewSwitcher`](https://gnome.pages.gitlab.gnome.org/libhandy/HdyViewS |
|
|
For every page in the [`GtkStack`](https://developer.gnome.org/gtk3/stable/GtkStack.html), set an icon using the [`icon-name`](https://developer.gnome.org/gtk3/stable/GtkStack.html#GtkStack--c-icon-name) child property:
|
|
|
|
|
|
```xml
|
|
|
<packing>
|
|
|
<property name="title">Example</property>
|
|
|
<property name="icon-name">face-smile-symbolic</property>
|
|
|
</packing>
|
|
|
<object class="GtkStack">
|
|
|
<child>
|
|
|
<object class="...">
|
|
|
...
|
|
|
</object>
|
|
|
<packing>
|
|
|
<property name="title">Example</property>
|
|
|
<property name="icon-name">face-smile-symbolic</property>
|
|
|
</packing>
|
|
|
</child>
|
|
|
</object>
|
|
|
```
|
|
|
|
|
|
```c
|
... | ... | @@ -102,7 +113,11 @@ The recommended transition type to use with [`HdyViewSwitcher`](https://gnome.pa |
|
|
It can be achieved by setting the [`transition-type`](https://developer.gnome.org/gtk3/stable/GtkStack.html#GtkStack--transition-type) property to [`GTK_STACK_TRANSITION_TYPE_CROSSFADE`](https://developer.gnome.org/gtk3/stable/GtkStack.html#GtkStackTransitionType):
|
|
|
|
|
|
```xml
|
|
|
<property name="transition-type">crossfade</property>
|
|
|
<object class="GtkStack" id="stack">
|
|
|
<property name=visible">True</property>
|
|
|
<property name="transition-type">crossfade</property>
|
|
|
...
|
|
|
</object>
|
|
|
```
|
|
|
|
|
|
```c
|
... | ... | |