Skip to content

Commit d781f01

Browse files
committed
Refactor LfpChannelDisplayInfo to improve channel name rendering
- Makes the channel dsiplay info a single component instead of one per channel - Prevents clipping of channel names when channel height is very small
1 parent 5c78f53 commit d781f01

7 files changed

Lines changed: 264 additions & 267 deletions

File tree

Plugins/LfpViewer/LfpChannelDisplay.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ void LfpChannelDisplay::drawEventOverlay (const int rawEventState, int x, int yf
690690
{
691691
if (display->getEventDisplayState (ev_ch) && (rawEventState & (1 << ev_ch)))
692692
{
693-
g.setColour (display->channelColours[ev_ch * 2].withAlpha (0.3f));
693+
g.setColour (display->channelColours[ev_ch * 2].withAlpha (0.5f));
694694
g.fillRect (x, yfrom, 1, yto - yfrom + 1);
695695
}
696696
}

Plugins/LfpViewer/LfpChannelDisplay.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ class LfpChannelDisplay : public Component
101101
/** Sets the colour for this channel's trace */
102102
void setColour (Colour c);
103103

104+
/** Returns the colour used for this channel's trace */
105+
Colour getColour() const { return lineColour; }
106+
104107
/** Sets the height for this channel */
105108
void setChannelHeight (int);
106109

@@ -163,6 +166,9 @@ class LfpChannelDisplay : public Component
163166
/** Returns the enabled state for this channel*/
164167
bool getEnabledState() { return isEnabled; }
165168

169+
/** Returns whether this channel is recorded */
170+
bool getRecorded() const { return isRecorded; }
171+
166172
/** Set the isHidden flag, indicates whether this channel display
167173
should render to screen or not */
168174
void setHidden (bool);

0 commit comments

Comments
 (0)