Skip to content

Commit

Permalink
Fixed menu scaling issue by disabling the use of GTK popover
Browse files Browse the repository at this point in the history
This fixes artizirk#9
  • Loading branch information
Aleksanaa committed Oct 8, 2023
1 parent 6233901 commit 50e5494
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/headform.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ static void wd_head_form_init(WdHeadForm *form) {
g_menu_append(rotate_menu, "Rotate 180°", "head.rotate(180)");
g_menu_append(rotate_menu, "Rotate 270°", "head.rotate(270)");
gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(priv->rotate_button), G_MENU_MODEL(rotate_menu));
gtk_menu_button_set_use_popover(GTK_MENU_BUTTON(priv->rotate_button), false);

static const GVariantType * const mode_types[] = {
G_VARIANT_TYPE_INT32,
Expand Down Expand Up @@ -255,6 +256,7 @@ void wd_head_form_update(WdHeadForm *form, const struct wd_head *head,
g_menu_append_item(mode_menu, item);
}
gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(priv->mode_button), G_MENU_MODEL(mode_menu));
gtk_menu_button_set_use_popover(GTK_MENU_BUTTON(priv->mode_button), false);
// Mode entries
int w = head->custom_mode.width;
int h = head->custom_mode.height;
Expand Down
1 change: 1 addition & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ static void activate(GtkApplication* app, gpointer user_data) {
g_menu_append(main_menu, "_Show Screen Contents", "app.capture-screens");
g_menu_append(main_menu, "_Overlay Screen Names", "app.show-overlay");
gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(state->menu_button), G_MENU_MODEL(main_menu));
gtk_menu_button_set_use_popover(GTK_MENU_BUTTON(state->menu_button), false);

g_signal_connect(state->info_bar, "response", G_CALLBACK(info_response), state);
/* first child of GtkInfoBar is always GtkRevealer */
Expand Down

0 comments on commit 50e5494

Please sign in to comment.