Fixed problem with screen capture size

This commit is contained in:
lupoDharkael
2017-05-28 03:05:42 +02:00
parent 6ead6dde2a
commit 0a5ed273fc
2 changed files with 6 additions and 2 deletions

View File

@@ -351,7 +351,9 @@ void ColorWheel::paintEvent(QPaintEvent * )
painter.setClipping(false);
// lum-sat selector
bool isWhite = (p->val < 0.65 || p->sat > 0.43); //0.62 || p->sat > 0.43
// isWhite defines when the selector is white based on values of saturation
// and color value combined as a union
bool isWhite = (p->val < 0.65 || p->sat > 0.43);
painter.setPen(QPen(isWhite ? Qt::white : Qt::black, 3));
painter.setBrush(Qt::NoBrush);
painter.drawEllipse(selector_position, selector_radius, selector_radius);

View File

@@ -78,7 +78,9 @@ CaptureWidget::CaptureWidget(QWidget *parent) :
m_buttonHandler->hide();
// init screenshot
createCapture();
resize(m_screenshot->getScreenshot().size());
QSize size = m_screenshot->getScreenshot().size();
// we need to increase by 1 the size to reach to the end of the screen
resize(size.width()+1, size.height()+1);
// init interface color
QSettings settings;
m_uiColor = settings.value("uiColor").value<QColor>();