cosmetic changes

This commit is contained in:
Dimitrij
2025-05-29 18:49:20 +01:00
parent 5cb07d003c
commit e58e33974a
5 changed files with 2118 additions and 1096 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -518,7 +518,7 @@ namespace BrightIdeasSoftware {
[Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public ImageList ImageListOrDefault {
get { return this.ImageList ?? this.ListView.SmallImageList; }
get { return this.ImageList ?? this.ListView.GetSmallImageList(); }
}
/// <summary>
@@ -809,7 +809,7 @@ namespace BrightIdeasSoftware {
/// <param name="g"></param>
/// <returns></returns>
protected virtual Size CalculatePrimaryCheckBoxSize(Graphics g) {
if (!this.ListView.CheckBoxes || !this.ColumnIsPrimary)
if (!this.ListView.GetCheckBoxes() || !this.ColumnIsPrimary)
return Size.Empty;
Size size = this.CalculateCheckBoxSize(g);
@@ -1299,7 +1299,7 @@ namespace BrightIdeasSoftware {
int width = 0;
// Did they hit a check box on the primary column?
if (this.ColumnIsPrimary && this.ListView.CheckBoxes) {
if (this.ColumnIsPrimary && this.ListView.GetCheckBoxes()) {
Size checkBoxSize = this.CalculateCheckBoxSize(g);
int checkBoxTop = this.AlignVertically(r, checkBoxSize.Height);
Rectangle r3 = new Rectangle(r.X, checkBoxTop, checkBoxSize.Width, checkBoxSize.Height);
@@ -1635,7 +1635,7 @@ namespace BrightIdeasSoftware {
/// <param name="r">Bounds of the cell</param>
protected virtual void DrawImageAndText(Graphics g, Rectangle r) {
int offset = 0;
if (this.ListView.CheckBoxes && this.ColumnIsPrimary) {
if (this.ListView.GetCheckBoxes() && this.ColumnIsPrimary) {
offset = this.DrawCheckBox(g, r) + 6;
r.X += offset;
r.Width -= offset;

View File

@@ -193,7 +193,7 @@ namespace BrightIdeasSoftware
// ReSharper restore DoNotCallOverridableMethodsInConstructor
// This improves hit detection even if we don't have any state image
this.SmallImageList = new ImageList();
this.SetSmallImageList(new ImageList());
// this.StateImageList.ImageSize = new Size(6, 6);
}
@@ -364,7 +364,7 @@ namespace BrightIdeasSoftware
return;
this.hierarchicalCheckboxes = value;
this.CheckBoxes = value;
this.SetCheckBoxes(value);
if (value)
this.TriStateCheckBoxes = false;
}

View File

@@ -125,7 +125,7 @@ namespace BrightIdeasSoftware
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.objectListView1.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.SingleClick;
this.objectListView1.CheckBoxes = true;
this.objectListView1.SetCheckBoxes(true);
this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.olvColumn1});
this.objectListView1.FullRowSelect = true;

View File

@@ -175,7 +175,7 @@ namespace BrightIdeasSoftware
public override IList CheckedObjects {
get {
// If we aren't should checkboxes, then no objects can be checked
if (!this.CheckBoxes)
if (!this.GetCheckBoxes())
return new ArrayList();
// If the data source has somehow vanished, we can't do anything
@@ -199,7 +199,7 @@ namespace BrightIdeasSoftware
return objects;
}
set {
if (!this.CheckBoxes)
if (!this.GetCheckBoxes())
return;
// If a custom check state getter is install, we can't use our check state management