diff options
| author | Mintsuki <[email protected]> | 2026-10-14 09:20:51 +0200 |
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2026-10-19 14:31:48 -0400 |
| commit | b5e619eb833d44d52b9c6cb5677c89b9d7749a3e (patch) | |
| tree | 866765ae859772b76fa80ef49d2d3e39c6927e8e | |
| parent | bf73b8a83b34c308f854f996d3685d10ccf93157 (diff) | |
| download | pluma-master.tar.bz2 pluma-master.tar.xz | |
vpaned_restore_position () and hpaned_inner_restore_position () put the
divider at the paned's size less the saved panel size, which leaves the
panel that size less the divider's handle. On exit the panel's own size
was saved, so the panel lost the size of the handle (1 px with most
themes) every time pluma was started.
Save the distance from the divider to the end of the paned instead,
which is what the restore functions expect.
Assisted-by: LLM
Signed-off-by: Mintsuki <[email protected]>
| -rw-r--r-- | pluma/pluma-window.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c index 24538d39..df5b5315 100644 --- a/pluma/pluma-window.c +++ b/pluma/pluma-window.c @@ -3563,7 +3563,13 @@ bottom_panel_size_allocate (GtkWidget *widget, GtkAllocation *allocation, PlumaWindow *window) { - window->priv->bottom_panel_size = allocation->height; + /* Store what vpaned_restore_position () expects: the distance from the + * divider to the bottom of the paned, which includes the divider's handle. + * The panel's own height leaves the handle out, and storing it would make + * the panel shrink by the size of the handle every time pluma starts. */ + window->priv->bottom_panel_size = + gtk_widget_get_allocated_height (window->priv->vpaned) - + gtk_paned_get_position (GTK_PANED (window->priv->vpaned)); } static void @@ -3571,7 +3577,10 @@ right_panel_size_allocate (GtkWidget *widget, GtkAllocation *allocation, PlumaWindow *window) { - window->priv->right_panel_size = allocation->width; + /* As for the bottom panel: what hpaned_inner_restore_position () expects */ + window->priv->right_panel_size = + gtk_widget_get_allocated_width (window->priv->hpaned_inner) - + gtk_paned_get_position (GTK_PANED (window->priv->hpaned_inner)); } static void |
