aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Conti <jason.conti@gmail.com>2021-05-09 17:24:36 -0400
committerJason Conti <jason.conti@gmail.com>2021-05-09 17:24:36 -0400
commitd6d6876013caf8118414a781af8842f74be29b78 (patch)
treeb83951071afa1f77858dd6ab5b5c6c90d0ae4712 /src
parent9f2f8e9fb88d37d3488de910feb317da349df1cf (diff)
downloadayatana-ido-d6d6876013caf8118414a781af8842f74be29b78.tar.gz
ayatana-ido-d6d6876013caf8118414a781af8842f74be29b78.tar.bz2
ayatana-ido-d6d6876013caf8118414a781af8842f74be29b78.zip
src/idoremovablemenuitem.c: replace grid with box to fix a11y
Diffstat (limited to 'src')
-rw-r--r--src/idoremovablemenuitem.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/idoremovablemenuitem.c b/src/idoremovablemenuitem.c
index 88d20ad..946ffb3 100644
--- a/src/idoremovablemenuitem.c
+++ b/src/idoremovablemenuitem.c
@@ -387,16 +387,14 @@ static void ido_removable_menu_item_init(IdoRemovableMenuItem *self)
gtk_widget_set_valign(pPrivate->pButton, GTK_ALIGN_CENTER);
gtk_widget_show(pPrivate->pButton);
- GtkWidget *pWidget = gtk_grid_new();
- GtkGrid *pGrid = GTK_GRID(pWidget);
-
- gtk_grid_attach(pGrid, pPrivate->pImage, 0, 0, 1, 1);
- gtk_grid_attach(pGrid, pPrivate->pLabel, 1, 0, 1, 1);
- gtk_grid_attach(pGrid, pPrivate->pButton, 2, 0, 1, 1);
+ GtkWidget *pBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_box_pack_start(GTK_BOX(pBox), pPrivate->pImage, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(pBox), pPrivate->pLabel, TRUE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(pBox), pPrivate->pButton, FALSE, FALSE, 0);
g_object_set(pPrivate->pImage, "halign", GTK_ALIGN_START, "hexpand", FALSE, "valign", GTK_ALIGN_CENTER, "margin-right", 6, NULL);
g_object_set(pPrivate->pLabel, "halign", GTK_ALIGN_START, "hexpand", TRUE, "margin-right", 6, "valign", GTK_ALIGN_CENTER, NULL);
- gtk_widget_show (pWidget);
- gtk_container_add(GTK_CONTAINER(self), pWidget);
+ gtk_widget_show(pBox);
+ gtk_container_add(GTK_CONTAINER(self), pBox);
g_signal_connect(pPrivate->pLabel, "activate-link", G_CALLBACK(onActivateLink), self);
}