Skip to content

Commit a05ac62

Browse files
committed
Fix control panel bounds
1 parent 357e2c4 commit a05ac62

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Source/UI/ControlPanel.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,8 +718,10 @@ void ControlPanel::paint (Graphics& g)
718718

719719
void ControlPanel::resized()
720720
{
721+
LOGD ("Control panel: ", getBounds().toString());
722+
721723
const int w = getWidth();
722-
const int h = 32; //getHeight();
724+
const int h = 32;
723725

724726
// We have 3 possible layout schemes:
725727
// when there are 1, 2 or 3 rows within which our elements are placed.
@@ -820,6 +822,8 @@ void ControlPanel::resized()
820822
else
821823
showHideRecordingOptionsButton->setBounds (w - 28, getHeight() - 5 - h + 10, h - 10, h - 10);
822824

825+
LOGD ("Options button: ", showHideRecordingOptionsButton->getBounds().toString());
826+
823827
createPaths();
824828

825829
if (open)
@@ -965,7 +969,7 @@ void ControlPanel::buttonClicked (Button* button)
965969
if (button == showHideRecordingOptionsButton.get())
966970
{
967971
openState (button->getToggleState());
968-
repaint();
972+
AccessClass::getUIComponent()->resized();
969973
return;
970974
}
971975

Source/UI/UIComponent.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ class UIComponent : public Component,
179179
/** Finds a child component based on a unique component ID */
180180
Component* findComponentByIDRecursive (Component* parent, const String& id);
181181

182+
/** Resizes all of components inside the UIComponent to fit the new boundaries
183+
of the MainWindow, or to account for opening/closing events.*/
184+
void resized();
185+
182186
private:
183187
ScopedPointer<DataViewport> dataViewport;
184188
ScopedPointer<SignalChainTabComponent> signalChainTabComponent;
@@ -222,10 +226,6 @@ class UIComponent : public Component,
222226
/** Pointer to the GUI's MessageCenterEditor. Owned by the MessageCenter. */
223227
MessageCenterEditor* messageCenterEditor;
224228

225-
/** Resizes all of components inside the UIComponent to fit the new boundaries
226-
of the MainWindow, or to account for opening/closing events.*/
227-
void resized();
228-
229229
/** Contains codes for common user commands to which the application must react.*/
230230
enum CommandIDs
231231
{

0 commit comments

Comments
 (0)