// ディスプレイの DPI 設定を考慮したアイコンサイズ
var realIconSize = new SizeF(this._iconSz * this.currentScaleFactor.Width, this._iconSz * this.currentScaleFactor.Height);
+ var realStateSize = new SizeF(16 * this.currentScaleFactor.Width, 16 * this.currentScaleFactor.Height);
RectangleF iconRect;
RectangleF stateRect;
{
iconRect = RectangleF.Intersect(new RectangleF(e.Item.GetBounds(ItemBoundsPortion.Icon).Location, realIconSize), itemRect);
iconRect.Offset(0, Math.Max(0, (itemRect.Height - realIconSize.Height) / 2));
- stateRect = RectangleF.Intersect(new RectangleF(iconRect.X + iconRect.Width + 2, iconRect.Y, 18, 16), itemRect);
+ stateRect = RectangleF.Intersect(new RectangleF(new PointF(iconRect.X + iconRect.Width + 2, iconRect.Y), realStateSize), itemRect);
}
else
{
iconRect = RectangleF.Intersect(new RectangleF(e.Item.GetBounds(ItemBoundsPortion.Icon).Location, new Size(1, 1)), itemRect);
//iconRect.Offset(0, Math.Max(0, (itemRect.Height - realIconSize.Height) / 2));
- stateRect = RectangleF.Intersect(new RectangleF(iconRect.X + iconRect.Width + 2, iconRect.Y, 18, 16), itemRect);
+ stateRect = RectangleF.Intersect(new RectangleF(new PointF(iconRect.X + iconRect.Width + 2, iconRect.Y), realStateSize), itemRect);
}
var img = item.Image;