mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 18:00:26 +00:00
Reformat SwapCheckerboardColorsCommand file
This commit is contained in:
parent
e4b224a0bd
commit
1068926f7b
@ -17,37 +17,37 @@
|
||||
|
||||
namespace app {
|
||||
|
||||
class SwapCheckerboardColorsCommand : public Command {
|
||||
public:
|
||||
SwapCheckerboardColorsCommand();
|
||||
class SwapCheckerboardColorsCommand : public Command {
|
||||
public:
|
||||
SwapCheckerboardColorsCommand();
|
||||
|
||||
protected:
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
protected:
|
||||
bool onEnabled(Context* context) override;
|
||||
void onExecute(Context* context) override;
|
||||
};
|
||||
|
||||
SwapCheckerboardColorsCommand::SwapCheckerboardColorsCommand()
|
||||
: Command(CommandId::SwapCheckerboardColors(), CmdUIOnlyFlag)
|
||||
{
|
||||
}
|
||||
SwapCheckerboardColorsCommand::SwapCheckerboardColorsCommand()
|
||||
: Command(CommandId::SwapCheckerboardColors(), CmdUIOnlyFlag)
|
||||
{
|
||||
}
|
||||
|
||||
bool SwapCheckerboardColorsCommand::onEnabled(Context* context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
bool SwapCheckerboardColorsCommand::onEnabled(Context* context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void SwapCheckerboardColorsCommand::onExecute(Context* context)
|
||||
{
|
||||
DocumentPreferences& docPref = Preferences::instance().document(context->activeDocument());
|
||||
app::Color c1 = docPref.bg.color1();
|
||||
app::Color c2 = docPref.bg.color2();
|
||||
void SwapCheckerboardColorsCommand::onExecute(Context* context)
|
||||
{
|
||||
DocumentPreferences& docPref = Preferences::instance().document(context->activeDocument());
|
||||
app::Color c1 = docPref.bg.color1();
|
||||
app::Color c2 = docPref.bg.color2();
|
||||
|
||||
docPref.bg.color1(c2);
|
||||
docPref.bg.color2(c1);
|
||||
}
|
||||
Command* CommandFactory::createSwapCheckerboardColorsCommand()
|
||||
{
|
||||
return new SwapCheckerboardColorsCommand;
|
||||
}
|
||||
docPref.bg.color1(c2);
|
||||
docPref.bg.color2(c1);
|
||||
}
|
||||
Command* CommandFactory::createSwapCheckerboardColorsCommand()
|
||||
{
|
||||
return new SwapCheckerboardColorsCommand;
|
||||
}
|
||||
|
||||
} // namespace app
|
||||
|
Loading…
Reference in New Issue
Block a user