From 6a44af34e1805b353b0dcdee4f66f60cbcf9ac06 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Fleury Date: Fri, 2 Dec 2011 01:20:14 +0100 Subject: [PATCH] Fix issue 773. --- NEWS.mdtext | 5 +++++ src/IDF/Diff.php | 8 ++++---- www/media/idf/css/style.css | 5 +++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NEWS.mdtext b/NEWS.mdtext index 72ea380..58cabd5 100644 --- a/NEWS.mdtext +++ b/NEWS.mdtext @@ -1,5 +1,10 @@ # InDefero 1.2.1 - XXX XXX XX XX:XX:XX UTC 201X +## Bugfixes + +- The diff view now renders properly in Firefox when a minimum font size + is configured or the user zooms the web page (fixes issue 773) + ## Language and Translations - Multiple fixes to English source strings (fixes issues 763, 766, and 772, diff --git a/src/IDF/Diff.php b/src/IDF/Diff.php index 6c76ce2..ac86934 100644 --- a/src/IDF/Diff.php +++ b/src/IDF/Diff.php @@ -184,12 +184,12 @@ class IDF_Diff $added = $added[0] + $added[1]; $leftwidth = 0; if ($added > 0) - $leftwidth = ((ceil(log10($added)) + 1) * 8) + 12; + $leftwidth = ((ceil(log10($added)) + 1) * 8) + 17; $removed = $removed[0] + $removed[1]; $rightwidth = 0; if ($removed > 0) - $rightwidth = ((ceil(log10($removed)) + 1) * 8) + 12; + $rightwidth = ((ceil(log10($removed)) + 1) * 8) + 17; // we need to correct the width of a single column a little // to take less space and to hide the empty one @@ -411,11 +411,11 @@ class IDF_Diff $leftwidth = 1; if ($max_lineno_left > 0) - $leftwidth = ((ceil(log10($max_lineno_left)) + 1) * 8) + 12; + $leftwidth = ((ceil(log10($max_lineno_left)) + 1) * 8) + 17; $rightwidth = 1; if ($max_lineno_right > 0) - $rightwidth = ((ceil(log10($max_lineno_right)) + 1) * 8) + 12; + $rightwidth = ((ceil(log10($max_lineno_right)) + 1) * 8) + 17; $inner_linecounts_left = '' ."\n". diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css index 481c3d9..8e12ddc 100644 --- a/www/media/idf/css/style.css +++ b/www/media/idf/css/style.css @@ -652,7 +652,7 @@ table.diff-contents { table.diff-linecounts tr, table.diff-contents tr { - height: 18px; + height: 22px; } table.diff-linecounts tr { @@ -664,8 +664,9 @@ table.diff-linecounts tr:first-child { } table.diff-linecounts td { + line-height: 12px; font-size: 90%; - padding: 1px 10px; + padding: 2px 10px; text-align: right; border-left: 1px solid #d3d7cf; }