Layout fixes

This commit is contained in:
stojce 2014-01-15 23:14:45 +01:00
parent b17d4a3ec9
commit 8e2879e5ff
2 changed files with 35 additions and 12 deletions

View file

@ -15,22 +15,25 @@ QLabel {
color: #333333;
}
QLabel#fileNameLabel {
margin-top: 18px;
padding: 10px 0 0 7px;
QLabel#infoLabel {
padding: 7px 0 0 7px;
color: #666666;
}
QPushButton {
border-width: 0;
border-radius: 9px;
font-size: 18px;
padding: 16px 0px;
padding: 17px 0px 15px;
width: 107px;
margin: 20px 6px 18px;
margin-top: 20px;
margin-bottom: 18px;
}
QPushButton#importButton {
color: #FFFFFF;
font-weight: bold;
margin-right: 6px;
}
QPushButton#importButton:enabled {
@ -44,10 +47,12 @@ QPushButton#importButton:!enabled {
QPushButton#cancelButton {
color: #333333;
background-color: #FFFFFF;
width: 74px;
margin-right: 11px;
}
QSidebar, QTreeView {
border: 1px solid #E5E5E5;
border: 1px solid #C5C5C5;
font-size: 14px;
margin: 0px;
}
@ -67,8 +72,8 @@ QTreeView QHeaderView {
QTreeView QHeaderView:section {
border-left: none;
border-top: none;
border-bottom: 1px solid #E5E5E5;
border-right: 1px solid #E5E5E5;
border-bottom: 1px solid #C5C5C5;
border-right: 1px solid #C5C5C5;
background: white;
color: #666666;
padding: 10px 20px;

View file

@ -19,8 +19,10 @@ const QString WINDOW_NAME = QObject::tr("Import Voxels");
const QString IMPORT_BUTTON_NAME = QObject::tr("Import");
const QString IMPORT_INFO = QObject::tr("<b>Import</b> %1 as voxels");
const QString CANCEL_BUTTON_NAME = QObject::tr("Cancel");
const QString INFO_LABEL_TEXT = QObject::tr("This will load selected file into Hifi and\n"
"allow you to place it with Command V");
const QString INFO_LABEL_TEXT = QObject::tr("<div style='line-height:20px;'>"
"This will load the selected file into Hifi and allow you<br/>"
"to place it with %1-V; you must be in select or<br/>"
"add mode (S or V keys will toggle mode) to place.</div>");
const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
@ -99,7 +101,16 @@ _cancelButton(CANCEL_BUTTON_NAME, this) {
setFileMode(QFileDialog::ExistingFile);
setViewMode(QFileDialog::Detail);
#ifdef Q_OS_MAC
QString cmdString = ("Command");
#else
QString cmdString = ("Control");
#endif
QLabel *infoLabel = new QLabel(QString(INFO_LABEL_TEXT).arg(cmdString));
infoLabel->setObjectName("infoLabel");
QGridLayout* gridLayout = (QGridLayout*) layout();
gridLayout->addWidget(infoLabel, 2, 0, 2, 1);
gridLayout->addWidget(&_cancelButton, 2, 1, 2, 1);
gridLayout->addWidget(&_importButton, 2, 2, 2, 1);
@ -187,6 +198,9 @@ void ImportDialog::setLayout() {
widget = findChild<QWidget*>("fileTypeLabel");
widget->hide();
widget = findChild<QWidget*>("fileNameLabel");
widget->hide();
widget = findChild<QWidget*>("buttonBox");
widget->hide();
@ -254,8 +268,12 @@ void ImportDialog::setImportTypes() {
// set custom file icons
setIconProvider(new HiFiIconProvider(iconsMap));
setNameFilter(importFormatsFilterList);
#ifdef Q_OS_MAC
QString cmdString = ("Command");
#else
QString cmdString = ("Control");
#endif
setLabelText(QFileDialog::LookIn, QString(IMPORT_INFO).arg(importFormatsInfo));
setLabelText(QFileDialog::FileName, INFO_LABEL_TEXT);
}
}