Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormyheroyuki <myheroyuki@outlook.com>2023-06-28 17:48:09 +0300
committermyheroyuki <myheroyuki@outlook.com>2023-06-28 17:48:09 +0300
commit24138f6c16b239058db0f93fab4710fa092d8e57 (patch)
treed4a3812d001a34bd0f484fe8eb6e266bed6e4d45 /plugins
parent3e440b4e36f2def0aa2efdc2ae3bd1c0db42f254 (diff)
[REM-2926] Added ability to set a fixed aspect ratio for vnc connections when using dynamic resolution. No GUI option yet, only in config files
Diffstat (limited to 'plugins')
-rw-r--r--plugins/vnc/vnc_plugin.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/vnc/vnc_plugin.c b/plugins/vnc/vnc_plugin.c
index adecffff4..870ec0335 100644
--- a/plugins/vnc/vnc_plugin.c
+++ b/plugins/vnc/vnc_plugin.c
@@ -1962,6 +1962,7 @@ static void remmina_plugin_vnc_init(RemminaProtocolWidget *gp)
TRACE_CALL(__func__);
RemminaPluginVncData *gpdata;
gint flags;
+ gdouble aspect_ratio;
gpdata = g_new0(RemminaPluginVncData, 1);
g_object_set_data_full(G_OBJECT(gp), "plugin-data", gpdata, g_free);
@@ -1974,7 +1975,19 @@ static void remmina_plugin_vnc_init(RemminaProtocolWidget *gp)
gpdata->drawing_area = gtk_drawing_area_new();
gtk_widget_show(gpdata->drawing_area);
- gtk_container_add(GTK_CONTAINER(gp), gpdata->drawing_area);
+
+ aspect_ratio = remmina_plugin_service->file_get_double(remminafile, "aspect_ratio", 0);
+ if (aspect_ratio > 0){
+ GtkWidget* aspectframe = gtk_aspect_frame_new(NULL, 0, 0, aspect_ratio, FALSE);
+
+ gtk_frame_set_shadow_type(aspectframe, GTK_SHADOW_NONE);
+ gtk_widget_show(aspectframe);
+ gtk_container_add(aspectframe, gpdata->drawing_area);
+ gtk_container_add(GTK_CONTAINER(gp), aspectframe);
+ }
+ else{
+ gtk_container_add(GTK_CONTAINER(gp), gpdata->drawing_area);
+ }
gtk_widget_add_events(
gpdata->drawing_area,