Fix tooltip text in 3D Editor toolbar background color button

Task-number: QDS-6585
Change-Id: I397de9ac51b69697234f5f0dc48b90f330ec49d2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Samuel Ghinet
2022-06-02 15:26:41 +03:00
parent a734e1b4e8
commit fe4d8e3eda
2 changed files with 7 additions and 5 deletions

View File

@@ -344,13 +344,13 @@ void Edit3DView::createEdit3DActions()
m_backgroundColorSelectionAction = new Edit3DAction( m_backgroundColorSelectionAction = new Edit3DAction(
QmlDesigner::Constants::EDIT3D_EDIT_SELECT_BACKGROUND_COLOR, View3DActionCommand::SelectBackgroundColor, QmlDesigner::Constants::EDIT3D_EDIT_SELECT_BACKGROUND_COLOR, View3DActionCommand::SelectBackgroundColor,
QCoreApplication::translate("SelectBackgroundColorAction", "Select Background color"), QCoreApplication::translate("SelectBackgroundColorAction", "Select Background Color"),
{}, false, false, {}, {}, showBackgroundColorSelection, {}, 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( m_resetBackgroundColorAction = new Edit3DAction(
QmlDesigner::Constants::EDIT3D_EDIT_RESET_BACKGROUND_COLOR, View3DActionCommand::ResetBackgroundColor, 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 &) { {}, false, false, {}, {}, [](const SelectionContext &) {
QList<QColor> colors = {QRgb(0x222222), QRgb(0x999999)}; QList<QColor> colors = {QRgb(0x222222), QRgb(0x999999)};
auto view = QmlDesignerPlugin::instance()->viewManager().nodeInstanceView(); auto view = QmlDesignerPlugin::instance()->viewManager().nodeInstanceView();
@@ -362,7 +362,7 @@ void Edit3DView::createEdit3DActions()
QmlDesigner::DesignerSettingsKey::EDIT3DVIEW_BACKGROUND_COLOR, QmlDesigner::DesignerSettingsKey::EDIT3DVIEW_BACKGROUND_COLOR,
QVariant::fromValue(colorsToSave)); 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( m_showSelectionBoxAction = new Edit3DAction(
QmlDesigner::Constants::EDIT3D_EDIT_SHOW_SELECTION_BOX, View3DActionCommand::ShowSelectionBox, QmlDesigner::Constants::EDIT3D_EDIT_SHOW_SELECTION_BOX, View3DActionCommand::ShowSelectionBox,

View File

@@ -141,7 +141,9 @@ Edit3DWidget::Edit3DWidget(Edit3DView *view) :
m_visibilityTogglesMenu = new Edit3DVisibilityTogglesMenu(this); m_visibilityTogglesMenu = new Edit3DVisibilityTogglesMenu(this);
handleActions(view->visibilityToggleActions(), m_visibilityTogglesMenu, false); 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); handleActions(view->backgroundColorActions(), m_backgroundColorMenu, false);
view->setSeeker(seeker); view->setSeeker(seeker);