Skip to content

Commit 4e1ae1a

Browse files
committed
Edits to neuropixels 2.0 GUI
- Similify some GUI elements - Remove file parsing, SN and Gain display (not because they are a bad idea but because parsing is redundant with that done in the main library. To do it correctly, the main library should have a file template the compare against in a static method that can be accesssed from the GUI).
1 parent fe9db48 commit 4e1ae1a

6 files changed

+55
-157
lines changed

OpenEphys.Onix1.Design/ChannelConfigurationDialog.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ internal virtual void HighlightSelectedContacts()
668668
}
669669
}
670670

671-
internal readonly Color DisabledContactTextColor = Color.Black;
671+
internal readonly Color DisabledContactTextColor = Color.Gray;
672672
internal readonly Color EnabledContactTextColor = Color.White;
673673

674674
internal virtual void UpdateContactLabels()
@@ -683,7 +683,7 @@ internal virtual void DrawContactLabels()
683683

684684
zedGraphChannels.GraphPane.GraphObjList.RemoveAll(obj => obj is TextObj && obj.Tag is ContactTag);
685685

686-
var fontSize = CalculateFontSize();
686+
var fontSize = CalculateFontSize(0.5);
687687

688688
int probeNumber = 0;
689689

@@ -748,7 +748,7 @@ internal void UpdateFontSize()
748748
}
749749
}
750750

751-
internal virtual float CalculateFontSize()
751+
internal virtual float CalculateFontSize(double scale = 1.0)
752752
{
753753
float rangeY = (float)(zedGraphChannels.GraphPane.YAxis.Scale.Max - zedGraphChannels.GraphPane.YAxis.Scale.Min);
754754

@@ -759,7 +759,7 @@ internal virtual float CalculateFontSize()
759759
fontSize = fontSize < 1f ? 0.001f : fontSize;
760760
fontSize = fontSize > 100f ? 100f : fontSize;
761761

762-
return fontSize;
762+
return (float)scale * fontSize;
763763
}
764764

765765
internal float ContactSize()

OpenEphys.Onix1.Design/DesignHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static T DeserializeString<T>(string channelLayout)
1616

1717
public static void SerializeObject(object _object, string filepath)
1818
{
19-
var stringJson = JsonConvert.SerializeObject(_object);
19+
var stringJson = JsonConvert.SerializeObject(_object, Formatting.Indented);
2020

2121
File.WriteAllText(filepath, stringJson);
2222
}

OpenEphys.Onix1.Design/NeuropixelsV2eChannelConfigurationDialog.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ internal override void DrawScale()
184184

185185
var curve = zedGraphChannels.GraphPane.AddCurve(ScalePointsTag, pointList, Color.Black, SymbolType.None);
186186

187-
curve.Line.Width = zoomedOut ? 2 : 4;
187+
const float scaleBarWidth = 1;
188+
189+
curve.Line.Width = scaleBarWidth;
188190
curve.Label.IsVisible = false;
189191
curve.Symbol.IsVisible = false;
190192
}

0 commit comments

Comments
 (0)