mirror of
https://gitee.com/AntdUI/AntdUI.git
synced 2026-03-28 16:40:43 +08:00
🦄 Beautiful AntdUI
This commit is contained in:
@@ -444,6 +444,8 @@ namespace Demo
|
||||
return "FixedHeader";
|
||||
case "Table.checkColumnDragSort":
|
||||
return "ColumnDragSort";
|
||||
case "Table.checkRowsDragSort":
|
||||
return "RowsDragSort";
|
||||
case "Table.checkBordered":
|
||||
return "Bordered";
|
||||
case "Table.checkSetRowStyle":
|
||||
|
||||
@@ -321,7 +321,14 @@ namespace AntdUI.Core
|
||||
|
||||
#region Fill
|
||||
|
||||
public void Fill(Brush brush, GraphicsPath path) => g.FillPath(brush, path);
|
||||
public void Fill(Brush brush, GraphicsPath path)
|
||||
{
|
||||
try
|
||||
{
|
||||
g.FillPath(brush, path);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
public void Fill(Brush brush, Rectangle rect) => g.FillRectangle(brush, rect);
|
||||
public void Fill(Brush brush, int x, int y, int w, int h) => g.FillRectangle(brush, x, y, w, h);
|
||||
public void Fill(Brush brush, RectangleF rect) => g.FillRectangle(brush, rect);
|
||||
|
||||
@@ -81,7 +81,8 @@ namespace AntdUI
|
||||
has_check = false;
|
||||
if (dataTmp == null)
|
||||
{
|
||||
ThreadState?.Dispose(); ThreadState = null;
|
||||
ThreadState?.Dispose();
|
||||
ThreadState = null;
|
||||
if (visibleHeader && emptyHeader && columns != null && columns.Count > 0)
|
||||
{
|
||||
var _rows = LayoutDesign(new TempTable(new TempiColumn[0], new IRow[0]), out var _columns, out int processing, out var col_width, out int KeyTreeINDEX);
|
||||
@@ -215,6 +216,7 @@ namespace AntdUI
|
||||
dataOne = false;
|
||||
return _rows;
|
||||
}
|
||||
|
||||
RowTemplate[] LayoutDesign(Rectangle rect, List<RowTemplate> _rows, List<Column> _columns, Dictionary<int, object> col_width, int KeyTreeINDEX, out int _x, out int _y, out bool _is_exceed)
|
||||
{
|
||||
if (rows != null)
|
||||
@@ -279,24 +281,19 @@ namespace AntdUI
|
||||
{
|
||||
var it = row.cells[cel_i];
|
||||
it.INDEX = cel_i;
|
||||
if (it is TCellCheck check && check.NoTitle)
|
||||
var text_size = it.GetSize(g, columnfont ?? Font, rect.Width, gap, gap2);
|
||||
if (it.COLUMN is ColumnCheck check)
|
||||
{
|
||||
if (max_height < gap2) max_height = gap2;
|
||||
read_width_cell[cel_i].value = -1;
|
||||
}
|
||||
else if (it.COLUMN is ColumnSort)
|
||||
{
|
||||
if (max_height < gap2) max_height = gap2;
|
||||
read_width_cell[cel_i].value = -2;
|
||||
if (check.NoTitle) read_width_cell[cel_i].value = -1;
|
||||
}
|
||||
else if (it.COLUMN is ColumnSort) read_width_cell[cel_i].value = -2;
|
||||
else
|
||||
{
|
||||
var text_size = it.GetSize(g, columnfont ?? Font, rect.Width, gap, gap2);
|
||||
int width = text_size.Width;
|
||||
if (max_height < text_size.Height) max_height = text_size.Height;
|
||||
if (read_width_cell[cel_i].value < width) read_width_cell[cel_i].value = width;
|
||||
if (read_width_cell[cel_i].minvalue < it.MinWidth) read_width_cell[cel_i].minvalue = it.MinWidth;
|
||||
}
|
||||
if (max_height < text_size.Height) max_height = text_size.Height;
|
||||
}
|
||||
if (rowHeightHeader.HasValue) row.Height = (int)(rowHeightHeader.Value * dpi);
|
||||
else if (rowHeight.HasValue) row.Height = (int)(rowHeight.Value * dpi);
|
||||
@@ -313,13 +310,11 @@ namespace AntdUI
|
||||
if (check.NoTitle)
|
||||
{
|
||||
if (max_height < gap2) max_height = gap2;
|
||||
read_width_cell[cel_i].value = -1;
|
||||
}
|
||||
}
|
||||
else if (it.COLUMN is ColumnSort)
|
||||
{
|
||||
if (max_height < gap2) max_height = gap2;
|
||||
read_width_cell[cel_i].value = -2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -37,8 +37,11 @@ namespace AntdUI
|
||||
public LayeredFormContextMenuStrip(ContextMenuStrip.Config _config)
|
||||
{
|
||||
PARENT = _config.Control;
|
||||
MessageCloseMouseLeave = true;
|
||||
if (_config.TopMost) Helper.SetTopMost(Handle);
|
||||
if (_config.TopMost)
|
||||
{
|
||||
Helper.SetTopMost(Handle);
|
||||
MessageCloseMouseLeave = true;
|
||||
}
|
||||
else _config.Control.SetTopMost(Handle);
|
||||
var point = _config.Location ?? MousePosition;
|
||||
maxalpha = 250;
|
||||
|
||||
Reference in New Issue
Block a user