Skip to content

Commit 26f36d8

Browse files
vtyrtovTurboGit
authored andcommitted
tagging: Position floating tag entry on right side (Wayland)
- Change popover position from GTK_POS_TOP to GTK_POS_LEFT - Anchor at right edge (rect.x = a.width - 1) and vertical center (rect.y = a.height / 2) - This placement provides better space for GtkEntryCompletion popup - Suggested by reviewer for improved UX on Wayland
1 parent 3571083 commit 26f36d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libs/tagging.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3427,7 +3427,7 @@ static void _lib_tagging_tag_show(dt_action_t *action)
34273427
// Wayland: popover
34283428
d->floating_tag_window = gtk_popover_new(center);
34293429
gtk_popover_set_modal(GTK_POPOVER(d->floating_tag_window), TRUE);
3430-
gtk_popover_set_position(GTK_POPOVER(d->floating_tag_window), GTK_POS_TOP);
3430+
gtk_popover_set_position(GTK_POPOVER(d->floating_tag_window), GTK_POS_LEFT);
34313431
}
34323432
else
34333433
{
@@ -3467,8 +3467,8 @@ static void _lib_tagging_tag_show(dt_action_t *action)
34673467
GtkAllocation a;
34683468
gtk_widget_get_allocation(center, &a);
34693469
GdkRectangle rect;
3470-
rect.x = MAX(0, (a.width - FLOATING_ENTRY_WIDTH) / 2);
3471-
rect.y = MAX(0, a.height - 1);
3470+
rect.x = MAX(0, a.width - 1);
3471+
rect.y = MAX(0, (a.height / 2));
34723472
rect.width = FLOATING_ENTRY_WIDTH;
34733473
rect.height = 1;
34743474
gtk_popover_set_pointing_to(GTK_POPOVER(d->floating_tag_window), &rect);

0 commit comments

Comments
 (0)