From fe4d8e3eda2639b049862ac90b230060b48b623a Mon Sep 17 00:00:00 2001 From: Samuel Ghinet Date: Thu, 2 Jun 2022 15:26:41 +0300 Subject: [PATCH] Fix tooltip text in 3D Editor toolbar background color button Task-number: QDS-6585 Change-Id: I397de9ac51b69697234f5f0dc48b90f330ec49d2 Reviewed-by: Miikka Heikkinen Reviewed-by: Mahmoud Badri --- src/plugins/qmldesigner/components/edit3d/edit3dview.cpp | 8 ++++---- .../qmldesigner/components/edit3d/edit3dwidget.cpp | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp b/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp index 28b6cc93cc7..1ef3055ada6 100644 --- a/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp +++ b/src/plugins/qmldesigner/components/edit3d/edit3dview.cpp @@ -344,13 +344,13 @@ void Edit3DView::createEdit3DActions() m_backgroundColorSelectionAction = new Edit3DAction( QmlDesigner::Constants::EDIT3D_EDIT_SELECT_BACKGROUND_COLOR, View3DActionCommand::SelectBackgroundColor, - QCoreApplication::translate("SelectBackgroundColorAction", "Select Background color"), + QCoreApplication::translate("SelectBackgroundColorAction", "Select Background Color"), {}, false, false, {}, {}, showBackgroundColorSelection, - QCoreApplication::translate("SelectBackgroundColorAction", "Choose a color for the background.")); + QCoreApplication::translate("SelectBackgroundColorAction", "Select a color for the background of the 3D Editor.")); m_resetBackgroundColorAction = new Edit3DAction( QmlDesigner::Constants::EDIT3D_EDIT_RESET_BACKGROUND_COLOR, View3DActionCommand::ResetBackgroundColor, - QCoreApplication::translate("ResetBackgroundColorAction", "Reset Background color"), + QCoreApplication::translate("ResetBackgroundColorAction", "Reset Background Color"), {}, false, false, {}, {}, [](const SelectionContext &) { QList colors = {QRgb(0x222222), QRgb(0x999999)}; auto view = QmlDesignerPlugin::instance()->viewManager().nodeInstanceView(); @@ -362,7 +362,7 @@ void Edit3DView::createEdit3DActions() QmlDesigner::DesignerSettingsKey::EDIT3DVIEW_BACKGROUND_COLOR, QVariant::fromValue(colorsToSave)); }, - QCoreApplication::translate("ResetBackgroundColorAction", "Reset Background color to the default value.")); + QCoreApplication::translate("ResetBackgroundColorAction", "Reset background color of the 3D Editor to the default value.")); m_showSelectionBoxAction = new Edit3DAction( QmlDesigner::Constants::EDIT3D_EDIT_SHOW_SELECTION_BOX, View3DActionCommand::ShowSelectionBox, diff --git a/src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp b/src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp index 6f685123cfd..afa05dd67e2 100644 --- a/src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp +++ b/src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp @@ -141,7 +141,9 @@ Edit3DWidget::Edit3DWidget(Edit3DView *view) : m_visibilityTogglesMenu = new Edit3DVisibilityTogglesMenu(this); handleActions(view->visibilityToggleActions(), m_visibilityTogglesMenu, false); - m_backgroundColorMenu = new Edit3DVisibilityTogglesMenu(this); + m_backgroundColorMenu = new QMenu(this); + m_backgroundColorMenu->setToolTipsVisible(true); + handleActions(view->backgroundColorActions(), m_backgroundColorMenu, false); view->setSeeker(seeker);