Skip to content

Commit

Permalink
Small inspector fixes
Browse files Browse the repository at this point in the history
timothyschoen committed Dec 9, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent ad964a8 commit cf32e37
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Source/Components/PropertiesPanel.h
Original file line number Diff line number Diff line change
@@ -677,6 +677,7 @@ class PropertiesPanel : public Component {
addAndMakeVisible(hexValueEditor);
hexValueEditor.setJustificationType(Justification::centred);
hexValueEditor.setInterceptsMouseClicks(false, true);
hexValueEditor.setFont(Fonts::getCurrentFont().withHeight(13.5f));

hexValueEditor.onEditorShow = [this](){
hexValueEditor.getCurrentTextEditor()->setInputRestrictions(7, "#0123456789ABCDEFabcdef");
2 changes: 1 addition & 1 deletion Source/Objects/ArrayObject.h
Original file line number Diff line number Diff line change
@@ -735,7 +735,7 @@ struct ArrayPropertiesPanel : public PropertiesPanelProperty
addAndMakeVisible(properties.add(new PropertiesPanel::EditableComponent<String>("Name", graph->name)));
addAndMakeVisible(properties.add(new PropertiesPanel::EditableComponent<int>("Size", graph->size)));
addAndMakeVisible(properties.add(new PropertiesPanel::RangeComponent("Range", graph->range, false)));
addAndMakeVisible(properties.add(new PropertiesPanel::BoolComponent("Save contents", graph->saveContents, { "No", "Yes" })));
addAndMakeVisible(properties.add(new PropertiesPanel::InspectorBoolComponent("Save contents", graph->saveContents, { "No", "Yes" })));
addAndMakeVisible(properties.add(new PropertiesPanel::ComboComponent("Draw Style", graph->drawMode, { "Points", "Polygon", "Bezier curve" })));

// To detect name changes, so we can redraw the array title
2 changes: 1 addition & 1 deletion Source/Sidebar/Inspector.h
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ class Inspector : public Component {
Inspector()
: redirector(this)
{
panel.setTitleHeight(22);
panel.setTitleHeight(23);
panel.setTitleAlignment(PropertiesPanel::AlignWithPropertyName);
panel.setDrawShadowAndOutline(false);
addAndMakeVisible(panel);

0 comments on commit cf32e37

Please sign in to comment.