|
@@ -360,9 +360,9 @@ position_preview(float *offset_x, float *offset_y, float *size_x, float *size_y)
|
|
|
|
|
|
int scale_factor = gtk_widget_get_scale_factor(preview);
|
|
|
int top_height =
|
|
|
- gtk_widget_get_allocated_height(preview_top_box) * scale_factor;
|
|
|
+ gtk_widget_get_height(preview_top_box) * scale_factor;
|
|
|
int bottom_height =
|
|
|
- gtk_widget_get_allocated_height(preview_bottom_box) * scale_factor;
|
|
|
+ gtk_widget_get_height(preview_bottom_box) * scale_factor;
|
|
|
int inner_height = state.preview_height - top_height - bottom_height;
|
|
|
|
|
|
float scale = (float)MIN(state.preview_width / (float)buffer_width,
|
|
@@ -595,7 +595,7 @@ run_quit_action(GSimpleAction *action, GVariant *param, GApplication *app)
|
|
|
}
|
|
|
|
|
|
static bool
|
|
|
-check_point_inside_bounds(int x, int y, int *bounds_x, int *bounds_y)
|
|
|
+check_point_inside_bounds(int x, int y, const int *bounds_x, const int *bounds_y)
|
|
|
{
|
|
|
bool right = false, left = false, top = false, bottom = false;
|
|
|
|
|
@@ -679,7 +679,7 @@ on_zbar_code_tapped(GtkWidget *widget, const MPZBarCode *code)
|
|
|
g_signal_connect(
|
|
|
dialog, "response", G_CALLBACK(on_zbar_dialog_response), data);
|
|
|
|
|
|
- gtk_widget_show(GTK_WIDGET(dialog));
|
|
|
+ gtk_widget_set_visible(GTK_WIDGET(dialog), true);
|
|
|
}
|
|
|
|
|
|
static void
|
|
@@ -1322,7 +1322,7 @@ activate(GtkApplication *app, gpointer data)
|
|
|
mp_io_pipeline_start();
|
|
|
|
|
|
gtk_application_add_window(app, GTK_WINDOW(window));
|
|
|
- gtk_widget_show(window);
|
|
|
+ gtk_widget_set_visible(window, true);
|
|
|
}
|
|
|
|
|
|
static void
|