Merge branch 'color_picker_fix2' into feature

This commit is contained in:
arch1t3cht 2022-08-16 16:09:13 +02:00
commit 44888d9b70
4 changed files with 6 additions and 10 deletions

View file

@ -388,7 +388,7 @@ void ColorPickerScreenDropper::DropFromScreenXY(int x, int y) {
#ifndef __WXMAC__
std::unique_ptr<wxDC> 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<wxScreenDC>();
} else {
wxWindow *superparent = GetParent();
@ -397,7 +397,7 @@ void ColorPickerScreenDropper::DropFromScreenXY(int x, int y) {
}
superparent->ScreenToClient(&x, &y);
screen = agi::make_unique<wxWindowDC>(superparent);
screen = agi::make_unique<wxClientDC>(superparent);
}
capdc.StretchBlit(0, 0, resx * magnification, resy * magnification,
screen.get(), x - resx / 2, y - resy / 2, resx, resy);

View file

@ -451,6 +451,7 @@
"X" : -1,
"Y" : -1
},
"Restrict to Window" : false,
"Maximized" : false
},
"Fonts Collector" : {
@ -576,9 +577,6 @@
"Maximized" : false,
"Skip Whitespace" : true
},
"Color Picker" : {
"Restrict to Window" : false
},
"Visual" : {
"Autohide": false
},

View file

@ -450,6 +450,7 @@
"X" : -1,
"Y" : -1
},
"Restrict to Window" : false,
"Maximized" : false
},
"Fonts Collector" : {
@ -575,9 +576,6 @@
"Maximized" : false,
"Skip Whitespace" : true
},
"Color Picker" : {
"Restrict to Window" : false
},
"Visual" : {
"Autohide": false
},

View file

@ -231,8 +231,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);
}