Minor changes in style/formatting

This commit is contained in:
David Capello 2019-03-11 11:48:13 -03:00
parent 41707c103d
commit e4117d05c5
4 changed files with 12 additions and 22 deletions

View File

@ -1,16 +1,17 @@
<!-- Aseprite -->
<!-- Copyright (C) 2019 by Igara Studio S.A. -->
<!-- Copyright (C) 2001-2016 by David Capello -->
<gui>
<box vertical="true" expansive="true" id="controls">
<box horizontal="true" expansive="true">
<vbox expansive="true" id="controls">
<hbox expansive="true">
<grid columns="2" id="controls">
<label text="@replace_color.from" />
<colorpicker id="from" cell_align="horizontal" />
<label text="@replace_color.to" />
<colorpicker id="to" cell_align="horizontal" />
</grid>
</box>
</hbox>
<label text="@replace_color.tolerance" />
<slider min="0" max="255" id="tolerance" />
</box>
</vbox>
</gui>

View File

@ -66,19 +66,16 @@ public:
}
private:
void onReloadStock(Event& ev)
{
void onReloadStock(Event& ev) {
m_stock.reloadStock();
fillStockListBox();
}
void setupTiledMode(TiledMode tiledMode)
{
void setupTiledMode(TiledMode tiledMode) override {
m_filter.setTiledMode(tiledMode);
}
void fillStockListBox()
{
void fillStockListBox() {
const char* oldSelected = (m_filter.getMatrix() ? m_filter.getMatrix()->getName(): NULL);
// Clean the list

View File

@ -72,8 +72,7 @@ private:
restartPreview();
}
void setupTiledMode(TiledMode tiledMode)
{
void setupTiledMode(TiledMode tiledMode) override {
m_filter.setTiledMode(tiledMode);
}

View File

@ -34,7 +34,6 @@ namespace {
div = matrix->getDiv();
matrixData = &matrix->value(0, 0);
}
};
struct GetPixelsDelegateRgba : public GetPixelsDelegate {
@ -45,8 +44,7 @@ namespace {
r = g = b = a = 0;
}
void operator()(RgbTraits::pixel_t color)
{
void operator()(RgbTraits::pixel_t color) {
if (*matrixData) {
if (rgba_geta(color) == 0)
div -= *matrixData;
@ -59,7 +57,6 @@ namespace {
}
matrixData++;
}
};
struct GetPixelsDelegateGrayscale : public GetPixelsDelegate {
@ -70,8 +67,7 @@ namespace {
v = a = 0;
}
void operator()(GrayscaleTraits::pixel_t color)
{
void operator()(GrayscaleTraits::pixel_t color) {
if (*matrixData) {
if (graya_geta(color) == 0)
div -= *matrixData;
@ -82,7 +78,6 @@ namespace {
}
matrixData++;
}
};
struct GetPixelsDelegateIndexed : public GetPixelsDelegate {
@ -96,8 +91,7 @@ namespace {
r = g = b = a = index = 0;
}
void operator()(IndexedTraits::pixel_t color)
{
void operator()(IndexedTraits::pixel_t color) {
if (*matrixData) {
index += color * (*matrixData);
color_t rgba = pal->getEntry(color);
@ -112,7 +106,6 @@ namespace {
}
matrixData++;
}
};
}