[banshee] [ListView] Fix column size calculation
- From: Alexander Kojevnikov <alexk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] [ListView] Fix column size calculation
- Date: Thu, 12 Nov 2009 01:22:40 +0000 (UTC)
commit 5e6e3b8da988de56079812efc31f9a3bc9236581
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date: Thu Nov 12 12:08:29 2009 +1100
[ListView] Fix column size calculation
RecalculateColumnSizes() stops adapting the column sizes when
first value of remaining_width is negative. This always happens if
there are several fixed-width columns (e.g. year, bitrate and rating)
at the end of the list view. The result is that these columns are
allocated less space than they require.
The fix changes the method so that it continues refitting the columns
until remaining_width is close to zero.
.../Hyena.Data.Gui/ListView/ListView_Header.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
index 6450d57..a85279a 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Header.cs
@@ -200,7 +200,7 @@ namespace Hyena.Data.Gui
double remaining_width = RecalculateColumnSizes (header_width, header_width);
- while (remaining_width > 0 && elastic_columns.Count > 0) {
+ while (Math.Round (remaining_width) != 0.0 && elastic_columns.Count > 0) {
double total_elastic_width = 0.0;
foreach (int i in elastic_columns) {
total_elastic_width += column_cache[i].ElasticWidth;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]