mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 21:19:18 +00:00
Remove the number of colors entry field from "New Sprite" dialog
This field is disabled, and the program isn't ready to support less than 256 colors in Indexed mode, so it's better if we remove this field to avoid confusion.
This commit is contained in:
parent
81d30fb24d
commit
5a45d1ec23
@ -15,11 +15,11 @@
|
||||
<separator text="Color Mode:" left="true" horizontal="true" />
|
||||
<box vertical="true" homogeneous="true" childspacing="0">
|
||||
<box horizontal="true">
|
||||
<radio id="radio3" text="&Indexed with " group="1" tooltip="Using a palette of 256 colors (8 bits per pixel)" />
|
||||
<entry id="colors" maxsize="8" tooltip="Maximum number of colors (only for Indexed images) This field cannot be modified in this beta version." disabled="true" />
|
||||
<label text="Colors" />
|
||||
<radio id="radio3" text="&Indexed color" group="1" tooltip="Using a palette of 256 colors (8 bits per pixel)" />
|
||||
<!-- <entry id="colors" maxsize="8" tooltip="Maximum number of colors (only for Indexed images) This field cannot be modified in this beta version." disabled="true" /> -->
|
||||
<!-- <label text="Colors" /> -->
|
||||
</box>
|
||||
<radio id="radio1" text="&RGB Color" group="1" tooltip="RGBA color mode (32 bits per pixel)" />
|
||||
<radio id="radio1" text="&RGB color" group="1" tooltip="RGBA color mode (32 bits per pixel)" />
|
||||
<radio id="radio2" text="&Grayscale" group="1" tooltip="Value and Alpha (16 bits per pixel)" />
|
||||
</box>
|
||||
|
||||
|
@ -76,7 +76,7 @@ NewFileCommand::NewFileCommand()
|
||||
void NewFileCommand::onExecute(Context* context)
|
||||
{
|
||||
PixelFormat format;
|
||||
int w, h, bg, ncolors;
|
||||
int w, h, bg, ncolors = raster::Palette::MaxColors;
|
||||
char buf[1024];
|
||||
app::Color bg_table[] = {
|
||||
app::Color::fromMask(),
|
||||
@ -93,7 +93,7 @@ void NewFileCommand::onExecute(Context* context)
|
||||
Widget* radio1 = app::find_widget<Widget>(window, "radio1");
|
||||
Widget* radio2 = app::find_widget<Widget>(window, "radio2");
|
||||
Widget* radio3 = app::find_widget<Widget>(window, "radio3");
|
||||
Widget* colors = app::find_widget<Widget>(window, "colors");
|
||||
// Widget* colors = app::find_widget<Widget>(window, "colors");
|
||||
ListBox* bg_box = app::find_widget<ListBox>(window, "bg_box");
|
||||
Widget* ok = app::find_widget<Widget>(window, "ok_button");
|
||||
|
||||
@ -106,7 +106,7 @@ void NewFileCommand::onExecute(Context* context)
|
||||
w = get_config_int("NewSprite", "Width", 320);
|
||||
h = get_config_int("NewSprite", "Height", 240);
|
||||
bg = get_config_int("NewSprite", "Background", 4); // Default = Background color
|
||||
ncolors = get_config_int("NewSprite", "Colors", 256);
|
||||
// ncolors = get_config_int("NewSprite", "Colors", 256);
|
||||
|
||||
// If the clipboard contains an image, we can show the size of the
|
||||
// clipboard as default image size.
|
||||
@ -118,7 +118,7 @@ void NewFileCommand::onExecute(Context* context)
|
||||
|
||||
width->setTextf("%d", MAX(1, w));
|
||||
height->setTextf("%d", MAX(1, h));
|
||||
colors->setTextf("%d", MID(2, ncolors, 256));
|
||||
// colors->setTextf("%d", MID(2, ncolors, 256));
|
||||
|
||||
// Select image-type
|
||||
switch (format) {
|
||||
@ -143,7 +143,7 @@ void NewFileCommand::onExecute(Context* context)
|
||||
|
||||
w = width->getTextInt();
|
||||
h = height->getTextInt();
|
||||
ncolors = colors->getTextInt();
|
||||
// ncolors = colors->getTextInt();
|
||||
bg = bg_box->getSelectedIndex();
|
||||
|
||||
w = MID(1, w, 65535);
|
||||
@ -190,7 +190,8 @@ void NewFileCommand::onExecute(Context* context)
|
||||
layerImage->configureAsBackground();
|
||||
|
||||
Image* image = sprite->getStock()->getImage(layerImage->getCel(FrameNumber(0))->getImage());
|
||||
raster::clear_image(image, color_utils::color_for_image(color, format));
|
||||
raster::clear_image(image,
|
||||
color_utils::color_for_image(color, format, -1));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user