Clean up diagramscene example's toolbutton icons.

Remove artefacts from pointer.png.

Replace several PNGs with images without artefacts (used FreeSerif as
the font).

Stopped scaling images up in MainWindow::createColorToolButtonIcon.

Change-Id: I7adf2deea73b89c631d39d575804e8d3f58c9fe1
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
bb10
Mitch Curtis 2012-11-19 16:52:47 +01:00 committed by The Qt Project
parent 626283740f
commit 91abfd521a
6 changed files with 4 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 307 B

View File

@ -340,8 +340,7 @@ void MainWindow::createToolBox()
QToolButton *textButton = new QToolButton;
textButton->setCheckable(true);
buttonGroup->addButton(textButton, InsertTextButton);
textButton->setIcon(QIcon(QPixmap(":/images/textpointer.png")
.scaled(30, 30)));
textButton->setIcon(QIcon(QPixmap(":/images/textpointer.png")));
textButton->setIconSize(QSize(50, 50));
QGridLayout *textLayout = new QGridLayout;
textLayout->addWidget(textButton, 0, 0, Qt::AlignHCenter);
@ -639,8 +638,9 @@ QIcon MainWindow::createColorToolButtonIcon(const QString &imageFile,
pixmap.fill(Qt::transparent);
QPainter painter(&pixmap);
QPixmap image(imageFile);
QRect target(0, 0, 50, 60);
QRect source(0, 0, 42, 42);
// Draw icon centred horizontally on button.
QRect target(4, 0, 42, 43);
QRect source(0, 0, 42, 43);
painter.fillRect(QRect(0, 60, 50, 80), color);
painter.drawPixmap(target, image, source);