Skip to content

Commit

Permalink
Improve appearance for non-integer scale factors.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartenBaert committed Mar 1, 2019
1 parent 973cc00 commit cf9d3dc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/GUI/AudioPreviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,10 @@ void AudioPreviewer::paintEvent(QPaintEvent* event) {

painter.setPen(QColor(0, 0, 0));
painter.setBrush(Qt::NoBrush);
painter.setRenderHint(QPainter::Antialiasing);
for(unsigned int c = 0; c < n; ++c) {
int y1 = h * c / n, y2 = h * (c + 1) / n;
painter.drawRect(0, y1, w, y2 - y1);
painter.drawRect(QRectF(0.5, (qreal) y1 + 0.5, (qreal) w, (qreal) (y2 - y1)));
}

}
1 change: 1 addition & 0 deletions src/GUI/PageWelcome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ PageWelcome::PageWelcome(MainWindow* main_window)
{
QLabel *label_logo = new QLabel(scrollarea_contents);
label_logo->setPixmap(QPixmap(":/header.png"));
label_logo->setScaledContents(true);
QLabel *label_welcome = new QLabel(scrollarea_contents);
label_welcome->setText(tr("<p>Welcome to SimpleScreenRecorder!</p>\n\n"
"<p>Despite the name, this program actually has a lot of options. Don't worry though, there are really just two things that you "
Expand Down
1 change: 1 addition & 0 deletions src/GUI/VideoPreviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ void VideoPreviewer::paintEvent(QPaintEvent* event) {
// draw the border
painter.setPen(Qt::black);
painter.setBrush(Qt::NoBrush);
painter.setRenderHint(QPainter::Antialiasing);
painter.drawRect(QRectF(draw_rect).adjusted(-0.5, -0.5, 0.5, 0.5));

}
Expand Down

0 comments on commit cf9d3dc

Please sign in to comment.