1
0
Fork 0

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

View File

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

View File

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

View File

@ -231,8 +231,8 @@ void Interface(wxTreebook *book, Preferences *parent) {
auto tl_assistant = p->PageSizer(_("Translation Assistant")); auto tl_assistant = p->PageSizer(_("Translation Assistant"));
p->OptionAdd(tl_assistant, _("Skip over whitespace"), "Tool/Translation Assistant/Skip Whitespace"); p->OptionAdd(tl_assistant, _("Skip over whitespace"), "Tool/Translation Assistant/Skip Whitespace");
auto color_picker = p->PageSizer(_("Color Picker")); auto color_picker = p->PageSizer(_("Colour Picker"));
p->OptionAdd(color_picker, _("Restrict Screen Picker to Window"), "Tool/Color Picker/Restrict to Window"); p->OptionAdd(color_picker, _("Restrict Screen Picker to Window"), "Tool/Colour Picker/Restrict to Window");
p->SetSizerAndFit(p->sizer); p->SetSizerAndFit(p->sizer);
} }