Skip to content

Change button to "Scan Ports" #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Source/OnixSourceEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ OnixSourceEditor::OnixSourceEditor(GenericProcessor* parentNode, OnixSource* sou

const int connectWidth = 70;

connectButton = std::make_unique<UtilityButton>("CONNECT");
connectButton = std::make_unique<UtilityButton>("Scan Ports");
connectButton->setFont(fontOptionRegular);
connectButton->setBounds(headstageComboBoxB->getRight() - connectWidth, liboniVersionLabel->getY(), connectWidth, 18);
connectButton->setRadius(3.0f);
connectButton->setClickingTogglesState(true);
connectButton->setToggleState(false, dontSendNotification);
connectButton->setTooltip("Press to connect or disconnect from Onix hardware");
connectButton->setTooltip("Press to scan ports or disconnect from Onix hardware");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Press to scan ports or to power off currently connected headstages?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonnew That could work, should I update the button at all? Currently it says "Scan Ports" or "Disconnect", should the second text read as "Power Off"? I'm pretty sure that this would require increasing the size of the button to make sure that the text is all visible.

connectButton->addListener(this);
addAndMakeVisible(connectButton.get());
}
Expand Down Expand Up @@ -298,7 +298,7 @@ void OnixSourceEditor::setConnectedStatus(bool connected)
setPortStatusAndVoltageValue(PortName::PortB, 0.0, fillDisconnected, lastVoltageSetB.get(), portStatusB.get());

source->disconnectDevices(true);
connectButton->setLabel("CONNECT");
connectButton->setLabel("Scan Ports");

enableEditorElements(true);
}
Expand Down