From dd066c3ec1d797764f40ac5f832e4f769ead7666 Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Fri, 18 Mar 2016 15:30:49 +0400 Subject: [PATCH] Fix simu screenshot size for Horus --- companion/src/simulation/lcdwidget.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/companion/src/simulation/lcdwidget.h b/companion/src/simulation/lcdwidget.h index 12dbbc8bb..9cfa6aabd 100644 --- a/companion/src/simulation/lcdwidget.h +++ b/companion/src/simulation/lcdwidget.h @@ -62,7 +62,16 @@ class LcdWidget : public QWidget void makeScreenshot(const QString & fileName) { - QPixmap buffer(2*lcdWidth, 2*lcdHeight); + int width, height; + if (lcdDepth < 12) { + width = 2 * lcdWidth; + height = 2 * lcdHeight; + } + else { + width = lcdWidth; + height = lcdHeight; + } + QPixmap buffer(width, height); QPainter p(&buffer); doPaint(p); bool toclipboard = g.snapToClpbrd();