diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-08-05 16:41:53 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-08-13 16:30:21 -0400 |
commit | 221786dda3cb262b47cc0959ca829925b7bec2a2 (patch) | |
tree | 599d732bc209f6664f8e19313f6344c3a8987bae /docs | |
parent | 0228c890117eb36057fee4892083fd3ea576fdd6 (diff) | |
download | gtk+-221786dda3cb262b47cc0959ca829925b7bec2a2.tar.gz |
lists: Mention list style classes in docs
Document that GtkListView, GtkColumnView and GtkListBox
support .rich-list, .navigation-sidebar and .data-table
style classes.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/gtk/images/data-table.png | bin | 0 -> 21717 bytes | |||
-rw-r--r-- | docs/reference/gtk/images/navigation-sidebar.png | bin | 0 -> 28865 bytes | |||
-rw-r--r-- | docs/reference/gtk/images/rich-list.png | bin | 0 -> 8129 bytes | |||
-rw-r--r-- | docs/reference/gtk/meson.build | 3 | ||||
-rw-r--r-- | docs/reference/gtk/section-list-widget.md | 24 |
5 files changed, 27 insertions, 0 deletions
diff --git a/docs/reference/gtk/images/data-table.png b/docs/reference/gtk/images/data-table.png Binary files differnew file mode 100644 index 0000000000..60eb959bf6 --- /dev/null +++ b/docs/reference/gtk/images/data-table.png diff --git a/docs/reference/gtk/images/navigation-sidebar.png b/docs/reference/gtk/images/navigation-sidebar.png Binary files differnew file mode 100644 index 0000000000..5a9b9945cc --- /dev/null +++ b/docs/reference/gtk/images/navigation-sidebar.png diff --git a/docs/reference/gtk/images/rich-list.png b/docs/reference/gtk/images/rich-list.png Binary files differnew file mode 100644 index 0000000000..edfece1e5c --- /dev/null +++ b/docs/reference/gtk/images/rich-list.png diff --git a/docs/reference/gtk/meson.build b/docs/reference/gtk/meson.build index aa4b7f8673..431192c2c6 100644 --- a/docs/reference/gtk/meson.build +++ b/docs/reference/gtk/meson.build @@ -370,6 +370,9 @@ images = [ 'images/widget-hvalign.png', 'images/window-default.png', 'images/window.png', + 'images/rich-list.png', + 'images/data-table.png', + 'images/navigation-sidebar.png' ] content_files = [ diff --git a/docs/reference/gtk/section-list-widget.md b/docs/reference/gtk/section-list-widget.md index 53d25f0853..b93ab872e3 100644 --- a/docs/reference/gtk/section-list-widget.md +++ b/docs/reference/gtk/section-list-widget.md @@ -165,6 +165,30 @@ rows and provide a similar experience to #GtkTreeView. Developers should refer to those objects' API reference for more discussion on the topic. +## List styles {#list-styles} + +One of the advantages of the new list widgets over #GtkTreeViews and cell +renderers is that they are fully themable using GTK CSS. This provides a +lot of flexibility. The themes that ship with GTK provide a few predefined +list styles that can be used in many situations: + +![Rich list](rich-list.png) + +This style of list is low density, spacious and uses an outline focus ring. +It is suitable for lists of controls, e.g. in preference dialogs or +settings panels. Use the .rich-list style class. + +![Navigation sidebar](navigation-sidebar.png) + +This style of list is medium density, using a full background to indicate +focus and selection. Use the .navigation-sidebar style class. + +![Data table](data-table.png) + +This style of list is a high density table, similar in style to a traditional +treeview. Individual cells can be selectable and editable. Use the .data-table +style class. + ## Comparison to GtkTreeView Developers familiar with #GtkTreeView may wonder how this way of doing lists |