Release v0.6.2: configurable screenshot editor and DPI fixes
This commit is contained in:
+9
-4
@@ -127,6 +127,7 @@ struct Capture
|
||||
std::unique_ptr<Surface> image;
|
||||
std::unique_ptr<Surface> dimmed, frame;
|
||||
bool editing{}, dragging{}, arrow{}, owned{}, copied{};
|
||||
bool autoOpenEditor;
|
||||
bool highlight{};
|
||||
bool freehand=true;
|
||||
bool straight{}, textTool{};
|
||||
@@ -161,7 +162,7 @@ struct Capture
|
||||
int hoveredTool=0;
|
||||
MarkPart hoveredPart=MarkPart::None;
|
||||
std::wstring statusText;
|
||||
explicit Capture(ScreenshotHost &a) : app(a) {}
|
||||
explicit Capture(ScreenshotHost &a) : app(a), autoOpenEditor(a.autoOpenEditor) {}
|
||||
~Capture() {
|
||||
if(pencilCursor) DestroyCursor(pencilCursor);
|
||||
if (font) DeleteObject(font);
|
||||
@@ -812,9 +813,13 @@ void finishSelection(HWND w,Capture &c,DWORD (*publish)(HWND,const Clip &)=write
|
||||
auto clip=screenshotClip(cropped.dc,cropped.width,cropped.height,{});
|
||||
publish(c.app.window,clip);
|
||||
c.copied=true;
|
||||
ShowWindow(w,SW_HIDE);
|
||||
if(c.app.notify(clip)) DestroyWindow(w);
|
||||
else edit(w,c);
|
||||
// A successful toast submission does not guarantee that Windows shows a banner.
|
||||
if(c.autoOpenEditor) edit(w,c);
|
||||
bool notified=c.app.notify(clip);
|
||||
if(!c.autoOpenEditor) {
|
||||
if(notified) DestroyWindow(w);
|
||||
else edit(w,c);
|
||||
}
|
||||
}
|
||||
LRESULT CALLBACK captureProc(HWND w, UINT msg, WPARAM wp, LPARAM lp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user