1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-22 01:34:21 +00:00

FileBrowserComponent: Fix issue where up button was hidden after changing the look and feel

This commit is contained in:
reuk 2020-06-30 17:23:49 +01:00
parent 2d103ce8f2
commit b096c16c04

View file

@ -117,10 +117,6 @@ FileBrowserComponent::FileBrowserComponent (int flags_,
lookAndFeelChanged();
addAndMakeVisible (goUpButton.get());
goUpButton->onClick = [this] { goUp(); };
goUpButton->setTooltip (TRANS ("Go up to parent directory"));
setRoot (currentRoot);
if (filename.isNotEmpty())
@ -359,6 +355,13 @@ void FileBrowserComponent::lookAndFeelChanged()
{
goUpButton.reset (getLookAndFeel().createFileBrowserGoUpButton());
if (auto* buttonPtr = goUpButton.get())
{
addAndMakeVisible (*buttonPtr);
buttonPtr->onClick = [this] { goUp(); };
buttonPtr->setTooltip (TRANS ("Go up to parent directory"));
}
currentPathBox.setColour (ComboBox::backgroundColourId, findColour (currentPathBoxBackgroundColourId));
currentPathBox.setColour (ComboBox::textColourId, findColour (currentPathBoxTextColourId));
currentPathBox.setColour (ComboBox::arrowColourId, findColour (currentPathBoxArrowColourId));