From 896a7a65e445fb92b589e3334302fb44308e33e2 Mon Sep 17 00:00:00 2001 From: Denis Mingulov Date: Wed, 18 Jan 2012 09:25:46 +0200 Subject: Qml Text Editor - use theme icons for Text Qt Quick Toolbar Add support for using of available theme icons (QIcon::fromTheme) for Text fields' Qt Quick Toolbar at Qml Text Editor. Qml Designer's icons are not changed as it has its own (dark) style. Change-Id: If42798e24c62fb43a77a7ef3eaaf77a87920ed22 Reviewed-by: Thomas Hartmann --- .../qmleditorwidgets/contextpanetextwidget.cpp | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp index d9f7aec0af..c538751c6e 100644 --- a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp +++ b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp @@ -45,14 +45,21 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) : m_fontSizeTimer(-1) { ui->setupUi(this); - ui->boldButton->setIcon(QIcon(QLatin1String(":/qmldesigner/images/bold-h-icon.png"))); - ui->italicButton->setIcon(QIcon(QLatin1String(":/qmldesigner/images/italic-h-icon.png"))); - ui->underlineButton->setIcon(QIcon(QLatin1String(":/qmldesigner/images/underline-h-icon.png"))); - ui->strikeoutButton->setIcon(QIcon(QLatin1String(":/qmldesigner/images/strikeout-h-icon.png"))); - - ui->leftAlignmentButton->setIcon(QIcon(QLatin1String(":/qmldesigner/images/alignmentleft-h-icon.png"))); - ui->centerHAlignmentButton->setIcon(QIcon(QLatin1String(":/qmldesigner/images/alignmentcenterh-h-icon.png"))); - ui->rightAlignmentButton->setIcon(QIcon(QLatin1String(":/qmldesigner/images/alignmentright-h-icon.png"))); + ui->boldButton->setIcon(QIcon::fromTheme(QLatin1String("format-text-bold"), + QIcon(QLatin1String(":/qmldesigner/images/bold-h-icon.png")))); + ui->italicButton->setIcon(QIcon::fromTheme(QLatin1String("format-text-italic"), + QIcon(QLatin1String(":/qmldesigner/images/italic-h-icon.png")))); + ui->underlineButton->setIcon(QIcon::fromTheme(QLatin1String("format-text-underline"), + QIcon(QLatin1String(":/qmldesigner/images/underline-h-icon.png")))); + ui->strikeoutButton->setIcon(QIcon::fromTheme(QLatin1String("format-text-strikethrough"), + QIcon(QLatin1String(":/qmldesigner/images/strikeout-h-icon.png")))); + + ui->leftAlignmentButton->setIcon(QIcon::fromTheme(QLatin1String("format-justify-left"), + QIcon(QLatin1String(":/qmldesigner/images/alignmentleft-h-icon.png")))); + ui->centerHAlignmentButton->setIcon(QIcon::fromTheme(QLatin1String("format-justify-center"), + QIcon(QLatin1String(":/qmldesigner/images/alignmentcenterh-h-icon.png")))); + ui->rightAlignmentButton->setIcon(QIcon::fromTheme(QLatin1String("format-justify-right"), + QIcon(QLatin1String(":/qmldesigner/images/alignmentright-h-icon.png")))); ui->centerVAlignmentButton->setIcon(QIcon(QLatin1String(":/qmldesigner/images/alignmentmiddle-h-icon.png"))); -- cgit v1.2.1