1
0
Fork 0
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:
jules 2012-12-31 19:10:54 +00:00
parent 5f8069719e
commit 7a3453f48b
32 changed files with 219 additions and 277 deletions

View file

@ -2045,9 +2045,7 @@ int LookAndFeel::getTabButtonBestWidth (TabBarButton& button, int tabDepth)
int width = Font (tabDepth * 0.6f).getStringWidth (button.getButtonText().trim())
+ getTabButtonOverlap (tabDepth) * 2;
Component* const extraComponent = button.getExtraComponent();
if (extraComponent != nullptr)
if (Component* const extraComponent = button.getExtraComponent())
width += button.getTabbedButtonBar().isVertical() ? extraComponent->getHeight()
: extraComponent->getWidth();
@ -2526,10 +2524,8 @@ void LookAndFeel::drawFileBrowserRow (Graphics& g, int width, int height,
}
else
{
const Drawable* d = isDirectory ? getDefaultFolderImage()
: getDefaultDocumentFileImage();
if (d != nullptr)
if (const Drawable* d = isDirectory ? getDefaultFolderImage()
: getDefaultDocumentFileImage())
d->drawWithin (g, Rectangle<float> (2.0f, 2.0f, x - 4.0f, height - 4.0f),
RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, 1.0f);
}