mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Minor clean-ups.
This commit is contained in:
parent
12c28fd882
commit
910b834f72
19 changed files with 95 additions and 57 deletions
|
|
@ -27,13 +27,13 @@ class FileChooserDialogBox::ContentComponent : public Component
|
|||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
ContentComponent (const String& name, const String& instructions_, FileBrowserComponent& chooserComponent_)
|
||||
ContentComponent (const String& name, const String& desc, FileBrowserComponent& chooser)
|
||||
: Component (name),
|
||||
chooserComponent (chooserComponent_),
|
||||
okButton (chooserComponent_.getActionVerb()),
|
||||
chooserComponent (chooser),
|
||||
okButton (chooser.getActionVerb()),
|
||||
cancelButton (TRANS ("Cancel")),
|
||||
newFolderButton (TRANS ("New Folder")),
|
||||
instructions (instructions_)
|
||||
instructions (desc)
|
||||
{
|
||||
addAndMakeVisible (&chooserComponent);
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ void FilenameComponent::paintOverChildren (Graphics& g)
|
|||
if (isFileDragOver)
|
||||
{
|
||||
g.setColour (Colours::red.withAlpha (0.2f));
|
||||
g.drawRect (0, 0, getWidth(), getHeight(), 3);
|
||||
g.drawRect (getLocalBounds(), 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,13 +62,11 @@ void ImagePreviewComponent::timerCallback()
|
|||
currentDetails = String::empty;
|
||||
repaint();
|
||||
|
||||
ScopedPointer <FileInputStream> in (fileToLoad.createInputStream());
|
||||
ScopedPointer<FileInputStream> in (fileToLoad.createInputStream());
|
||||
|
||||
if (in != nullptr)
|
||||
{
|
||||
ImageFileFormat* const format = ImageFileFormat::findImageFormatForStream (*in);
|
||||
|
||||
if (format != nullptr)
|
||||
if (ImageFileFormat* const format = ImageFileFormat::findImageFormatForStream (*in))
|
||||
{
|
||||
currentThumbnail = format->decodeImage (*in);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue