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
19const QString IMPORT_BUTTON_NAME = QObject::tr("Import");19const QString IMPORT_BUTTON_NAME = QObject::tr("Import");
20const QString IMPORT_INFO = QObject::tr("<b>Import</b> %1 as voxels");20const QString IMPORT_INFO = QObject::tr("<b>Import</b> %1 as voxels");
21const QString CANCEL_BUTTON_NAME = QObject::tr("Cancel");21const QString CANCEL_BUTTON_NAME = QObject::tr("Cancel");
22const QString INFO_LABEL_TEXT = QObject::tr("This will load selected file into Hifi and\n"22const QString INFO_LABEL_TEXT = QObject::tr("<div style='line-height:20px;'>"
23 "allow you to place it with Command V");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>");
24 26
25const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);27const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
26 28
@@ -99,7 +101,16 @@ _cancelButton(CANCEL_BUTTON_NAME, this) { · 72 unmodified lines
99 setFileMode(QFileDialog::ExistingFile);101 setFileMode(QFileDialog::ExistingFile);
100 setViewMode(QFileDialog::Detail);102 setViewMode(QFileDialog::Detail);
101 103
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
102 QGridLayout* gridLayout = (QGridLayout*) layout();112 QGridLayout* gridLayout = (QGridLayout*) layout();
113 gridLayout->addWidget(infoLabel, 2, 0, 2, 1);
103 gridLayout->addWidget(&_cancelButton, 2, 1, 2, 1);114 gridLayout->addWidget(&_cancelButton, 2, 1, 2, 1);
104 gridLayout->addWidget(&_importButton, 2, 2, 2, 1);115 gridLayout->addWidget(&_importButton, 2, 2, 2, 1);
105 116
@@ -187,6 +198,9 @@ void ImportDialog::setLayout() { · 81 unmodified lines
187 widget = findChild<QWidget*>("fileTypeLabel");198 widget = findChild<QWidget*>("fileTypeLabel");
188 widget->hide();199 widget->hide();
189 200
201 widget = findChild<QWidget*>("fileNameLabel");
202 widget->hide();
203
190 widget = findChild<QWidget*>("buttonBox");204 widget = findChild<QWidget*>("buttonBox");
191 widget->hide();205 widget->hide();
192 206
@@ -254,8 +268,12 @@ void ImportDialog::setImportTypes() { · 61 unmodified lines
254 // set custom file icons268 // set custom file icons
255 setIconProvider(new HiFiIconProvider(iconsMap));269 setIconProvider(new HiFiIconProvider(iconsMap));
256 setNameFilter(importFormatsFilterList);270 setNameFilter(importFormatsFilterList);
257 271
272#ifdef Q_OS_MAC
273 QString cmdString = ("Command");
274#else
275 QString cmdString = ("Control");
276#endif
258 setLabelText(QFileDialog::LookIn, QString(IMPORT_INFO).arg(importFormatsInfo));277 setLabelText(QFileDialog::LookIn, QString(IMPORT_INFO).arg(importFormatsInfo));
259 setLabelText(QFileDialog::FileName, INFO_LABEL_TEXT);
260 }278 }
261}279}

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