diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-15 14:16:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-15 17:40:55 +0200 |
commit | 59fbb0d49dc9dcdc9bb76214949ac0ab4332b9c2 (patch) | |
tree | e30f18657da6f33d598f9ffbfc2144400ba7bd16 /vcl | |
parent | e299f1f5e6097d9e5857dba65a65c33ac31974ae (diff) |
gtk4: get toolbar popovers in sidebar working
Change-Id: I7ef95a3207c3a10cd541a529c80ef70d55ea2185
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123657
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index c648bfee534d..bd84f41b2d1e 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -2236,11 +2236,13 @@ namespace #if !GTK_CHECK_VERSION(4, 0, 0) gtk_container_remove(GTK_CONTAINER(pContainer), pChild); #else - assert(GTK_IS_BOX(pContainer) || GTK_IS_GRID(pContainer)); + assert(GTK_IS_BOX(pContainer) || GTK_IS_GRID(pContainer) || GTK_IS_POPOVER(pContainer)); if (GTK_IS_BOX(pContainer)) gtk_box_remove(GTK_BOX(pContainer), pChild); else if (GTK_IS_GRID(pContainer)) gtk_grid_remove(GTK_GRID(pContainer), pChild); + else if (GTK_IS_POPOVER(pContainer)) + gtk_popover_set_child(GTK_POPOVER(pContainer), nullptr); #endif } @@ -2249,11 +2251,13 @@ namespace #if !GTK_CHECK_VERSION(4, 0, 0) gtk_container_add(GTK_CONTAINER(pContainer), pChild); #else - assert(GTK_IS_BOX(pContainer) || GTK_IS_GRID(pContainer)); + assert(GTK_IS_BOX(pContainer) || GTK_IS_GRID(pContainer) || GTK_IS_POPOVER(pContainer)); if (GTK_IS_BOX(pContainer)) gtk_box_append(GTK_BOX(pContainer), pChild); else if (GTK_IS_GRID(pContainer)) gtk_grid_attach(GTK_GRID(pContainer), pChild, 0, 0, 1, 1); + else if (GTK_IS_POPOVER(pContainer)) + gtk_popover_set_child(GTK_POPOVER(pContainer), pChild); #endif } |