Skip to content

Commit deb68d5

Browse files
committed
Added "What's This?" help to material editor dialog.
1 parent a94e8db commit deb68d5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

FEBioStudio/DlgEditMaterial.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@ class UIDlgEditMaterial
246246
h->addLayout(l);
247247
dlg->setLayout(h);
248248

249+
// Assign "What's This?" help to widgets
250+
ambient->setWhatsThis("The ambient color is a constant color that is added to the material's total color.");
251+
diffuse->setWhatsThis("The diffuse color is the main color of the material.");
252+
specular->setWhatsThis("The specular color is the color of the highlights. (Also see shininess)");
253+
specExp->setWhatsThis("The shininess specifies the size of the specular highlight.");
254+
reflect->setWhatsThis("Sets how reflective the material is. (Needs environment map enabled to have any effect.)");
255+
preset->setWhatsThis("Choose a preset material.");
256+
249257
QObject::connect(bb, &QDialogButtonBox::accepted, dlg, &QDialog::accept);
250258
QObject::connect(bb, &QDialogButtonBox::rejected, dlg, &QDialog::reject);
251259

@@ -261,6 +269,8 @@ class UIDlgEditMaterial
261269
CDlgEditMaterial::CDlgEditMaterial(QWidget* parent) : QDialog(parent), ui(new UIDlgEditMaterial)
262270
{
263271
setWindowTitle("Edit material");
272+
setWindowFlags(windowFlags() | Qt::WindowContextHelpButtonHint); // Enable "What's This?" button
273+
264274
ui->setup(this);
265275

266276
CMainWindow* wnd = CMainWindow::GetInstance();

0 commit comments

Comments
 (0)