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
|
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 353 B |
|
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 230 B |
|
Before Width: | Height: | Size: 753 B After Width: | Height: | Size: 893 B |
|
Before Width: | Height: | Size: 250 B After Width: | Height: | Size: 307 B |
|
|
@ -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);
|
||||
|
||||
|
|
|
|||