<p></p>
<p>Currently it's hard-coded to a 500×200 default size, and if resized the new size doesn't survives a Geany restart.  There's 3 things I could do:</p>
<ol>
<li>adapt that default size to the display scale (which is <em>not</em> the DPI)</li>
<li>adapt to the height of a line, but that's tricky to compute</li>
<li>allow configuration (or at least, restoring) default size</li>
</ol>
<p>First option seems easy enough, and see below for a test patch.<br>
Option 2 is probably best, but is clearly the most complicated of all.<br>
Option 3 would be fairly easy, but I'm not sure if it's really practical.</p>
<p>Here's the patch for solution 1 (untested, as I don't have a HiDPI monitor at hand).  Note that this requires a Geany GTK3 build with GTK >= 3.10 (fairly old by now) <em>and</em> you having set the scaling factor rather than just raised the DPI through the roof.</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-c1">diff --git a/commander/src/commander-plugin.c b/commander/src/commander-plugin.c</span>
index 9f8d0718..a138ec41 100644
<span class="pl-md">--- a/commander/src/commander-plugin.c</span>
<span class="pl-mi1">+++ b/commander/src/commander-plugin.c</span>
<span class="pl-mdr">@@ -654,11 +654,16 @@</span> create_panel (void)
   GtkWidget          *scroll;
   GtkTreeViewColumn  *col;
   GtkCellRenderer    *cell;
<span class="pl-mi1"><span class="pl-mi1">+</span>  gint                scale = 1;</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>  </span>
<span class="pl-mi1"><span class="pl-mi1">+</span>#if GTK_CHECK_VERSION (3, 10)</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>  scale = gtk_widget_get_scale_factor (geany_data->main_widgets->window);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>#endif</span>
   
   plugin_data.panel = g_object_new (GTK_TYPE_WINDOW,
                                     "decorated", FALSE,
<span class="pl-md"><span class="pl-md">-</span>                                    "default-width", 500,</span>
<span class="pl-md"><span class="pl-md">-</span>                                    "default-height", 200,</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                                    "default-width", 500 * scale,</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                                    "default-height", 200 * scale,</span>
                                     "transient-for", geany_data->main_widgets->window,
                                     "window-position", GTK_WIN_POS_CENTER_ON_PARENT,
                                     "type-hint", GDK_WINDOW_TYPE_HINT_DIALOG,</pre></div>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany-plugins/issues/1044#issuecomment-743383188">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZY2EHQJG5CXOLG6OLSUJXABANCNFSM4UWV2T6A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJYAGT2654R2PNQM3ZDSUJXABA5CNFSM4UWV2T6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFRHSBFA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany-plugins/issues/1044#issuecomment-743383188",
"url": "https://github.com/geany/geany-plugins/issues/1044#issuecomment-743383188",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>