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:
parent
2d103ce8f2
commit
b096c16c04
1 changed files with 7 additions and 4 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue