refactor: Update GUI components and integrate new palette widget

- Removed references to the old `EnhancedPaletteEditor` and replaced it with the new `PaletteWidget` across various files, including canvas and context menu implementations.
- Updated CMake configurations to include the new `palette_widget` source files, ensuring proper integration into the build system.
- Refactored GUI code to enhance modularity and maintainability, improving the overall user experience in palette management and editing functionalities.
- Introduced new UI components for background rendering and editor selection dialogs, enhancing the application's graphical interface.
This commit is contained in:
scawful
2025-10-04 23:59:08 -04:00
parent bcc8f8e8f9
commit 6c0e7a96a5
21 changed files with 1536 additions and 55 deletions

View File

@@ -6,7 +6,7 @@
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance_dashboard.h"
#include "app/gui/enhanced_palette_editor.h"
#include "app/gui/widgets/palette_widget.h"
#include "app/gui/bpp_format_ui.h"
#include "app/gui/icons.h"
#include "app/gui/canvas/canvas_modals.h"

View File

@@ -6,7 +6,7 @@
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance_dashboard.h"
#include "app/gui/enhanced_palette_editor.h"
#include "app/gui/widgets/palette_widget.h"
#include "app/gui/bpp_format_ui.h"
#include "app/gui/icons.h"
#include "imgui/imgui.h"
@@ -421,9 +421,9 @@ void CanvasModals::RenderPaletteEditorModal(const std::string& canvas_id,
ImGui::Text("%s %s", ICON_MD_PALETTE, modal_title.c_str());
ImGui::Separator();
// Use the existing EnhancedPaletteEditor
static std::unique_ptr<gui::EnhancedPaletteEditor> palette_editor =
std::make_unique<gui::EnhancedPaletteEditor>();
// Use the existing PaletteWidget
static std::unique_ptr<gui::PaletteWidget> palette_editor =
std::make_unique<gui::PaletteWidget>();
if (options.palette) {
palette_editor->ShowPaletteEditor(*options.palette, modal_title);
@@ -454,9 +454,9 @@ void CanvasModals::RenderColorAnalysisModal(const std::string& canvas_id,
ImGui::Text("%s %s", ICON_MD_ZOOM_IN, modal_title.c_str());
ImGui::Separator();
// Use the existing EnhancedPaletteEditor for color analysis
static std::unique_ptr<gui::EnhancedPaletteEditor> palette_editor =
std::make_unique<gui::EnhancedPaletteEditor>();
// Use the existing PaletteWidget for color analysis
static std::unique_ptr<gui::PaletteWidget> palette_editor =
std::make_unique<gui::PaletteWidget>();
if (options.bitmap) {
palette_editor->ShowColorAnalysis(*options.bitmap, modal_title);