mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:52:45 +00:00 
			
		
		
		
	 e8dbb1a8b2
			
		
	
	
		e8dbb1a8b2
		
	
	
	
	
		
			
			This now allows you to select a background color for your new image, and optionally allows saving that default. You can pick between Transparent, White, Black, or a custom color (similar to other editors).
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			721 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			721 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Ben Jilks <benjyjilks@gmail.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibGUI/Dialog.h>
 | |
| #include <LibGfx/Color.h>
 | |
| 
 | |
| namespace PixelPaint {
 | |
| 
 | |
| class CreateNewImageDialog final : public GUI::Dialog {
 | |
|     C_OBJECT(CreateNewImageDialog)
 | |
| 
 | |
| public:
 | |
|     Gfx::IntSize image_size() const { return m_image_size; }
 | |
|     DeprecatedString const& image_name() const { return m_image_name; }
 | |
|     Gfx::Color background_color() const { return m_background_color; }
 | |
| 
 | |
| private:
 | |
|     CreateNewImageDialog(GUI::Window* parent_window);
 | |
| 
 | |
|     DeprecatedString m_image_name;
 | |
|     Gfx::IntSize m_image_size;
 | |
|     Gfx::Color m_background_color {};
 | |
| 
 | |
|     RefPtr<GUI::TextBox> m_name_textbox;
 | |
| };
 | |
| 
 | |
| }
 |