Merge pull request #2821 from manongjohn/fix_lipsync_popup_layout

Fix lipsync popup layout
This commit is contained in:
Rodney 2019-10-16 21:41:22 -05:00 committed by GitHub
commit 5f55c7f966
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 11 deletions

View file

@ -2012,7 +2012,7 @@ void ReplaceParentDirectoryPopup::initFolder() {
// ImportMagpieFilePopup
ImportMagpieFilePopup::ImportMagpieFilePopup()
: FileBrowserPopup(tr("Import Magpie File")) {
: FileBrowserPopup(tr("Import Toonz Lip Sync File")) {
setOkText(tr("Load"));
addFilterType("tls");
}

View file

@ -53,11 +53,11 @@ MagpieFileImportPopup::MagpieFileImportPopup()
, m_toField(0)
, m_flipbook(0)
, m_levelPath() {
setWindowTitle(tr("Import Magpie File"));
setWindowTitle(tr("Import Toonz Lip Sync File"));
beginVLayout();
setLabelWidth(45);
setLabelWidth(60);
addSeparator(tr("Frame Range"));
@ -70,9 +70,9 @@ MagpieFileImportPopup::MagpieFileImportPopup()
m_fromField = new DVGui::IntLineEdit(fromToWidget, 1, 1, 1);
fromToLayout->addWidget(m_fromField, 0, Qt::AlignLeft);
m_toField = new DVGui::IntLineEdit(fromToWidget, 1, 1, 1);
QLabel *toLabel = new QLabel(tr("To:"));
QLabel *toLabel = new QLabel(tr("To: "));
toLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
toLabel->setFixedSize(20, m_toField->height());
toLabel->setFixedSize(20, DVGui::WidgetHeight);
fromToLayout->addWidget(toLabel, 0, Qt::AlignRight);
fromToLayout->addWidget(m_toField, 0, Qt::AlignLeft);
fromToWidget->setLayout(fromToLayout);
@ -90,13 +90,15 @@ MagpieFileImportPopup::MagpieFileImportPopup()
QLabel *frameLabel = new QLabel(" Frame", this);
frameLabel->setFixedHeight(DVGui::WidgetHeight);
frameLabel->setAlignment(Qt::AlignVCenter);
addWidget(tr("Phoneme"), frameLabel);
int i;
for (i = 0; i < 9; i++) {
DVGui::IntLineEdit *field = new DVGui::IntLineEdit(this, 1, 1);
field->setFixedSize(54, DVGui::WidgetHeight);
QLabel *label = new QLabel("", this);
label->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
label->setFixedSize(getLabelWidth(), field->height());
label->setFixedSize(getLabelWidth(), DVGui::WidgetHeight);
m_actFields.append(QPair<QLabel *, DVGui::IntLineEdit *>(label, field));
addWidgets(label, field);
}
@ -125,7 +127,7 @@ MagpieFileImportPopup::MagpieFileImportPopup()
FlipConsole::eMatte | FlipConsole::eDefineSubCamera |
FlipConsole::eDefineLoadBox | FlipConsole::eUseLoadBox |
FlipConsole::eFilledRaster | FlipConsole::eLocator));
m_flipbook = new FlipBook(this, tr("Import Magpie File"), buttonMask);
m_flipbook = new FlipBook(this, tr("Import Toonz Lip Sync File"), buttonMask);
m_flipbook->setFixedHeight(250);
frameLayout->addWidget(m_flipbook);
frame->setLayout(frameLayout);
@ -171,7 +173,7 @@ void MagpieFileImportPopup::showEvent(QShowEvent *) {
QString act = actsIdentifier.at(i);
field->setProperty("act", QVariant(act));
field->show();
label->setText(act);
label->setText(act + ":");
label->show();
}
QString oldLevelPath = m_levelField->getPath();

View file

@ -1558,7 +1558,8 @@ void MainWindow::defineActions() {
createRightClickMenuAction(MI_SavePaletteAs, tr("&Save Palette As..."), "");
createRightClickMenuAction(MI_OverwritePalette, tr("&Save Palette"), "");
createMenuFileAction(MI_LoadColorModel, tr("&Load Color Model..."), "");
createMenuFileAction(MI_ImportMagpieFile, tr("&Import Magpie File..."), "");
createMenuFileAction(MI_ImportMagpieFile,
tr("&Import Toonz Lip Sync File..."), "");
createMenuFileAction(MI_NewProject, tr("&New Project..."), "");
createMenuFileAction(MI_ProjectSettings, tr("&Project Settings..."), "");
createMenuFileAction(MI_SaveDefaultSettings, tr("&Save Default Settings"),