forked from qt-creator/qt-creator
QmlDesigner: Fix the color of some toolbar icons
Give them the standard Theme::IconsBaseColor that works well with all themes. Task-number: QTCREATORBUG-24402 Change-Id: I458d1b4a7b3cceb2d318ff4257b4aa173170a533 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -149,18 +149,18 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
|
|||||||
|
|
||||||
// Zoom actions
|
// Zoom actions
|
||||||
const QString fontName = "qtds_propertyIconFont.ttf";
|
const QString fontName = "qtds_propertyIconFont.ttf";
|
||||||
const QColor textColorNormal(Theme::getColor(Theme::MenuItemTextColorNormal));
|
const QColor iconColorNormal(Theme::getColor(Theme::IconsBaseColor));
|
||||||
const QColor textColorDisabled(Theme::getColor(Theme::MenuBarItemTextColorDisabled));
|
const QColor iconColorDisabled(Theme::getColor(Theme::IconsDisabledColor));
|
||||||
const QIcon zoomAllIcon = Utils::StyleHelper::getIconFromIconFont(
|
const QIcon zoomAllIcon = Utils::StyleHelper::getIconFromIconFont(
|
||||||
fontName, Theme::getIconUnicode(Theme::Icon::zoomAll), 28, 28, textColorNormal);
|
fontName, Theme::getIconUnicode(Theme::Icon::zoomAll), 28, 28, iconColorNormal);
|
||||||
|
|
||||||
const QString zoomSelectionUnicode = Theme::getIconUnicode(Theme::Icon::zoomSelection);
|
const QString zoomSelectionUnicode = Theme::getIconUnicode(Theme::Icon::zoomSelection);
|
||||||
const auto zoomSelectionNormal = Utils::StyleHelper::IconFontHelper(zoomSelectionUnicode,
|
const auto zoomSelectionNormal = Utils::StyleHelper::IconFontHelper(zoomSelectionUnicode,
|
||||||
textColorNormal,
|
iconColorNormal,
|
||||||
QSize(28, 28),
|
QSize(28, 28),
|
||||||
QIcon::Normal);
|
QIcon::Normal);
|
||||||
const auto zoomSelectionDisabeld = Utils::StyleHelper::IconFontHelper(zoomSelectionUnicode,
|
const auto zoomSelectionDisabeld = Utils::StyleHelper::IconFontHelper(zoomSelectionUnicode,
|
||||||
textColorDisabled,
|
iconColorDisabled,
|
||||||
QSize(28, 28),
|
QSize(28, 28),
|
||||||
QIcon::Disabled);
|
QIcon::Disabled);
|
||||||
|
|
||||||
@@ -168,9 +168,9 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view)
|
|||||||
{zoomSelectionNormal,
|
{zoomSelectionNormal,
|
||||||
zoomSelectionDisabeld});
|
zoomSelectionDisabeld});
|
||||||
const QIcon zoomInIcon = Utils::StyleHelper::getIconFromIconFont(
|
const QIcon zoomInIcon = Utils::StyleHelper::getIconFromIconFont(
|
||||||
fontName, Theme::getIconUnicode(Theme::Icon::zoomIn), 28, 28, textColorNormal);
|
fontName, Theme::getIconUnicode(Theme::Icon::zoomIn), 28, 28, iconColorNormal);
|
||||||
const QIcon zoomOutIcon = Utils::StyleHelper::getIconFromIconFont(
|
const QIcon zoomOutIcon = Utils::StyleHelper::getIconFromIconFont(
|
||||||
fontName, Theme::getIconUnicode(Theme::Icon::zoomOut), 28, 28, textColorNormal);
|
fontName, Theme::getIconUnicode(Theme::Icon::zoomOut), 28, 28, iconColorNormal);
|
||||||
|
|
||||||
auto writeZoomLevel = [this]() {
|
auto writeZoomLevel = [this]() {
|
||||||
double level = m_graphicsView->transform().m11();
|
double level = m_graphicsView->transform().m11();
|
||||||
|
@@ -187,8 +187,10 @@ void RichTextEditor::setTabChangesFocus(bool change)
|
|||||||
QIcon RichTextEditor::getIcon(Theme::Icon icon)
|
QIcon RichTextEditor::getIcon(Theme::Icon icon)
|
||||||
{
|
{
|
||||||
const QString fontName = "qtds_propertyIconFont.ttf";
|
const QString fontName = "qtds_propertyIconFont.ttf";
|
||||||
|
const QColor iconColorNormal(Theme::getColor(Theme::IconsBaseColor));
|
||||||
|
|
||||||
return Utils::StyleHelper::getIconFromIconFont(fontName, Theme::getIconUnicode(icon), 20, 20);
|
return Utils::StyleHelper::getIconFromIconFont(
|
||||||
|
fontName, Theme::getIconUnicode(icon), 20, 20, iconColorNormal);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString RichTextEditor::richText() const
|
QString RichTextEditor::richText() const
|
||||||
|
@@ -239,6 +239,7 @@ void DesignModeWidget::setup()
|
|||||||
m_dockManager->setStyleSheet(Theme::replaceCssColors(sheet));
|
m_dockManager->setStyleSheet(Theme::replaceCssColors(sheet));
|
||||||
|
|
||||||
// Setup icons
|
// Setup icons
|
||||||
|
const QColor iconColor(Theme::getColor(Theme::IconsBaseColor));
|
||||||
const QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight)); // TODO Use correct color roles
|
const QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight)); // TODO Use correct color roles
|
||||||
const QColor tabColor(Theme::getColor(Theme::QmlDesigner_TabDark));
|
const QColor tabColor(Theme::getColor(Theme::QmlDesigner_TabDark));
|
||||||
|
|
||||||
@@ -468,8 +469,8 @@ void DesignModeWidget::setup()
|
|||||||
m_dockManager->openWorkspace(workspaceComboBox->currentText());
|
m_dockManager->openWorkspace(workspaceComboBox->currentText());
|
||||||
});
|
});
|
||||||
|
|
||||||
const QIcon gaIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
|
const QIcon gaIcon = Utils::StyleHelper::getIconFromIconFont(
|
||||||
Theme::getIconUnicode(Theme::Icon::annotationBubble), 36, 36);
|
fontName, Theme::getIconUnicode(Theme::Icon::annotationBubble), 36, 36, iconColor);
|
||||||
toolBar->addAction(gaIcon, tr("Edit global annotation for current file."), [&](){
|
toolBar->addAction(gaIcon, tr("Edit global annotation for current file."), [&](){
|
||||||
ModelNode node = currentDesignDocument()->rewriterView()->rootModelNode();
|
ModelNode node = currentDesignDocument()->rewriterView()->rootModelNode();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user