diff options
author | Wolfgang Müller | 2021-06-23 13:21:52 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-06-23 13:21:52 +0200 |
commit | ff708b2251ffdc209f23a2275c721532dff2fddb (patch) | |
tree | 17513964a52c58b90abb4f5b4ae98715370cd696 | |
parent | 20c7bc5cdf540094640a18f59ebb4a71bf118ea1 (diff) | |
download | weltschmerz-ff708b2251ffdc209f23a2275c721532dff2fddb.tar.gz |
Define a reasonable minimum size
Previously, in commit c49fbfb (Set minimum width and height in window
geometry, 2021-06-17), we set the minimum size of the window to one
cell. We do not yet include our fixes from 89f8571 (Calculate base_width
dynamically, 2021-06-18) and so do not account for the scrollbar when
setting the minimum size hints.
A minimum size of one cell can lead to issues like [1] when resizing
aggressively. A fix for this has been committed in [2], but not yet
merged to any release branch. Setting the minimum size to larger values
seems to work around this problem.
Therefore, define a minimum window size of 28 x 3 cells - just big
enough to still fit the search overlay. Make sure to include base_height
and base_width so that the right size will be reported to the window
manager.
[1] https://gitlab.gnome.org/GNOME/vte/-/issues/340
[2] https://gitlab.gnome.org/GNOME/vte/-/commit/b333d66879963637099dc0bc5a702f50f34da67e
-rw-r--r-- | terminal.vala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/terminal.vala b/terminal.vala index d66fc51..253dd7c 100644 --- a/terminal.vala +++ b/terminal.vala @@ -42,6 +42,9 @@ class Terminal : Gtk.Overlay { string hyperlink_match; uint? infobar_timeout_id; double scroll_delta; + + // This must be kept in sync with the padding size in terminal.css + int base_height = 2 * 2; int base_width = -1; public Terminal(string[] args, Gtk.Container parent, Gtk.Window window) { @@ -110,10 +113,9 @@ class Terminal : Gtk.Overlay { var geometry = Gdk.Geometry() { base_width = base_width, - // This must be kept in sync with the padding size in terminal.css - base_height = 2 * 2, - min_width = char_width, - min_height = char_height, + base_height = base_height, + min_width = char_width * 28 + base_width, + min_height = char_height * 3 + base_height, width_inc = char_width, height_inc = char_height }; |