1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

PixelPaint: Use LibConfig to allow custom pixel grid threshold

Depending on the size / scaling of the UI, someone might want to
change what the threshold is to show the pixel grid. For instance
if you are working on a 50x50 image, and want to see the grid while
still fitting the whole image in the editor.

Since there's no UI for settings in PixelPaint right now, this
commit just uses LibConfig to read the following entry:
    ("PixelPaint", "PixelGrid", "Threshold")
which is then used when drawing the grid.
This commit is contained in:
Mustafa Quraish 2021-09-11 13:40:55 -04:00 committed by Andreas Kling
parent 451cba8b47
commit 3141d51164
4 changed files with 8 additions and 3 deletions

View file

@ -6,6 +6,7 @@
*/
#include "MainWidget.h"
#include <LibConfig/Client.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/File.h>
#include <LibFileSystemAccessClient/Client.h>
@ -26,6 +27,7 @@ int main(int argc, char** argv)
}
auto app = GUI::Application::construct(argc, argv);
Config::pledge_domains("PixelPaint");
const char* image_file = nullptr;
Core::ArgsParser args_parser;