diff --git a/demo/pages/styles/adw-style-demo-window.c b/demo/pages/styles/adw-style-demo-window.c
index d156bc4f2e3c5a36d8305b1299bb8f9aec82f945..41c1cbecf6121b966ffb9b40dda6cec259a2872d 100644
--- a/demo/pages/styles/adw-style-demo-window.c
+++ b/demo/pages/styles/adw-style-demo-window.c
@@ -8,7 +8,6 @@ struct _AdwStyleDemoWindow
gboolean progress;
- GtkWindow *header_bar_window;
GtkWindow *status_page_window;
GtkWindow *sidebar_window;
AdwNavigationSplitView *split_view;
@@ -25,16 +24,6 @@ enum {
static GParamSpec *props[LAST_PROP];
-static void
-header_bar_cb (GtkWidget *sender,
- const char *name,
- GVariant *param)
-{
- AdwStyleDemoWindow *self = ADW_STYLE_DEMO_WINDOW (sender);
-
- gtk_window_present (self->header_bar_window);
-}
-
static void
status_page_cb (GtkWidget *sender,
const char *name,
@@ -68,11 +57,9 @@ set_devel_style (AdwStyleDemoWindow *self,
{
if (devel) {
gtk_widget_add_css_class (GTK_WIDGET (self), "devel");
- gtk_widget_add_css_class (GTK_WIDGET (self->header_bar_window), "devel");
gtk_widget_add_css_class (GTK_WIDGET (self->status_page_window), "devel");
} else {
gtk_widget_remove_css_class (GTK_WIDGET (self), "devel");
- gtk_widget_remove_css_class (GTK_WIDGET (self->header_bar_window), "devel");
gtk_widget_remove_css_class (GTK_WIDGET (self->status_page_window), "devel");
}
}
@@ -128,9 +115,6 @@ adw_style_demo_window_dispose (GObject *object)
{
AdwStyleDemoWindow *self = ADW_STYLE_DEMO_WINDOW (object);
- if (self->header_bar_window)
- gtk_window_destroy (self->header_bar_window);
-
if (self->status_page_window)
gtk_window_destroy (self->status_page_window);
@@ -163,7 +147,6 @@ adw_style_demo_window_class_init (AdwStyleDemoWindowClass *klass)
g_object_class_install_properties (object_class, LAST_PROP, props);
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/Adwaita1/Demo/ui/pages/styles/adw-style-demo-window.ui");
- gtk_widget_class_bind_template_child (widget_class, AdwStyleDemoWindow, header_bar_window);
gtk_widget_class_bind_template_child (widget_class, AdwStyleDemoWindow, status_page_window);
gtk_widget_class_bind_template_child (widget_class, AdwStyleDemoWindow, sidebar_window);
gtk_widget_class_bind_template_child (widget_class, AdwStyleDemoWindow, split_view);
@@ -171,7 +154,6 @@ adw_style_demo_window_class_init (AdwStyleDemoWindowClass *klass)
gtk_widget_class_install_property_action (widget_class, "style.devel", "devel");
gtk_widget_class_install_property_action (widget_class, "style.progress", "progress");
- gtk_widget_class_install_action (widget_class, "style.header-bar", NULL, header_bar_cb);
gtk_widget_class_install_action (widget_class, "style.status-page", NULL, status_page_cb);
gtk_widget_class_install_action (widget_class, "style.sidebar", NULL, sidebar_cb);
gtk_widget_class_install_action (widget_class, "style.dummy", NULL, dummy_cb);
diff --git a/demo/pages/styles/adw-style-demo-window.ui b/demo/pages/styles/adw-style-demo-window.ui
index 6841d4dd00b9e09fd91559eb845869e60454118e..e173fc4473c8acfb28c1e998d2421c4aacdb9e2f 100644
--- a/demo/pages/styles/adw-style-demo-window.ui
+++ b/demo/pages/styles/adw-style-demo-window.ui
@@ -1021,21 +1021,6 @@ audio-volume-medium
-
- 360
- Main View
- True
-
+
+
+ True
+
+
+ Utility Pane
+
+
+
+
+ Main View
+
+
diff --git a/doc/tools/data/adaptive-utility-pane-wide.ui b/doc/tools/data/adaptive-utility-pane-wide.ui
index 170c2c5275c7f8b2986493e96cf4a2982e1b4f40..a655e242277929e722087794143d742bf25b2ceb 100644
--- a/doc/tools/data/adaptive-utility-pane-wide.ui
+++ b/doc/tools/data/adaptive-utility-pane-wide.ui
@@ -2,49 +2,48 @@
-
+
+ 360
+ 200
800
500
Utility Pane
-
-
-
-
-
- True
-
-
- Utility Pane
- True
- 250
-
+
+
+
+ raised
+
+
-
-
-
-
+
-
- 360
- Main View
- True
-
+
+
+ True
+
+
+ Utility Pane
+
+
+
+
+ Main View
+
+
diff --git a/doc/tools/data/adaptive-view-switcher-narrow.ui b/doc/tools/data/adaptive-view-switcher-narrow.ui
index 770e650a610061503489f8c83610f0304a17faf7..9de6a05d639740cfcfcd90175fb211b3ce6b82ab 100644
--- a/doc/tools/data/adaptive-view-switcher-narrow.ui
+++ b/doc/tools/data/adaptive-view-switcher-narrow.ui
@@ -3,17 +3,26 @@
+ 360
+ 200
360
500
+ View Switcher
+
+
+ max-width: 550sp
+ True
+
+
+
-
-
+
stack
-
- title
-
diff --git a/doc/tools/data/adaptive-view-switcher-wide.ui b/doc/tools/data/adaptive-view-switcher-wide.ui
index 17c5c43d6f53842abf7755ec4f5eee89acbad8c1..0831fc742852dcf99ca59ef20fb30e5c61e4cc13 100644
--- a/doc/tools/data/adaptive-view-switcher-wide.ui
+++ b/doc/tools/data/adaptive-view-switcher-wide.ui
@@ -3,17 +3,26 @@
+ 360
+ 200
800
500
+ View Switcher
+
+
+ max-width: 550sp
+ True
+
+
+
-
-
+
stack
-
- title
-
diff --git a/doc/tools/data/header-bar-split.ui b/doc/tools/data/header-bar-split.ui
deleted file mode 100644
index 6ebbe8ad1c061d19e02651b93ce69f1b8b70128c..0000000000000000000000000000000000000000
--- a/doc/tools/data/header-bar-split.ui
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
- Window
- 400
- 100
- Content
-
-
-
-
- 150
- raised
-
-
-
-
-
-
-
- False
-
-
-
-
-
-
-
- True
- raised
-
-
-
-
-
-
-
-
-
diff --git a/doc/tools/data/view-switcher.ui b/doc/tools/data/view-switcher.ui
index b3428833398717354238050a184fd9dd474432c0..73c88bdb9ee84d5588028efe42691b38a177999c 100644
--- a/doc/tools/data/view-switcher.ui
+++ b/doc/tools/data/view-switcher.ui
@@ -2,14 +2,22 @@
-
- False
-
-
- vertical
-
+
+ 100
+
+
+
+
+
+
- True
Page 1
@@ -38,36 +46,7 @@
-
-
-
- vertical
- 6
-
-
-
-
-
- stack
- narrow
- center
- 9
-
-
-
-
+
diff --git a/doc/tools/style-dark.css b/doc/tools/style-dark.css
index c9dc04bf61ba17803bf12e467f78e4be1bb4cd3e..972735a30c7b3538dbe7d815972306b0eee7e4de 100644
--- a/doc/tools/style-dark.css
+++ b/doc/tools/style-dark.css
@@ -1,3 +1,4 @@
.overview-tab-page {
- background: linear-gradient(to bottom right, @blue_5, @green_5 80%);
+ background: image(alpha(black, .25)),
+ linear-gradient(to bottom right, @blue_5, @green_5 80%);
}
diff --git a/doc/widget-gallery.md b/doc/widget-gallery.md
index 560e92dfcdc3d1b950cbed2aa4e79112935d1be9..2f22ee3ad142cfedea3b57093024cc06b5ee3d3b 100644
--- a/doc/widget-gallery.md
+++ b/doc/widget-gallery.md
@@ -3,136 +3,136 @@ Slug: widget-gallery
# Widget Gallery
-## Display
+# Display
-### Status Page
+## Status Page
[
](class.StatusPage.html)
-### Toast Overlay
+## Toast Overlay
[
](class.ToastOverlay.html)
-### Banner
+## Banner
[
](class.Banner.html)
-### Avatar
+## Avatar
[
](class.Avatar.html)
-## Dialogs
+# Dialogs
-### Message Dialog
+## Message Dialog
[
](class.MessageDialog.html)
-## Boxed Lists
+# Boxed Lists
-### Action Row
+## Action Row
[
](class.ActionRow.html)
-### Switch Row
+## Switch Row
[
](class.SwitchRow.html)
-### Combo Row
+## Combo Row
[
](class.ComboRow.html)
-### Expander Row
+## Expander Row
[
](class.ExpanderRow.html)
-### Entry Row
+## Entry Row
[
](class.EntryRow.html)
-### Password Entry Row
+## Password Entry Row
[
](class.PasswordEntryRow.html)
-### Spin Row
+## Spin Row
[
](class.SpinRow.html)
-## Preferences
+# Preferences
-### Preferences Group
+## Preferences Group
[
](class.PreferencesGroup.html)
-### Preferences Page
+## Preferences Page
[
](class.PreferencesPage.html)
-### Preferences Window
+## Preferences Window
[
](class.PreferencesWindow.html)
-## About Window
+# About Window
[
](class.AboutWindow.html)
-## Navigation
+# Navigation
-### Navigation View
+## Navigation View
[
](class.NavigationView.html)
-### Navigation Split View
+## Navigation Split View
[
@@ -143,7 +143,7 @@ Slug: widget-gallery
](class.NavigationSplitView.html)
-### Overlay Split View
+## Overlay Split View
[
@@ -154,7 +154,7 @@ Slug: widget-gallery
](class.OverlaySplitView.html)
-### Carousel
+## Carousel
[
@@ -171,19 +171,19 @@ Slug: widget-gallery
](class.CarouselIndicatorLines.html)
-### View Switcher
+## View Switcher
[
-
-
-](class.ViewSwitcherTitle.html)
+
+
+](class.ViewSwitcher.html)
[
](class.ViewSwitcherBar.html)
-### Tabs
+## Tabs
[
@@ -200,16 +200,16 @@ Slug: widget-gallery
](class.TabButton.html)
-## Adaptive Containers
+# Helpers
-### Breakpoint Bin
+## Breakpoint Bin
[
](class.BreakpointBin.html)
-### Clamp
+## Clamp
[
@@ -222,63 +222,28 @@ Slug: widget-gallery
See also: [class@ClampLayout], [class@ClampScrollable]
-### Leaflet
-
-[
-
-
-
-
-
-
-](class.Leaflet.html)
-
-### Flap
-
-[
-
-
-
-
-
-
-](class.Flap.html)
-
-### Squeezer
-
-[
-
-
-
-
-
-
-](class.Squeezer.html)
-
-## Helpers
-
-### Toolbar View
+## Toolbar View
[
](class.ToolbarView.html)
-### Window Title
+## Window Title
[
](class.WindowTitle.html)
-### Header Bar
+## Header Bar
[
](class.HeaderBar.html)
-### Window
+## Window
[
@@ -287,21 +252,21 @@ See also: [class@ClampLayout], [class@ClampScrollable]
See also: [class@ApplicationWindow]
-### Split Button
+## Split Button
[
](class.SplitButton.html)
-### Button Content
+## Button Content
[
](class.ButtonContent.html)
-### Bin
+## Bin
[
diff --git a/src/adw-header-bar.c b/src/adw-header-bar.c
index 0f8a15e53fe26e4023e866390227fd1736f8fb15..15b5d01f538e6642eefed17bd0eaca17a22ffdf6 100644
--- a/src/adw-header-bar.c
+++ b/src/adw-header-bar.c
@@ -65,51 +65,14 @@
* ## Centering Policy
*
* [property@HeaderBar:centering-policy] allows to enforce strict centering of
- * the title widget, this is useful for [class@ViewSwitcherTitle].
+ * the title widget. This can be useful for entries inside [class@Clamp].
*
* ## Title Buttons
*
+ * Unlike `GtkHeaderBar`, `AdwHeaderBar` allows to toggle title button
+ * visibility for each side individually, using the
* [property@HeaderBar:show-start-title-buttons] and
- * [property@HeaderBar:show-end-title-buttons] allow to easily create split
- * header bar layouts using [class@Leaflet], as follows:
- *
- * ```xml
- *
- *
- *
- * raised
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * raised
- * True
- *
- *
- *
- *
- *
- *
- *
- * ```
- *
- *
- *
- *
- *
+ * [property@HeaderBar:show-end-title-buttons] properties.
*
* ## CSS nodes
*
@@ -120,8 +83,10 @@
* ├── widget
* │ ╰── box.start
* │ ├── windowcontrols.start
+ * │ ├── [button.back]
* │ ╰── [other children]
- * ├── [Title Widget]
+ * ├── widget
+ * │ ╰── [Title Widget]
* ╰── widget
* ╰── box.end
* ├── [other children]
@@ -129,14 +94,17 @@
* ```
*
* `AdwHeaderBar`'s CSS node is called `headerbar`. It contains a `windowhandle`
- * subnode, which contains a `box` subnode, which contains two `widget` subnodes
- * at the start and end of the header bar, each of which contains a `box`
- * subnode with the `.start` and `.end` style classes respectively, as well as a
- * center node that represents the title.
+ * subnode, which contains a `box` subnode, which contains three `widget`
+ * subnodes at the start, center and end of the header bar. The start and end
+ * subnotes contain a `box` subnode with the `.start` and `.end` style classes
+ * respectively, and the center node contains a node that represents the title.
*
* Each of the boxes contains a `windowcontrols` subnode, see
* [class@Gtk.WindowControls] for details, as well as other children.
*
+ * When [property@HeaderBar:show-back-button] is `TRUE`, the start box also
+ * contains a node with the name `button` and `.back` style class.
+ *
* ## Accessibility
*
* `AdwHeaderBar` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
diff --git a/src/adw-navigation-split-view.c b/src/adw-navigation-split-view.c
index 1bb475f47385664bf702106854673b337d94ef44..8f555f03b6941faa9ada6809fad53f585dd8c1ec 100644
--- a/src/adw-navigation-split-view.c
+++ b/src/adw-navigation-split-view.c
@@ -849,7 +849,7 @@ adw_navigation_split_view_add_child (GtkBuildable *buildable,
else if (!g_strcmp0 (type, "sidebar"))
adw_navigation_split_view_set_sidebar (ADW_NAVIGATION_SPLIT_VIEW (buildable),
ADW_NAVIGATION_PAGE (child));
- else if (!type)
+ else if (!type && ADW_IS_NAVIGATION_PAGE (child))
adw_navigation_split_view_set_content (ADW_NAVIGATION_SPLIT_VIEW (buildable),
ADW_NAVIGATION_PAGE (child));
else
diff --git a/src/adw-preferences-window.c b/src/adw-preferences-window.c
index 7614c12abb2cd7ed5dacda1c9940e10dc88d6bf9..8b8a3bfd468ac44e9d5cda531140d27860e21a3a 100644
--- a/src/adw-preferences-window.c
+++ b/src/adw-preferences-window.c
@@ -1079,7 +1079,9 @@ adw_preferences_window_close_subpage (AdwPreferencesWindow *self)
* @self: a preferences window
* @page: the subpage
*
- * TODO
+ * Pushes @page onto the subpage stack of @self.
+ *
+ * The page will be automatically removed when popped.
*
* Since: 1.4
*/
@@ -1101,9 +1103,9 @@ adw_preferences_window_push_subpage (AdwPreferencesWindow *self,
* adw_preferences_window_pop_subpage:
* @self: a preferences window
*
- * TODO
+ * Pop the visible page from the subpage stack of @self.
*
- * Returns: TODO
+ * Returns: `TRUE` if a page has been popped
*
* Since: 1.4
*/
diff --git a/src/adw-swipe-tracker.c b/src/adw-swipe-tracker.c
index 39166580b47a63ba2008d9316ffc00a17c98c5e3..52915b8fe53089502f713bc6e836134c4e3976cc 100644
--- a/src/adw-swipe-tracker.c
+++ b/src/adw-swipe-tracker.c
@@ -35,7 +35,8 @@
/**
* AdwSwipeTracker:
*
- * A swipe tracker used in [class@Carousel], [class@Flap] and [class@Leaflet].
+ * A swipe tracker used in [class@Carousel], [class@NavigationView] and
+ * [class@OverlaySplitView].
*
* The `AdwSwipeTracker` object can be used for implementing widgets with swipe
* gestures. It supports touch-based swipes, pointer dragging, and touchpad
@@ -1639,3 +1640,4 @@ adw_swipe_tracker_reset (AdwSwipeTracker *self)
if (self->scroll_controller)
gtk_event_controller_reset (self->scroll_controller);
}
+
diff --git a/src/adw-view-switcher-bar.c b/src/adw-view-switcher-bar.c
index b71de98317b8f629c60b5287da33d7b950d0ce34..3cc1b92e3ec6adfd93e11d1f1dffa2848cd2acdb 100644
--- a/src/adw-view-switcher-bar.c
+++ b/src/adw-view-switcher-bar.c
@@ -27,23 +27,29 @@
* on mobile phones. It can't be revealed if there are less than two pages.
*
* `AdwViewSwitcherBar` is intended to be used together with
- * [class@ViewSwitcherTitle].
- *
- * A common use case is to bind the [property@ViewSwitcherBar:reveal] property
- * to [property@ViewSwitcherTitle:title-visible] to automatically reveal the
- * view switcher bar when the title label is displayed in place of the view
- * switcher, as follows:
+ * `AdwViewSwitcher` in a header bar, and a [class@Breakpoint] showing the view
+ * switcher bar on narrow sizes, while removing the view switcher from the
+ * header bar, as follows:
*
* ```xml
*
+ * 360
+ * 200
+ *
+ *
+ * max-width: 550sp
+ * True
+ *
+ *
+ *
*
*
*
- *
*
- *
+ *
* stack
- *
- * title
- *
*
*
*
@@ -64,6 +67,11 @@
*
* ```
*
+ * It's recommended to set [property@ViewSwitcher:policy] to
+ * `ADW_VIEW_SWITCHER_POLICY_WIDE` in this case.
+ *
+ * You may have to adjust the breakpoint condition for your specific pages.
+ *
* ## CSS nodes
*
* `AdwViewSwitcherBar` has a single CSS node with name` viewswitcherbar`.
diff --git a/src/adw-view-switcher.c b/src/adw-view-switcher.c
index 8878983ffeacbb6e8572c399fddd603336a17dce..e8058b2bd56689d07bb9fa0312d5e661de797c7b 100644
--- a/src/adw-view-switcher.c
+++ b/src/adw-view-switcher.c
@@ -32,8 +32,51 @@
* displayed side by side, or icon on top of the label. This can be controlled
* via the [property@ViewSwitcher:policy] property.
*
- * Most applications should be using [class@ViewSwitcherBar] and
- * [class@ViewSwitcherTitle].
+ * `AdwViewSwitcher` is intended to be used in a header bar together with
+ * [class@ViewSwitcherBar] at the bottom of the window, and a [class@Breakpoint]
+ * showing the view switcher bar on narrow sizes, while removing the view
+ * switcher from the header bar, as follows:
+ *
+ * ```xml
+ *
+ * 360
+ * 200
+ *
+ *
+ * max-width: 550sp
+ * True
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * stack
+ *
+ *
+ *
+ *
+ *
+ * ```
+ *
+ * It's recommended to set [property@ViewSwitcher:policy] to
+ * `ADW_VIEW_SWITCHER_POLICY_WIDE` in this case.
+ *
+ * You may have to adjust the breakpoint condition for your specific pages.
*
* ## CSS nodes
*