History

Layout fixes

stojce committed 12 years ago

Commit 8e2879e1 parent b17d4a32 files · +35 −12Browse files

Showing the changes to interface/src/ImportDialog.cpp (1 of 2 files). Show all

Unified · Split

interface/src/ImportDialog.cpp+22−4
@@ -19,8 +19,10 @@ const QString WINDOW_NAME = QObject::tr("Import Voxels"); · 18 unmodified lines
1919 const QString IMPORT_BUTTON_NAME = QObject::tr("Import");
2020 const QString IMPORT_INFO = QObject::tr("<b>Import</b> %1 as voxels");
2121 const QString CANCEL_BUTTON_NAME = QObject::tr("Cancel");
22−const QString INFO_LABEL_TEXT = QObject::tr("This will load selected file into Hifi and\n"
23− "allow you to place it with Command V");
22+const QString INFO_LABEL_TEXT = QObject::tr("<div style='line-height:20px;'>"
23+ "This will load the selected file into Hifi and allow you<br/>"
24+ "to place it with %1-V; you must be in select or<br/>"
25+ "add mode (S or V keys will toggle mode) to place.</div>");
2426
2527 const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
2628
@@ -99,7 +101,16 @@ _cancelButton(CANCEL_BUTTON_NAME, this) { · 72 unmodified lines
99101 setFileMode(QFileDialog::ExistingFile);
100102 setViewMode(QFileDialog::Detail);
101103
104+#ifdef Q_OS_MAC
105+ QString cmdString = ("Command");
106+#else
107+ QString cmdString = ("Control");
108+#endif
109+ QLabel *infoLabel = new QLabel(QString(INFO_LABEL_TEXT).arg(cmdString));
110+ infoLabel->setObjectName("infoLabel");
111+
102112 QGridLayout* gridLayout = (QGridLayout*) layout();
113+ gridLayout->addWidget(infoLabel, 2, 0, 2, 1);
103114 gridLayout->addWidget(&_cancelButton, 2, 1, 2, 1);
104115 gridLayout->addWidget(&_importButton, 2, 2, 2, 1);
105116
@@ -187,6 +198,9 @@ void ImportDialog::setLayout() { · 81 unmodified lines
187198 widget = findChild<QWidget*>("fileTypeLabel");
188199 widget->hide();
189200
201+ widget = findChild<QWidget*>("fileNameLabel");
202+ widget->hide();
203+
190204 widget = findChild<QWidget*>("buttonBox");
191205 widget->hide();
192206
@@ -254,8 +268,12 @@ void ImportDialog::setImportTypes() { · 61 unmodified lines
254268 // set custom file icons
255269 setIconProvider(new HiFiIconProvider(iconsMap));
256270 setNameFilter(importFormatsFilterList);
257−
271+
272+#ifdef Q_OS_MAC
273+ QString cmdString = ("Command");
274+#else
275+ QString cmdString = ("Control");
276+#endif
258277 setLabelText(QFileDialog::LookIn, QString(IMPORT_INFO).arg(importFormatsInfo));
259− setLabelText(QFileDialog::FileName, INFO_LABEL_TEXT);
260278 }
261279 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t