From 5ad3705179c75e4dffd885c0c2548d14f6839b30 Mon Sep 17 00:00:00 2001 From: Maximilian Mader Date: Thu, 3 Oct 2019 15:26:49 +0200 Subject: [PATCH] [GTK3] Automatic resizing of the VRAM viewer --- gtk3/main.c | 2 +- gtk3/resources/ui/window.ui | 35 ++++++++++++++++++----------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/gtk3/main.c b/gtk3/main.c index b35a722..2ad2f6d 100644 --- a/gtk3/main.c +++ b/gtk3/main.c @@ -792,7 +792,7 @@ static gboolean on_draw_vram_viewer_tilemap(GtkWidget *widget, cairo_t *cr, gpoi } if (gtk_toggle_button_get_active(builder_get(GTK_TOGGLE_BUTTON, "vram_viewer_tilemap_toggle_scrolling_button"))) { - cairo_rectangle(cr, 0, 0, width, height); + cairo_rectangle(cr, -2, -2, width + 2, height + 2); for (unsigned x = 0; x < 2; x++) { for (unsigned y = 0; y < 2; y++) { diff --git a/gtk3/resources/ui/window.ui b/gtk3/resources/ui/window.ui index c61da64..6363011 100644 --- a/gtk3/resources/ui/window.ui +++ b/gtk3/resources/ui/window.ui @@ -595,23 +595,6 @@ Maximilian Mader https://github.com/max-m 3 - - - Use Integer Scaling - True - True - False - 5 - 10 - True - - - - False - True - 4 - - Keep Aspect Ratio @@ -629,6 +612,23 @@ Maximilian Mader https://github.com/max-m 4 + + + Use Integer Scaling + True + True + False + 5 + 10 + True + + + + False + True + 4 + + False @@ -1152,6 +1152,7 @@ Maximilian Mader https://github.com/max-m False VRAM Viewer + False