reVeno/Source/Veno/GUI/LookAndFeel/FlatLook.cpp

23 lines
661 B
C++
Raw Normal View History

2020-04-03 13:23:19 +02:00
//
// Created by versustune on 17.03.20.
//
#include "FlatLook.h"
2020-06-14 21:14:28 +02:00
#include "../../Core/Config.h"
void FlatLook::drawButtonBackground (Graphics& graphics, Button& button, const Colour& backgroundColour,
bool shouldDrawButtonAsHighlighted, bool shouldDrawButtonAsDown)
{
auto theme = Config::getInstance()->getCurrentTheme();
auto buttonArea = button.getLocalBounds();
if (shouldDrawButtonAsHighlighted)
{
graphics.setColour(theme->getColour(ThemeColour::accent));
}
else
{
graphics.setColour(theme->getColour(ThemeColour::accent_two));
}
graphics.drawRect(buttonArea);
}