mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
Layout fixes
This commit is contained in:
parent
b17d4a3ec9
commit
8e2879e5ff
2 changed files with 35 additions and 12 deletions
|
@ -15,22 +15,25 @@ QLabel {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
QLabel#fileNameLabel {
|
QLabel#infoLabel {
|
||||||
margin-top: 18px;
|
padding: 7px 0 0 7px;
|
||||||
padding: 10px 0 0 7px;
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton {
|
QPushButton {
|
||||||
border-width: 0;
|
border-width: 0;
|
||||||
border-radius: 9px;
|
border-radius: 9px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
padding: 16px 0px;
|
padding: 17px 0px 15px;
|
||||||
width: 107px;
|
width: 107px;
|
||||||
margin: 20px 6px 18px;
|
margin-top: 20px;
|
||||||
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton#importButton {
|
QPushButton#importButton {
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPushButton#importButton:enabled {
|
QPushButton#importButton:enabled {
|
||||||
|
@ -44,10 +47,12 @@ QPushButton#importButton:!enabled {
|
||||||
QPushButton#cancelButton {
|
QPushButton#cancelButton {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
|
width: 74px;
|
||||||
|
margin-right: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QSidebar, QTreeView {
|
QSidebar, QTreeView {
|
||||||
border: 1px solid #E5E5E5;
|
border: 1px solid #C5C5C5;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
@ -67,8 +72,8 @@ QTreeView QHeaderView {
|
||||||
QTreeView QHeaderView:section {
|
QTreeView QHeaderView:section {
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-top: none;
|
border-top: none;
|
||||||
border-bottom: 1px solid #E5E5E5;
|
border-bottom: 1px solid #C5C5C5;
|
||||||
border-right: 1px solid #E5E5E5;
|
border-right: 1px solid #C5C5C5;
|
||||||
background: white;
|
background: white;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
|
|
|
@ -19,8 +19,10 @@ const QString WINDOW_NAME = QObject::tr("Import Voxels");
|
||||||
const QString IMPORT_BUTTON_NAME = QObject::tr("Import");
|
const QString IMPORT_BUTTON_NAME = QObject::tr("Import");
|
||||||
const QString IMPORT_INFO = QObject::tr("<b>Import</b> %1 as voxels");
|
const QString IMPORT_INFO = QObject::tr("<b>Import</b> %1 as voxels");
|
||||||
const QString CANCEL_BUTTON_NAME = QObject::tr("Cancel");
|
const QString CANCEL_BUTTON_NAME = QObject::tr("Cancel");
|
||||||
const QString INFO_LABEL_TEXT = QObject::tr("This will load selected file into Hifi and\n"
|
const QString INFO_LABEL_TEXT = QObject::tr("<div style='line-height:20px;'>"
|
||||||
"allow you to place it with Command V");
|
"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);
|
const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
|
||||||
|
|
||||||
|
@ -99,7 +101,16 @@ _cancelButton(CANCEL_BUTTON_NAME, this) {
|
||||||
setFileMode(QFileDialog::ExistingFile);
|
setFileMode(QFileDialog::ExistingFile);
|
||||||
setViewMode(QFileDialog::Detail);
|
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();
|
QGridLayout* gridLayout = (QGridLayout*) layout();
|
||||||
|
gridLayout->addWidget(infoLabel, 2, 0, 2, 1);
|
||||||
gridLayout->addWidget(&_cancelButton, 2, 1, 2, 1);
|
gridLayout->addWidget(&_cancelButton, 2, 1, 2, 1);
|
||||||
gridLayout->addWidget(&_importButton, 2, 2, 2, 1);
|
gridLayout->addWidget(&_importButton, 2, 2, 2, 1);
|
||||||
|
|
||||||
|
@ -187,6 +198,9 @@ void ImportDialog::setLayout() {
|
||||||
widget = findChild<QWidget*>("fileTypeLabel");
|
widget = findChild<QWidget*>("fileTypeLabel");
|
||||||
widget->hide();
|
widget->hide();
|
||||||
|
|
||||||
|
widget = findChild<QWidget*>("fileNameLabel");
|
||||||
|
widget->hide();
|
||||||
|
|
||||||
widget = findChild<QWidget*>("buttonBox");
|
widget = findChild<QWidget*>("buttonBox");
|
||||||
widget->hide();
|
widget->hide();
|
||||||
|
|
||||||
|
@ -254,8 +268,12 @@ void ImportDialog::setImportTypes() {
|
||||||
// set custom file icons
|
// set custom file icons
|
||||||
setIconProvider(new HiFiIconProvider(iconsMap));
|
setIconProvider(new HiFiIconProvider(iconsMap));
|
||||||
setNameFilter(importFormatsFilterList);
|
setNameFilter(importFormatsFilterList);
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
QString cmdString = ("Command");
|
||||||
|
#else
|
||||||
|
QString cmdString = ("Control");
|
||||||
|
#endif
|
||||||
setLabelText(QFileDialog::LookIn, QString(IMPORT_INFO).arg(importFormatsInfo));
|
setLabelText(QFileDialog::LookIn, QString(IMPORT_INFO).arg(importFormatsInfo));
|
||||||
setLabelText(QFileDialog::FileName, INFO_LABEL_TEXT);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue