Skip to content

Commit

Permalink
alignment font size tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ondov committed Sep 29, 2016
1 parent 456462d commit fc59381
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/BaseImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ BaseImage::BaseImage(int width, int height, char base, bool light, bool snp, boo

int size;

if ( width > height )
if ( width * 1.25 > height )
{
size = height;
}
else
{
size = width;
size = width * 1.25;
}

int shade;
Expand Down Expand Up @@ -125,7 +125,7 @@ BaseImage::BaseImage(int width, int height, char base, bool light, bool snp, boo

fill(color);
painter.setPen(QColor::fromRgba(qRgba(colorFont.red(), colorFont.green(), colorFont.blue(), shade)));
painter.setFont(QFont(painter.font().family(), size - 1));
painter.setFont(QFont(painter.font().family(), size - 2));
painter.setBackground(color);
painter.drawText(0, 2, QPixmap::width(), QPixmap::height() - 2, Qt::AlignCenter | Qt::AlignVCenter, QString("%1").arg(base));
// painter.drawText(0, (image.height() - 2 * size / 3) / 2, image.width(), 2 * size / 3, Qt::AlignCenter, QString("%1").arg(chr));
Expand Down

0 comments on commit fc59381

Please sign in to comment.