[PATCH 1/2] gitk: limit factor scaling on resize to widths below 1900px

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If old and new width is above 1900, the scaling would result in widening
the author and date column unnecessarily.

Signed-off-by: Georg Müller <georgmueller@xxxxxxx>
---
 gitk-git/gitk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index df3ba2ea99..0f229aadd7 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2985,6 +2985,9 @@ proc resizeclistpanes {win w} {
             set s0 [$win sash coord 0]
             set s1 [$win sash coord 1]
         }
+        if {$oldwidth($win) > 1900 && $w > 1900} {
+            return
+        }
         if {$w < 60} {
             set sash0 [expr {int($w/2 - 2)}]
             set sash1 [expr {int($w*5/6 - 2)}]
@@ -3029,6 +3032,9 @@ proc resizecdetpanes {win w} {
         } else {
             set s0 [$win sash coord 0]
         }
+        if {$oldwidth($win) > 1900 && $w > 1900} {
+            return
+        }
         if {$w < 60} {
             set sash0 [expr {int($w*3/4 - 2)}]
         } else {
--
2.41.0





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux