diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/PixelPaint/ImageEditor.cpp | 5 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/MainWidget.cpp | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/Userland/Applications/PixelPaint/ImageEditor.cpp b/Userland/Applications/PixelPaint/ImageEditor.cpp index 3d583ba5fe..3df1a87170 100644 --- a/Userland/Applications/PixelPaint/ImageEditor.cpp +++ b/Userland/Applications/PixelPaint/ImageEditor.cpp @@ -30,7 +30,12 @@ ImageEditor::ImageEditor(NonnullRefPtr<Image> image) m_undo_stack = make<GUI::UndoStack>(); m_undo_stack->push(make<ImageUndoCommand>(*m_image)); m_image->add_client(*this); + m_pixel_grid_threshold = (float)Config::read_i32("PixelPaint", "PixelGrid", "Threshold", 15); + m_show_pixel_grid = Config::read_bool("PixelPaint", "PixelGrid", "Show", true); + + m_show_rulers = Config::read_bool("PixelPaint", "Rulers", "Show", true); + m_show_guides = Config::read_bool("PixelPaint", "Guides", "Show", true); } ImageEditor::~ImageEditor() diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp index 144f0f71ee..e22748dc7d 100644 --- a/Userland/Applications/PixelPaint/MainWidget.cpp +++ b/Userland/Applications/PixelPaint/MainWidget.cpp @@ -12,6 +12,7 @@ #include "EditGuideDialog.h" #include "FilterParams.h" #include <Applications/PixelPaint/PixelPaintWindowGML.h> +#include <LibConfig/Client.h> #include <LibCore/File.h> #include <LibCore/MimeData.h> #include <LibFileSystemAccessClient/Client.h> @@ -339,7 +340,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) editor->set_guide_visibility(action.is_checked()); } }); - m_show_guides_action->set_checked(true); + m_show_guides_action->set_checked(Config::read_bool("PixelPaint", "Guides", "Show", true)); view_menu.add_action(*m_zoom_in_action); view_menu.add_action(*m_zoom_out_action); @@ -365,7 +366,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) if (auto* editor = current_image_editor()) editor->set_pixel_grid_visibility(action.is_checked()); }); - show_pixel_grid_action->set_checked(true); + show_pixel_grid_action->set_checked(Config::read_bool("PixelPaint", "PixelGrid", "Show", true)); view_menu.add_action(*show_pixel_grid_action); m_show_rulers_action = GUI::Action::create_checkable( @@ -374,7 +375,7 @@ void MainWidget::initialize_menubar(GUI::Window& window) editor->set_ruler_visibility(action.is_checked()); } }); - m_show_rulers_action->set_checked(true); + m_show_rulers_action->set_checked(Config::read_bool("PixelPaint", "Rulers", "Show", true)); view_menu.add_action(*m_show_rulers_action); auto& tool_menu = window.add_menu("&Tool"); |