diff options
author | Denis Mingulov <denis@mingulov.com> | 2012-01-18 09:25:46 +0200 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2012-01-26 09:59:02 +0100 |
commit | 896a7a65e445fb92b589e3334302fb44308e33e2 (patch) | |
tree | f8b2387e589e0117305ac399574e61235bd2fa33 | |
parent | 0b64fe80dc86338f73f419a4f73af9b6e7500adb (diff) | |
download | qt-creator-896a7a65e445fb92b589e3334302fb44308e33e2.tar.gz |
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 <Thomas.Hartmann@nokia.com>
-rw-r--r-- | src/libs/qmleditorwidgets/contextpanetextwidget.cpp | 23 |
1 files 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"))); |