diff --git a/Bin/Res/Icon/NmColorScale.png b/Bin/Res/Icon/NmColorScale.png new file mode 100644 index 0000000..f8f2b5c Binary files /dev/null and b/Bin/Res/Icon/NmColorScale.png differ diff --git a/Bin/Res/Icon/NmCopyGraphic.png b/Bin/Res/Icon/NmCopyGraphic.png new file mode 100644 index 0000000..9112791 Binary files /dev/null and b/Bin/Res/Icon/NmCopyGraphic.png differ diff --git a/Bin/Res/Icon/NmScaleGrid.png b/Bin/Res/Icon/NmScaleGrid.png new file mode 100644 index 0000000..19e4edc Binary files /dev/null and b/Bin/Res/Icon/NmScaleGrid.png differ diff --git a/Bin/Res/Icon/NmSetCenter.png b/Bin/Res/Icon/NmSetCenter.png new file mode 100644 index 0000000..9fdc056 Binary files /dev/null and b/Bin/Res/Icon/NmSetCenter.png differ diff --git a/Bin/Res/Icon/NmSideView.png b/Bin/Res/Icon/NmSideView.png new file mode 100644 index 0000000..4b6e74b Binary files /dev/null and b/Bin/Res/Icon/NmSideView.png differ diff --git a/Bin/Res/Icon/NmTopView.png b/Bin/Res/Icon/NmTopView.png new file mode 100644 index 0000000..ee6e911 Binary files /dev/null and b/Bin/Res/Icon/NmTopView.png differ diff --git a/Bin/Res/Icon/NmZoomIn.png b/Bin/Res/Icon/NmZoomIn.png new file mode 100644 index 0000000..6240285 Binary files /dev/null and b/Bin/Res/Icon/NmZoomIn.png differ diff --git a/Bin/Res/Icon/NmZoomOut.png b/Bin/Res/Icon/NmZoomOut.png new file mode 100644 index 0000000..334d3d5 Binary files /dev/null and b/Bin/Res/Icon/NmZoomOut.png differ diff --git a/Bin/Res/Icon/NmZoomReset.png b/Bin/Res/Icon/NmZoomReset.png new file mode 100644 index 0000000..9213f9e Binary files /dev/null and b/Bin/Res/Icon/NmZoomReset.png differ diff --git a/Src/nmNum/nmRender/nmVTKViewCommandController.cpp b/Src/nmNum/nmRender/nmVTKViewCommandController.cpp index c7524cd..7b3b671 100644 --- a/Src/nmNum/nmRender/nmVTKViewCommandController.cpp +++ b/Src/nmNum/nmRender/nmVTKViewCommandController.cpp @@ -34,14 +34,14 @@ nmVTKViewCommandController::nmVTKViewCommandController( } // QAction 只在构造阶段创建一次,后续所有菜单和工具栏复用这些实例。 - createAction(ViewCommand_ZoomIn, tr("Zoom In"), "ZoomIn.png", - SLOT(zoomIn())); - createAction(ViewCommand_ZoomOut, tr("Zoom Out"), "ZoomOut.png", - SLOT(zoomOut())); + createAction(ViewCommand_ZoomIn, tr("Zoom In"), "NmZoomIn.png", + SLOT(zoomIn())); + createAction(ViewCommand_ZoomOut, tr("Zoom Out"), "NmZoomOut.png", + SLOT(zoomOut())); createAction(ViewCommand_Fit, tr("Fit to Window"), - "ZoomSelfAdaptation.png", SLOT(fitView())); - createAction(ViewCommand_Top, tr("Top View"), "Map2D.png", - SLOT(setTopView())); + "NmZoomReset.png", SLOT(fitView())); + createAction(ViewCommand_Top, tr("Top View"), "NmTopView.png", + SLOT(setTopView())); createAction(ViewCommand_Front, tr("Front View"), QString(), SLOT(setFrontView())); createAction(ViewCommand_Right, tr("Right View"), QString(), @@ -53,8 +53,9 @@ nmVTKViewCommandController::nmVTKViewCommandController( SLOT(resetRotationCenter())); createAction(ViewCommand_SaveImage, tr("Save as Image"), "SaveImg.png", SLOT(saveImage())); - createAction(ViewCommand_CopyImage, tr("Copy Image"), "Copy.png", - SLOT(copyImage())); + createAction(ViewCommand_CopyImage, tr("Copy Image"), + "NmCopyGraphic.png", + SLOT(copyImage())); createAction(ViewCommand_Print, tr("Print"), "Print.png", SLOT(printImage())); createAction(ViewCommand_PrintPreview, tr("Print Preview"), diff --git a/Src/nmNum/nmSubWxs/nmWxPebiGridViewWidget.cpp b/Src/nmNum/nmSubWxs/nmWxPebiGridViewWidget.cpp index b1815e5..35792e0 100644 --- a/Src/nmNum/nmSubWxs/nmWxPebiGridViewWidget.cpp +++ b/Src/nmNum/nmSubWxs/nmWxPebiGridViewWidget.cpp @@ -87,7 +87,7 @@ void nmWxPebiGridViewWidget::createUi() m_pToolBar->setOrientation(Qt::Vertical); m_pToolBar->setMovable(false); m_pToolBar->setFloatable(false); - m_pToolBar->setIconSize(QSize(20, 20)); + m_pToolBar->setIconSize(QSize(24, 24)); m_pToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); m_pToolBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); @@ -101,12 +101,12 @@ void nmWxPebiGridViewWidget::createUi() m_pGridLinesAction->setToolTip(tr("Show Grid Lines")); m_pGridLinesAction->setCheckable(true); m_pScalarBarAction = new QAction( - QIcon(gridViewIconPath("Eyes.png")), + QIcon(gridViewIconPath("NmColorScale.png")), tr("Show Scalar Bar"), this); m_pScalarBarAction->setToolTip(tr("Show Scalar Bar")); m_pScalarBarAction->setCheckable(true); m_pBoundsGridAction = new QAction( - QIcon(gridViewIconPath("CalGrid.png")), + QIcon(gridViewIconPath("NmScaleGrid.png")), tr("Scale Grid"), this); m_pBoundsGridAction->setToolTip(tr("Scale Grid")); m_pBoundsGridAction->setCheckable(true); @@ -123,24 +123,34 @@ void nmWxPebiGridViewWidget::createUi() nmVTKViewCommandController::ViewCommand_Top); QAction* pCopyAction = pCommandController->getAction( nmVTKViewCommandController::ViewCommand_CopyImage); + bool bHasPreviousGroup = false; if(pZoomOutAction != nullptr) { m_pToolBar->addAction(pZoomOutAction); + bHasPreviousGroup = true; } if(pFitAction != nullptr) { m_pToolBar->addAction(pFitAction); + bHasPreviousGroup = true; } if(pZoomInAction != nullptr) { m_pToolBar->addAction(pZoomInAction); + bHasPreviousGroup = true; } if(pTopAction != nullptr) { + if(bHasPreviousGroup) { + m_pToolBar->addSeparator(); + } m_pToolBar->addAction(pTopAction); + bHasPreviousGroup = true; + } + if(bHasPreviousGroup) { + m_pToolBar->addSeparator(); } - m_pToolBar->addSeparator(); m_pToolBar->addAction(m_pGridLinesAction); m_pToolBar->addAction(m_pScalarBarAction); m_pToolBar->addAction(m_pBoundsGridAction); - m_pToolBar->addSeparator(); if(pCopyAction != nullptr) { + m_pToolBar->addSeparator(); m_pToolBar->addAction(pCopyAction); } } else {