Fix color picker option
This commit is contained in:
parent
2c296afdb8
commit
25bd040494
4 changed files with 6 additions and 10 deletions
|
@ -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);
|
||||||
|
|
|
@ -448,6 +448,7 @@
|
||||||
"X" : -1,
|
"X" : -1,
|
||||||
"Y" : -1
|
"Y" : -1
|
||||||
},
|
},
|
||||||
|
"Restrict to Window" : false,
|
||||||
"Maximized" : false
|
"Maximized" : false
|
||||||
},
|
},
|
||||||
"Fonts Collector" : {
|
"Fonts Collector" : {
|
||||||
|
@ -573,9 +574,6 @@
|
||||||
"Maximized" : false,
|
"Maximized" : false,
|
||||||
"Skip Whitespace" : true
|
"Skip Whitespace" : true
|
||||||
},
|
},
|
||||||
"Color Picker" : {
|
|
||||||
"Restrict to Window" : false
|
|
||||||
},
|
|
||||||
"Visual" : {
|
"Visual" : {
|
||||||
"Autohide": false
|
"Autohide": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -448,6 +448,7 @@
|
||||||
"X" : -1,
|
"X" : -1,
|
||||||
"Y" : -1
|
"Y" : -1
|
||||||
},
|
},
|
||||||
|
"Restrict to Window" : false,
|
||||||
"Maximized" : false
|
"Maximized" : false
|
||||||
},
|
},
|
||||||
"Fonts Collector" : {
|
"Fonts Collector" : {
|
||||||
|
@ -573,9 +574,6 @@
|
||||||
"Maximized" : false,
|
"Maximized" : false,
|
||||||
"Skip Whitespace" : true
|
"Skip Whitespace" : true
|
||||||
},
|
},
|
||||||
"Color Picker" : {
|
|
||||||
"Restrict to Window" : false
|
|
||||||
},
|
|
||||||
"Visual" : {
|
"Visual" : {
|
||||||
"Autohide": false
|
"Autohide": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,8 +228,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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue