[libadwaita/wip/exalm/demo: 5/5] demo: Stop manually adding GtkViewport
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/demo: 5/5] demo: Stop manually adding GtkViewport
- Date: Tue, 2 Aug 2022 05:24:24 +0000 (UTC)
commit e285224adc289f862d77b33781ed89d72ca23ffa
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Aug 2 09:22:38 2022 +0400
demo: Stop manually adding GtkViewport
scroll-to-focus is now TRUE by default.
demo/pages/animations/adw-demo-page-animations.ui | 599 +++++++++++-----------
demo/pages/avatar/adw-demo-page-avatar.ui | 251 +++++----
demo/pages/styles/adw-style-demo-window.ui | 95 ++--
doc/tools/data/adaptive-split-headers-narrow-1.ui | 49 +-
doc/tools/data/adaptive-split-headers-narrow-2.ui | 49 +-
doc/tools/data/adaptive-split-headers-wide.ui | 49 +-
src/adw-preferences-page.ui | 11 +-
src/adw-status-page.ui | 119 ++---
8 files changed, 591 insertions(+), 631 deletions(-)
---
diff --git a/demo/pages/animations/adw-demo-page-animations.ui
b/demo/pages/animations/adw-demo-page-animations.ui
index 4ed71e7c..6e66f44e 100644
--- a/demo/pages/animations/adw-demo-page-animations.ui
+++ b/demo/pages/animations/adw-demo-page-animations.ui
@@ -7,370 +7,365 @@
<object class="GtkScrolledWindow">
<property name="hscrollbar-policy">never</property>
<property name="child">
- <object class="GtkViewport">
- <property name="scroll-to-focus">True</property>
- <property name="child">
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="valign">center</property>
+ <style>
+ <class name="timed-animation-page"/>
+ </style>
+ <child>
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="valign">center</property>
- <style>
- <class name="timed-animation-page"/>
- </style>
<child>
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <child>
- <object class="AdwClamp">
- <property name="maximum-size">400</property>
- <property name="tightening-threshold">300</property>
+ <object class="AdwClamp">
+ <property name="maximum-size">400</property>
+ <property name="tightening-threshold">300</property>
+ <property name="child">
+ <object class="AdwBin" id="timed_animation_sample">
+ <property name="margin-bottom">36</property>
<property name="child">
- <object class="AdwBin" id="timed_animation_sample">
- <property name="margin-bottom">36</property>
- <property name="child">
- <object class="AdwBin" id="timed_animation_widget">
- <property name="halign">center</property>
- <property name="valign">center</property>
- <property name="name">animation-sample</property>
- </object>
- </property>
+ <object class="AdwBin" id="timed_animation_widget">
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="name">animation-sample</property>
</object>
</property>
</object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Animations</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <property name="justify">center</property>
- <style>
- <class name="title"/>
- <class name="title-1"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Simple transitions.</property>
- <property name="justify">center</property>
- <property name="use_markup">true</property>
- <property name="wrap">True</property>
- <style>
- <class name="body"/>
- <class name="description"/>
- </style>
- </object>
- </child>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Animations</property>
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
+ <property name="justify">center</property>
+ <style>
+ <class name="title"/>
+ <class name="title-1"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Simple transitions.</property>
+ <property name="justify">center</property>
+ <property name="use_markup">true</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="body"/>
+ <class name="description"/>
+ </style>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="timed_animation_button_box">
+ <property name="valign">center</property>
+ <property name="halign">center</property>
+ <property name="margin-top">30</property>
+ <property name="margin-bottom">30</property>
+ <property name="spacing">18</property>
<child>
- <object class="GtkBox" id="timed_animation_button_box">
+ <object class="GtkButton">
+ <property name="icon-name">media-skip-backward-symbolic</property>
<property name="valign">center</property>
- <property name="halign">center</property>
- <property name="margin-top">30</property>
- <property name="margin-bottom">30</property>
- <property name="spacing">18</property>
- <child>
- <object class="GtkButton">
- <property name="icon-name">media-skip-backward-symbolic</property>
- <property name="valign">center</property>
- <binding name="sensitive">
- <closure type="gboolean" function="timed_animation_can_reset">
- <lookup name="state" type="AdwAnimation">
- <lookup name="timed-animation">AdwDemoPageAnimations</lookup>
- </lookup>
- <lookup name="state" type="AdwAnimation">
- <lookup name="spring-animation">AdwDemoPageAnimations</lookup>
- </lookup>
- </closure>
- </binding>
- <signal name="clicked" handler="timed_animation_reset" swapped="true"/>
- <style>
- <class name="circular"/>
- <class name="flat"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkButton">
- <binding name="icon-name">
- <closure type="gchararray" function="get_play_pause_icon_name">
- <lookup name="state" type="AdwAnimation">
- <lookup name="timed-animation">AdwDemoPageAnimations</lookup>
- </lookup>
- <lookup name="state" type="AdwAnimation">
- <lookup name="spring-animation">AdwDemoPageAnimations</lookup>
- </lookup>
- </closure>
- </binding>
- <property name="width-request">48</property>
- <property name="height-request">48</property>
- <signal name="clicked" handler="timed_animation_play_pause" swapped="true"/>
- <style>
- <class name="circular"/>
- <class name="suggested-action"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkButton">
- <property name="icon-name">media-skip-forward-symbolic</property>
- <property name="valign">center</property>
- <binding name="sensitive">
- <closure type="gboolean" function="timed_animation_can_skip">
- <lookup name="state" type="AdwAnimation">
- <lookup name="timed-animation">AdwDemoPageAnimations</lookup>
- </lookup>
- <lookup name="state" type="AdwAnimation">
- <lookup name="spring-animation">AdwDemoPageAnimations</lookup>
- </lookup>
- </closure>
- </binding>
- <signal name="clicked" handler="timed_animation_skip" swapped="true"/>
- <style>
- <class name="circular"/>
- <class name="flat"/>
- </style>
- </object>
- </child>
+ <binding name="sensitive">
+ <closure type="gboolean" function="timed_animation_can_reset">
+ <lookup name="state" type="AdwAnimation">
+ <lookup name="timed-animation">AdwDemoPageAnimations</lookup>
+ </lookup>
+ <lookup name="state" type="AdwAnimation">
+ <lookup name="spring-animation">AdwDemoPageAnimations</lookup>
+ </lookup>
+ </closure>
+ </binding>
+ <signal name="clicked" handler="timed_animation_reset" swapped="true"/>
+ <style>
+ <class name="circular"/>
+ <class name="flat"/>
+ </style>
</object>
</child>
<child>
- <object class="AdwPreferencesGroup">
- <child>
- <object class="GtkStackSwitcher">
- <property name="stack">animation_preferences_stack</property>
- <property name="margin-bottom">32</property>
- <property name="halign">center</property>
- </object>
- </child>
+ <object class="GtkButton">
+ <binding name="icon-name">
+ <closure type="gchararray" function="get_play_pause_icon_name">
+ <lookup name="state" type="AdwAnimation">
+ <lookup name="timed-animation">AdwDemoPageAnimations</lookup>
+ </lookup>
+ <lookup name="state" type="AdwAnimation">
+ <lookup name="spring-animation">AdwDemoPageAnimations</lookup>
+ </lookup>
+ </closure>
+ </binding>
+ <property name="width-request">48</property>
+ <property name="height-request">48</property>
+ <signal name="clicked" handler="timed_animation_play_pause" swapped="true"/>
+ <style>
+ <class name="circular"/>
+ <class name="suggested-action"/>
+ </style>
</object>
</child>
<child>
- <object class="AdwClamp">
- <property name="maximum-size">400</property>
- <property name="tightening-threshold">300</property>
- <property name="child">
- <object class="GtkStack" id="animation_preferences_stack">
- <signal name="notify::visible-child-name" handler="timed_animation_reset"
swapped="true"/>
- <child>
- <object class="GtkStackPage">
- <property name="title" translatable="yes">Timed</property>
- <property name="name">Timed</property>
- <property name="child">
- <object class="AdwPreferencesGroup">
- <child>
- <object class="AdwComboRow" id="timed_animation_easing">
- <property name="title" translatable="yes">Easing</property>
- <property name="model">
- <object class="AdwEnumListModel">
- <property name="enum-type">AdwEasing</property>
- </object>
- </property>
- <property name="expression">
- <closure type="gchararray" function="animations_easing_name"/>
- </property>
+ <object class="GtkButton">
+ <property name="icon-name">media-skip-forward-symbolic</property>
+ <property name="valign">center</property>
+ <binding name="sensitive">
+ <closure type="gboolean" function="timed_animation_can_skip">
+ <lookup name="state" type="AdwAnimation">
+ <lookup name="timed-animation">AdwDemoPageAnimations</lookup>
+ </lookup>
+ <lookup name="state" type="AdwAnimation">
+ <lookup name="spring-animation">AdwDemoPageAnimations</lookup>
+ </lookup>
+ </closure>
+ </binding>
+ <signal name="clicked" handler="timed_animation_skip" swapped="true"/>
+ <style>
+ <class name="circular"/>
+ <class name="flat"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwPreferencesGroup">
+ <child>
+ <object class="GtkStackSwitcher">
+ <property name="stack">animation_preferences_stack</property>
+ <property name="margin-bottom">32</property>
+ <property name="halign">center</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwClamp">
+ <property name="maximum-size">400</property>
+ <property name="tightening-threshold">300</property>
+ <property name="child">
+ <object class="GtkStack" id="animation_preferences_stack">
+ <signal name="notify::visible-child-name" handler="timed_animation_reset"
swapped="true"/>
+ <child>
+ <object class="GtkStackPage">
+ <property name="title" translatable="yes">Timed</property>
+ <property name="name">Timed</property>
+ <property name="child">
+ <object class="AdwPreferencesGroup">
+ <child>
+ <object class="AdwComboRow" id="timed_animation_easing">
+ <property name="title" translatable="yes">Easing</property>
+ <property name="model">
+ <object class="AdwEnumListModel">
+ <property name="enum-type">AdwEasing</property>
</object>
- </child>
+ </property>
+ <property name="expression">
+ <closure type="gchararray" function="animations_easing_name"/>
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Duration</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Duration</property>
- <child>
- <object class="GtkSpinButton" id="timed_animation_duration">
- <property name="valign">center</property>
- <property name="numeric">True</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="lower">100</property>
- <property name="upper">4000</property>
- <property name="value">500</property>
- <property name="page-increment">100</property>
- <property name="step-increment">50</property>
- </object>
- </property>
+ <object class="GtkSpinButton" id="timed_animation_duration">
+ <property name="valign">center</property>
+ <property name="numeric">True</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="lower">100</property>
+ <property name="upper">4000</property>
+ <property name="value">500</property>
+ <property name="page-increment">100</property>
+ <property name="step-increment">50</property>
</object>
- </child>
+ </property>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Repeat Count</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Repeat Count</property>
- <child>
- <object class="GtkSpinButton" id="timed_animation_repeat_count">
- <property name="valign">center</property>
- <property name="numeric">True</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="lower">0</property>
- <property name="upper">10</property>
- <property name="value">1</property>
- <property name="page-increment">1</property>
- <property name="step-increment">1</property>
- </object>
- </property>
+ <object class="GtkSpinButton" id="timed_animation_repeat_count">
+ <property name="valign">center</property>
+ <property name="numeric">True</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="lower">0</property>
+ <property name="upper">10</property>
+ <property name="value">1</property>
+ <property name="page-increment">1</property>
+ <property name="step-increment">1</property>
</object>
- </child>
+ </property>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Reverse</property>
+ <property name="activatable_widget">timed_animation_reverse</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Reverse</property>
- <property name="activatable_widget">timed_animation_reverse</property>
- <child>
- <object class="GtkSwitch" id="timed_animation_reverse">
- <property name="valign">center</property>
- <property name="state">False</property>
- </object>
- </child>
+ <object class="GtkSwitch" id="timed_animation_reverse">
+ <property name="valign">center</property>
+ <property name="state">False</property>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Alternate</property>
+ <property name="activatable_widget">timed_animation_alternate</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Alternate</property>
- <property name="activatable_widget">timed_animation_alternate</property>
- <child>
- <object class="GtkSwitch" id="timed_animation_alternate">
- <property name="valign">center</property>
- <property name="state">False</property>
- </object>
- </child>
+ <object class="GtkSwitch" id="timed_animation_alternate">
+ <property name="valign">center</property>
+ <property name="state">False</property>
</object>
</child>
</object>
- </property>
+ </child>
</object>
- </child>
- <child>
- <object class="GtkStackPage">
- <property name="title" translatable="yes">Spring</property>
- <property name="name">Spring</property>
- <property name="child">
- <object class="AdwPreferencesGroup">
+ </property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStackPage">
+ <property name="title" translatable="yes">Spring</property>
+ <property name="name">Spring</property>
+ <property name="child">
+ <object class="AdwPreferencesGroup">
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Initial Velocity</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Initial Velocity</property>
- <child>
- <object class="GtkSpinButton" id="spring_animation_velocity">
- <property name="valign">center</property>
- <property name="numeric">True</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="lower">-1000</property>
- <property name="upper">1000</property>
- <property name="value">0</property>
- <property name="page-increment">10</property>
- <property name="step-increment">1</property>
- </object>
- </property>
+ <object class="GtkSpinButton" id="spring_animation_velocity">
+ <property name="valign">center</property>
+ <property name="numeric">True</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="lower">-1000</property>
+ <property name="upper">1000</property>
+ <property name="value">0</property>
+ <property name="page-increment">10</property>
+ <property name="step-increment">1</property>
</object>
- </child>
+ </property>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Damping</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Damping</property>
- <child>
- <object class="GtkSpinButton" id="spring_animation_damping">
- <property name="valign">center</property>
- <property name="numeric">True</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="lower">0</property>
- <property name="upper">1000</property>
- <property name="value">10</property>
- <property name="page-increment">10</property>
- <property name="step-increment">1</property>
- </object>
- </property>
- <signal name="value-changed" handler="notify_spring_params_change"
swapped="yes"/>
+ <object class="GtkSpinButton" id="spring_animation_damping">
+ <property name="valign">center</property>
+ <property name="numeric">True</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="lower">0</property>
+ <property name="upper">1000</property>
+ <property name="value">10</property>
+ <property name="page-increment">10</property>
+ <property name="step-increment">1</property>
</object>
- </child>
+ </property>
+ <signal name="value-changed" handler="notify_spring_params_change"
swapped="yes"/>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Mass</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Mass</property>
- <child>
- <object class="GtkSpinButton" id="spring_animation_mass">
- <property name="valign">center</property>
- <property name="numeric">True</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="lower">0</property>
- <property name="upper">100</property>
- <property name="value">1</property>
- <property name="page-increment">10</property>
- <property name="step-increment">1</property>
- </object>
- </property>
- <signal name="value-changed" handler="notify_spring_params_change"
swapped="yes"/>
+ <object class="GtkSpinButton" id="spring_animation_mass">
+ <property name="valign">center</property>
+ <property name="numeric">True</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="lower">0</property>
+ <property name="upper">100</property>
+ <property name="value">1</property>
+ <property name="page-increment">10</property>
+ <property name="step-increment">1</property>
</object>
- </child>
+ </property>
+ <signal name="value-changed" handler="notify_spring_params_change"
swapped="yes"/>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Stiffness</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Stiffness</property>
- <child>
- <object class="GtkSpinButton" id="spring_animation_stiffness">
- <property name="valign">center</property>
- <property name="numeric">True</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="lower">0</property>
- <property name="upper">1000</property>
- <property name="value">100</property>
- <property name="page-increment">10</property>
- <property name="step-increment">1</property>
- </object>
- </property>
- <signal name="value-changed" handler="notify_spring_params_change"
swapped="yes"/>
+ <object class="GtkSpinButton" id="spring_animation_stiffness">
+ <property name="valign">center</property>
+ <property name="numeric">True</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="lower">0</property>
+ <property name="upper">1000</property>
+ <property name="value">100</property>
+ <property name="page-increment">10</property>
+ <property name="step-increment">1</property>
</object>
- </child>
+ </property>
+ <signal name="value-changed" handler="notify_spring_params_change"
swapped="yes"/>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Epsilon</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Epsilon</property>
- <child>
- <object class="GtkSpinButton" id="spring_animation_epsilon">
- <property name="valign">center</property>
- <property name="numeric">True</property>
- <property name="digits">5</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="lower">0.0001</property>
- <property name="upper">0.01</property>
- <property name="value">0.001</property>
- <property name="page-increment">0.001</property>
- <property name="step-increment">0.001</property>
- </object>
- </property>
+ <object class="GtkSpinButton" id="spring_animation_epsilon">
+ <property name="valign">center</property>
+ <property name="numeric">True</property>
+ <property name="digits">5</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="lower">0.0001</property>
+ <property name="upper">0.01</property>
+ <property name="value">0.001</property>
+ <property name="page-increment">0.001</property>
+ <property name="step-increment">0.001</property>
</object>
- </child>
+ </property>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Clamp</property>
+ <property name="activatable-widget">spring_animation_clamp_switch</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Clamp</property>
- <property
name="activatable-widget">spring_animation_clamp_switch</property>
- <child>
- <object class="GtkSwitch" id="spring_animation_clamp_switch">
- <property name="valign">center</property>
- </object>
- </child>
+ <object class="GtkSwitch" id="spring_animation_clamp_switch">
+ <property name="valign">center</property>
</object>
</child>
</object>
- </property>
+ </child>
</object>
- </child>
+ </property>
</object>
- </property>
+ </child>
</object>
- </child>
+ </property>
</object>
- </property>
+ </child>
</object>
</property>
</object>
diff --git a/demo/pages/avatar/adw-demo-page-avatar.ui b/demo/pages/avatar/adw-demo-page-avatar.ui
index 0bd9ff94..75ebc3c6 100644
--- a/demo/pages/avatar/adw-demo-page-avatar.ui
+++ b/demo/pages/avatar/adw-demo-page-avatar.ui
@@ -7,168 +7,163 @@
<object class="GtkScrolledWindow">
<property name="hscrollbar-policy">never</property>
<property name="child">
- <object class="GtkViewport">
- <property name="scroll-to-focus">True</property>
- <property name="child">
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="valign">start</property>
+ <style>
+ <class name="avatar-page"/>
+ </style>
+ <child>
<object class="GtkBox">
<property name="orientation">vertical</property>
- <property name="valign">start</property>
- <style>
- <class name="avatar-page"/>
- </style>
<child>
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <child>
- <object class="AdwAvatar" id="avatar">
- <property name="valign">center</property>
- <property name="size" bind-source="size" bind-property="value"
bind-flags="sync-create"></property>
- <property name="show-initials" bind-source="show_initials" bind-property="state"
bind-flags="sync-create"/>
- <property name="text" bind-source="text" bind-property="text"
bind-flags="sync-create"/>
- <property name="margin-bottom">36</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Avatar</property>
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <property name="justify">center</property>
- <style>
- <class name="title"/>
- <class name="title-1"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">A user avatar with generated
fallback.</property>
- <property name="justify">center</property>
- <property name="use-markup">true</property>
- <property name="wrap">True</property>
- <style>
- <class name="body"/>
- <class name="description"/>
- </style>
- </object>
- </child>
+ <object class="AdwAvatar" id="avatar">
+ <property name="valign">center</property>
+ <property name="size" bind-source="size" bind-property="value"
bind-flags="sync-create"></property>
+ <property name="show-initials" bind-source="show_initials" bind-property="state"
bind-flags="sync-create"/>
+ <property name="text" bind-source="text" bind-property="text" bind-flags="sync-create"/>
+ <property name="margin-bottom">36</property>
</object>
</child>
<child>
- <object class="AdwClamp">
- <property name="maximum-size">400</property>
- <property name="tightening-threshold">300</property>
- <property name="child">
- <object class="GtkBox">
- <property name="valign">center</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Avatar</property>
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
+ <property name="justify">center</property>
+ <style>
+ <class name="title"/>
+ <class name="title-1"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">A user avatar with generated
fallback.</property>
+ <property name="justify">center</property>
+ <property name="use-markup">true</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="body"/>
+ <class name="description"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwClamp">
+ <property name="maximum-size">400</property>
+ <property name="tightening-threshold">300</property>
+ <property name="child">
+ <object class="GtkBox">
+ <property name="valign">center</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="AdwPreferencesGroup">
<child>
- <object class="AdwPreferencesGroup">
+ <object class="AdwEntryRow" id="text">
+ <property name="title" translatable="yes">Text</property>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Show Initials</property>
+ <property name="activatable-widget">show_initials</property>
<child>
- <object class="AdwEntryRow" id="text">
- <property name="title" translatable="yes">Text</property>
- </object>
- </child>
- <child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Show Initials</property>
- <property name="activatable-widget">show_initials</property>
- <child>
- <object class="GtkSwitch" id="show_initials">
- <property name="valign">center</property>
- <property name="state">True</property>
- </object>
- </child>
+ <object class="GtkSwitch" id="show_initials">
+ <property name="valign">center</property>
+ <property name="state">True</property>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">File</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">File</property>
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <property name="action-name">avatar.open</property>
<child>
- <object class="GtkButton">
- <property name="valign">center</property>
- <property name="action-name">avatar.open</property>
+ <object class="GtkBox">
+ <property name="spacing">6</property>
<child>
- <object class="GtkBox">
- <property name="spacing">6</property>
- <child>
- <object class="GtkImage">
- <property name="icon-name">document-open-symbolic</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="file_chooser_label">
- <property name="ellipsize">middle</property>
- </object>
- </child>
+ <object class="GtkImage">
+ <property name="icon-name">document-open-symbolic</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="file_chooser_label">
+ <property name="ellipsize">middle</property>
</object>
</child>
- </object>
- </child>
- <child>
- <object class="GtkButton">
- <property name="valign">center</property>
- <property name="icon-name">user-trash-symbolic</property>
- <property name="action-name">avatar.remove</property>
- <style>
- <class name="flat"/>
- </style>
</object>
</child>
</object>
</child>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Size</property>
- <child>
- <object class="GtkSpinButton" id="size">
- <property name="valign">center</property>
- <property name="numeric">True</property>
- <property name="adjustment">
- <object class="GtkAdjustment">
- <property name="lower">24</property>
- <property name="upper">320</property>
- <property name="value">128</property>
- <property name="page-increment">8</property>
- <property name="step-increment">8</property>
- </object>
- </property>
- </object>
- </child>
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <property name="icon-name">user-trash-symbolic</property>
+ <property name="action-name">avatar.remove</property>
+ <style>
+ <class name="flat"/>
+ </style>
</object>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Size</property>
<child>
- <object class="AdwActionRow">
- <property name="title" translatable="yes">Export to File</property>
- <child>
- <object class="GtkButton">
- <property name="valign">center</property>
- <property name="icon-name">avatar-save-symbolic</property>
- <property name="action-name">avatar.save</property>
- <style>
- <class name="flat"/>
- </style>
+ <object class="GtkSpinButton" id="size">
+ <property name="valign">center</property>
+ <property name="numeric">True</property>
+ <property name="adjustment">
+ <object class="GtkAdjustment">
+ <property name="lower">24</property>
+ <property name="upper">320</property>
+ <property name="value">128</property>
+ <property name="page-increment">8</property>
+ <property name="step-increment">8</property>
</object>
- </child>
+ </property>
</object>
</child>
</object>
</child>
<child>
- <object class="GtkListBox" id="contacts">
- <property name="selection-mode">none</property>
- <style>
- <class name="boxed-list"/>
- </style>
+ <object class="AdwActionRow">
+ <property name="title" translatable="yes">Export to File</property>
+ <child>
+ <object class="GtkButton">
+ <property name="valign">center</property>
+ <property name="icon-name">avatar-save-symbolic</property>
+ <property name="action-name">avatar.save</property>
+ <style>
+ <class name="flat"/>
+ </style>
+ </object>
+ </child>
</object>
</child>
</object>
- </property>
+ </child>
+ <child>
+ <object class="GtkListBox" id="contacts">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="boxed-list"/>
+ </style>
+ </object>
+ </child>
</object>
- </child>
+ </property>
</object>
- </property>
+ </child>
</object>
</property>
</object>
diff --git a/demo/pages/styles/adw-style-demo-window.ui b/demo/pages/styles/adw-style-demo-window.ui
index 070fa10b..8ad6519e 100644
--- a/demo/pages/styles/adw-style-demo-window.ui
+++ b/demo/pages/styles/adw-style-demo-window.ui
@@ -1261,57 +1261,52 @@ The "raised" style class can be used to make a button inside a toolbar use defau
<property name="hscrollbar-policy">never</property>
<property name="vexpand">True</property>
<property name="child">
- <object class="GtkViewport">
- <property name="scroll-to-focus">False</property>
- <property name="child">
- <object class="GtkListBox">
- <property name="tooltip-text">navigation-sidebar</property>
- <binding name="selection-mode">
- <closure type="GtkSelectionMode" function="selection_mode_for_folded">
- <lookup name="folded">sidebar_leaflet</lookup>
- </closure>
- </binding>
- <signal name="row-activated" handler="sidebar_forward_cb" swapped="yes"/>
- <style>
- <class name="navigation-sidebar"/>
- </style>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Item 1</property>
- <property name="ellipsize">end</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Item 2</property>
- <property name="ellipsize">end</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Item 3</property>
- <property name="ellipsize">end</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Item 4</property>
- <property name="ellipsize">end</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label" translatable="yes">Item 5</property>
- <property name="ellipsize">end</property>
- <property name="xalign">0</property>
- </object>
- </child>
+ <object class="GtkListBox">
+ <property name="tooltip-text">navigation-sidebar</property>
+ <binding name="selection-mode">
+ <closure type="GtkSelectionMode" function="selection_mode_for_folded">
+ <lookup name="folded">sidebar_leaflet</lookup>
+ </closure>
+ </binding>
+ <signal name="row-activated" handler="sidebar_forward_cb" swapped="yes"/>
+ <style>
+ <class name="navigation-sidebar"/>
+ </style>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Item 1</property>
+ <property name="ellipsize">end</property>
+ <property name="xalign">0</property>
</object>
- </property>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Item 2</property>
+ <property name="ellipsize">end</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Item 3</property>
+ <property name="ellipsize">end</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Item 4</property>
+ <property name="ellipsize">end</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label" translatable="yes">Item 5</property>
+ <property name="ellipsize">end</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
</object>
</property>
</object>
diff --git a/doc/tools/data/adaptive-split-headers-narrow-1.ui
b/doc/tools/data/adaptive-split-headers-narrow-1.ui
index 99815359..1b16f1af 100644
--- a/doc/tools/data/adaptive-split-headers-narrow-1.ui
+++ b/doc/tools/data/adaptive-split-headers-narrow-1.ui
@@ -27,34 +27,29 @@
<property name="hscrollbar-policy">never</property>
<property name="width-request">250</property>
<property name="child">
- <object class="GtkViewport">
- <property name="scroll-to-focus">True</property>
- <property name="child">
- <object class="GtkListBox">
- <property name="selection-mode">none</property>
- <style>
- <class name="navigation-sidebar"/>
- </style>
- <child>
- <object class="GtkLabel">
- <property name="label">Item 1</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label">Item 2</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label">Item 3</property>
- <property name="xalign">0</property>
- </object>
- </child>
+ <object class="GtkListBox">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="navigation-sidebar"/>
+ </style>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Item 1</property>
+ <property name="xalign">0</property>
</object>
- </property>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Item 2</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Item 3</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
</object>
</property>
</object>
diff --git a/doc/tools/data/adaptive-split-headers-narrow-2.ui
b/doc/tools/data/adaptive-split-headers-narrow-2.ui
index 0f0809f4..28252abe 100644
--- a/doc/tools/data/adaptive-split-headers-narrow-2.ui
+++ b/doc/tools/data/adaptive-split-headers-narrow-2.ui
@@ -28,34 +28,29 @@
<property name="hscrollbar-policy">never</property>
<property name="width-request">250</property>
<property name="child">
- <object class="GtkViewport">
- <property name="scroll-to-focus">True</property>
- <property name="child">
- <object class="GtkListBox">
- <property name="selection-mode">none</property>
- <style>
- <class name="navigation-sidebar"/>
- </style>
- <child>
- <object class="GtkLabel">
- <property name="label">Item 1</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label">Item 2</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label">Item 3</property>
- <property name="xalign">0</property>
- </object>
- </child>
+ <object class="GtkListBox">
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="navigation-sidebar"/>
+ </style>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Item 1</property>
+ <property name="xalign">0</property>
</object>
- </property>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Item 2</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Item 3</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
</object>
</property>
</object>
diff --git a/doc/tools/data/adaptive-split-headers-wide.ui b/doc/tools/data/adaptive-split-headers-wide.ui
index 793481e8..41e62d37 100644
--- a/doc/tools/data/adaptive-split-headers-wide.ui
+++ b/doc/tools/data/adaptive-split-headers-wide.ui
@@ -27,34 +27,29 @@
<property name="hscrollbar-policy">never</property>
<property name="width-request">250</property>
<property name="child">
- <object class="GtkViewport">
- <property name="scroll-to-focus">True</property>
- <property name="child">
- <object class="GtkListBox">
- <property name="selection-mode">single</property>
- <style>
- <class name="navigation-sidebar"/>
- </style>
- <child>
- <object class="GtkLabel">
- <property name="label">Item 1</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label">Item 2</property>
- <property name="xalign">0</property>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="label">Item 3</property>
- <property name="xalign">0</property>
- </object>
- </child>
+ <object class="GtkListBox">
+ <property name="selection-mode">single</property>
+ <style>
+ <class name="navigation-sidebar"/>
+ </style>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Item 1</property>
+ <property name="xalign">0</property>
</object>
- </property>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Item 2</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="label">Item 3</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>
</object>
</property>
</object>
diff --git a/src/adw-preferences-page.ui b/src/adw-preferences-page.ui
index c6cc0f25..b61b921d 100644
--- a/src/adw-preferences-page.ui
+++ b/src/adw-preferences-page.ui
@@ -7,15 +7,10 @@
<property name="hscrollbar-policy">never</property>
<property name="propagate-natural-height">True</property>
<property name="child">
- <object class="GtkViewport">
- <property name="scroll-to-focus">True</property>
+ <object class="AdwClamp">
<property name="child">
- <object class="AdwClamp">
- <property name="child">
- <object class="GtkBox" id="box">
- <property name="orientation">vertical</property>
- </object>
- </property>
+ <object class="GtkBox" id="box">
+ <property name="orientation">vertical</property>
</object>
</property>
</object>
diff --git a/src/adw-status-page.ui b/src/adw-status-page.ui
index 3d876f38..e3319337 100644
--- a/src/adw-status-page.ui
+++ b/src/adw-status-page.ui
@@ -11,71 +11,66 @@
<property name="hscrollbar-policy">never</property>
<property name="propagate-natural-height">True</property>
<property name="child">
- <object class="GtkViewport">
- <property name="scroll-to-focus">True</property>
- <property name="child">
- <object class="GtkBox" id="toplevel_box">
- <property name="orientation">vertical</property>
- <property name="valign">center</property>
- <child>
- <object class="AdwClamp">
- <property name="child">
- <object class="GtkBox">
- <property name="orientation">vertical</property>
- <property name="valign">center</property>
- <child>
- <object class="GtkImage" id="image">
- <property name="accessible-role">presentation</property>
- <binding name="visible">
- <closure function="has_image" type="gboolean">
- <lookup name="icon-name">image</lookup>
- <lookup name="paintable">image</lookup>
- </closure>
- </binding>
- <style>
- <class name="icon"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="title_label">
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <property name="justify">center</property>
- <binding name="visible">
- <closure function="string_is_not_empty" type="gboolean">
- <lookup name="label">title_label</lookup>
- </closure>
- </binding>
- <style>
- <class name="title"/>
- <class name="title-1"/>
- </style>
- </object>
- </child>
- <child>
- <object class="GtkLabel" id="description_label">
- <property name="wrap">True</property>
- <property name="wrap-mode">word-char</property>
- <property name="justify">center</property>
- <property name="use-markup">True</property>
- <binding name="visible">
- <closure function="string_is_not_empty" type="gboolean">
- <lookup name="label">description_label</lookup>
- </closure>
- </binding>
- <style>
- <class name="body"/>
- <class name="description"/>
- </style>
- </object>
- </child>
+ <object class="GtkBox" id="toplevel_box">
+ <property name="orientation">vertical</property>
+ <property name="valign">center</property>
+ <child>
+ <object class="AdwClamp">
+ <property name="child">
+ <object class="GtkBox">
+ <property name="orientation">vertical</property>
+ <property name="valign">center</property>
+ <child>
+ <object class="GtkImage" id="image">
+ <property name="accessible-role">presentation</property>
+ <binding name="visible">
+ <closure function="has_image" type="gboolean">
+ <lookup name="icon-name">image</lookup>
+ <lookup name="paintable">image</lookup>
+ </closure>
+ </binding>
+ <style>
+ <class name="icon"/>
+ </style>
</object>
- </property>
+ </child>
+ <child>
+ <object class="GtkLabel" id="title_label">
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
+ <property name="justify">center</property>
+ <binding name="visible">
+ <closure function="string_is_not_empty" type="gboolean">
+ <lookup name="label">title_label</lookup>
+ </closure>
+ </binding>
+ <style>
+ <class name="title"/>
+ <class name="title-1"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="description_label">
+ <property name="wrap">True</property>
+ <property name="wrap-mode">word-char</property>
+ <property name="justify">center</property>
+ <property name="use-markup">True</property>
+ <binding name="visible">
+ <closure function="string_is_not_empty" type="gboolean">
+ <lookup name="label">description_label</lookup>
+ </closure>
+ </binding>
+ <style>
+ <class name="body"/>
+ <class name="description"/>
+ </style>
+ </object>
+ </child>
</object>
- </child>
+ </property>
</object>
- </property>
+ </child>
</object>
</property>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]