Skip to content

Commit

Permalink
More numberbox improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Feb 14, 2025
1 parent ab48784 commit 5e06b19
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
18 changes: 8 additions & 10 deletions Source/Components/DraggableNumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,17 @@ class DraggableNumber : public Component, public TextEditor::Listener
{
minimumHorizontalScale = newScale;
}

void setJustificationType(Justification just)
{
// TODO: implement this!
}


void setText(String const& newText, NotificationType notification)
{
hideEditor(false);

currentValue = newText;
repaint();

//onTextChange();
// TODO: send notification!
if(notification == sendNotification) {
onTextChange();
}
}

TextEditor* getCurrentTextEditor()
Expand Down Expand Up @@ -275,6 +273,7 @@ class DraggableNumber : public Component, public TextEditor::Listener
std::swap (outgoingEditor, editor);

if(!discardCurrentEditorContents) {
decimalDrag = 0;
updateFromTextEditorContents (*outgoingEditor);
}

Expand Down Expand Up @@ -342,9 +341,8 @@ class DraggableNumber : public Component, public TextEditor::Listener

if (!approximatelyEqual(lastValue, newValue) && notification != dontSendNotification) {
onValueChange(newValue);
lastValue = newValue;
}

lastValue = newValue;
}

double getValue() const
Expand Down
2 changes: 0 additions & 2 deletions Source/Objects/ListObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ class ListObject final : public ObjectBase {
{
listLabel.setBounds(2, 0, getWidth() - 2, getHeight() - 1);
listLabel.setMinimumHorizontalScale(1.f);
listLabel.setJustificationType(Justification::centredLeft);
// listLabel.setBorderSize(BorderSize<int>(2, 6, 2, 2));

addAndMakeVisible(listLabel);

Expand Down
1 change: 0 additions & 1 deletion Source/Sidebar/AutomationPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ class AutomationItem final : public ObjectDragAndDrop
};

valueLabel.setMinimumHorizontalScale(1.0f);
valueLabel.setJustificationType(Justification::centred);

nameLabel.setMinimumHorizontalScale(1.0f);
nameLabel.setJustificationType(Justification::centred);
Expand Down

0 comments on commit 5e06b19

Please sign in to comment.