History

new optional aspect-ratio argument to snapshot chain (javascript through c++ display plugin). When non-zero, it pulls out the largest piece from the center that maintains that ratio. Snapshot button uses 1.91.

howard-stearns committed 10 years ago

Commit f6670a61 parent 01fcaa010 files · +26 −15Browse files

Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 10 files). Show all

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+3−3
@@ -204,10 +204,10 @@ void WindowScriptingInterface::copyToClipboard(const QString& text) { · 203 unmodified lines
204204 QApplication::clipboard()->setText(text);
205205 }
206206
207−void WindowScriptingInterface::takeSnapshot(bool notify) {
207+void WindowScriptingInterface::takeSnapshot(bool notify, float aspectRatio) {
208208 // only evil-doers call takeSnapshot from a random thread
209− qApp->postLambdaEvent([notify] {
210− qApp->takeSnapshot(notify);
209+ qApp->postLambdaEvent([notify, aspectRatio] {
210+ qApp->takeSnapshot(notify, aspectRatio);
211211 });
212212 }
213213