From 25bd040494a9a2a49c94485b82a2d61a290df5ce Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Tue, 16 Aug 2022 16:07:25 +0200 Subject: [PATCH] Fix color picker option --- src/dialog_colorpicker.cpp | 4 ++-- src/libresrc/default_config.json | 4 +--- src/libresrc/osx/default_config.json | 4 +--- src/preferences.cpp | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/dialog_colorpicker.cpp b/src/dialog_colorpicker.cpp index a9f20afef..378bbb534 100644 --- a/src/dialog_colorpicker.cpp +++ b/src/dialog_colorpicker.cpp @@ -388,7 +388,7 @@ void ColorPickerScreenDropper::DropFromScreenXY(int x, int y) { #ifndef __WXMAC__ std::unique_ptr screen; - if (!OPT_GET("Tool/Color Picker/Restrict to Window")->GetBool()) { + if (!OPT_GET("Tool/Colour Picker/Restrict to Window")->GetBool()) { screen = agi::make_unique(); } else { wxWindow *superparent = GetParent(); @@ -397,7 +397,7 @@ void ColorPickerScreenDropper::DropFromScreenXY(int x, int y) { } superparent->ScreenToClient(&x, &y); - screen = agi::make_unique(superparent); + screen = agi::make_unique(superparent); } capdc.StretchBlit(0, 0, resx * magnification, resy * magnification, screen.get(), x - resx / 2, y - resy / 2, resx, resy); diff --git a/src/libresrc/default_config.json b/src/libresrc/default_config.json index 7b8e9228e..009215701 100644 --- a/src/libresrc/default_config.json +++ b/src/libresrc/default_config.json @@ -448,6 +448,7 @@ "X" : -1, "Y" : -1 }, + "Restrict to Window" : false, "Maximized" : false }, "Fonts Collector" : { @@ -573,9 +574,6 @@ "Maximized" : false, "Skip Whitespace" : true }, - "Color Picker" : { - "Restrict to Window" : false - }, "Visual" : { "Autohide": false } diff --git a/src/libresrc/osx/default_config.json b/src/libresrc/osx/default_config.json index 9e89707b5..b282fec18 100644 --- a/src/libresrc/osx/default_config.json +++ b/src/libresrc/osx/default_config.json @@ -448,6 +448,7 @@ "X" : -1, "Y" : -1 }, + "Restrict to Window" : false, "Maximized" : false }, "Fonts Collector" : { @@ -573,9 +574,6 @@ "Maximized" : false, "Skip Whitespace" : true }, - "Color Picker" : { - "Restrict to Window" : false - }, "Visual" : { "Autohide": false } diff --git a/src/preferences.cpp b/src/preferences.cpp index d595caa63..14b84aaa6 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -228,8 +228,8 @@ void Interface(wxTreebook *book, Preferences *parent) { auto tl_assistant = p->PageSizer(_("Translation Assistant")); p->OptionAdd(tl_assistant, _("Skip over whitespace"), "Tool/Translation Assistant/Skip Whitespace"); - auto color_picker = p->PageSizer(_("Color Picker")); - p->OptionAdd(color_picker, _("Restrict Screen Picker to Window"), "Tool/Color Picker/Restrict to Window"); + auto color_picker = p->PageSizer(_("Colour Picker")); + p->OptionAdd(color_picker, _("Restrict Screen Picker to Window"), "Tool/Colour Picker/Restrict to Window"); p->SetSizerAndFit(p->sizer); }