Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVsevolod Kukol <sevoku@microsoft.com>2018-03-09 14:00:14 +0300
committerVsevolod Kukol <sevoku@microsoft.com>2018-03-09 14:00:14 +0300
commitdb25a8b0e51a5642d63e4b6d4bdf7630e4ed15fa (patch)
tree41cc790d0e17450b59ff36ebaa2b6013b05c2a10 /Xwt.XamMac/Xwt.Mac/ListViewBackend.cs
parentd3556d947e0d87dc469ae1d492a9911e24416b8f (diff)
[Mac] Improve table row height calculation
This patch reduces the amount of required recalculations while resizing rows and fixes row reallocation when the NSTableView is being resized.
Diffstat (limited to 'Xwt.XamMac/Xwt.Mac/ListViewBackend.cs')
-rw-r--r--Xwt.XamMac/Xwt.Mac/ListViewBackend.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/ListViewBackend.cs b/Xwt.XamMac/Xwt.Mac/ListViewBackend.cs
index 64bb5ddd..d4da4a8e 100644
--- a/Xwt.XamMac/Xwt.Mac/ListViewBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/ListViewBackend.cs
@@ -191,12 +191,12 @@ namespace Xwt.Mac
for (int i = 0; i < Columns.Count; i++) {
CompositeCell cell = tryReuse ? Table.GetView (i, row, false) as CompositeCell : null;
- if (cell == null)
+ if (cell == null) {
cell = (Columns [i] as TableColumn)?.DataView as CompositeCell;
-
- if (cell != null) {
cell.ObjectValue = NSNumber.FromNInt (row);
height = (nfloat)Math.Max (height, cell.FittingSize.Height);
+ } else {
+ height = (nfloat)Math.Max (height, cell.GetRequiredHeightForWidth (cell.Frame.Width));
}
}
updatingRowHeight = false;