diff --git a/app/NewLabelDialog.cpp b/app/NewLabelDialog.cpp index b4c29f9..1b9abce 100644 --- a/app/NewLabelDialog.cpp +++ b/app/NewLabelDialog.cpp @@ -45,6 +45,8 @@ namespace gLabels similarBrowser->setAttribute(Qt::WA_TranslucentBackground); similarBrowser->viewport()->setAutoFillBackground(false); + selectionStackedWidget->setCurrentIndex( 0 ); + connect( searchEntry, SIGNAL(textChanged(const QString &)), this, SLOT(searchEntryTextChanged(const QString &)) ); @@ -83,11 +85,12 @@ namespace gLabels if ( selectedItems.isEmpty() ) { - // Clear preview - simplePreview->setTemplate( NULL ); + selectionStackedWidget->setCurrentIndex( 0 ); } else { + selectionStackedWidget->setCurrentIndex( 1 ); + // Set template to preview TemplatePickerItem *tItem = dynamic_cast(selectedItems.first()); const libglabels::Template *tmplate = tItem->tmplate(); diff --git a/app/ui/NewLabelDialog.ui b/app/ui/NewLabelDialog.ui index 37f47fd..cdc7c36 100644 --- a/app/ui/NewLabelDialog.ui +++ b/app/ui/NewLabelDialog.ui @@ -6,8 +6,8 @@ 0 0 - 958 - 759 + 860 + 777 @@ -123,229 +123,287 @@ - + + + false + + - - - 12 + + + + 0 + 0 + - - - - Selection info - - - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - - - - - - - 0 - 0 - - - - - 250 - 350 - - - - Qt::AlignCenter - - - - - - - - - Vendor: + + 0 + + + + + + + 12 + + + 9 + + + + + false + + + + 10 + 75 + true + + + + No selection + + + Qt::AlignCenter + + + + + + + + + + + + + QLayout::SetFixedSize + + + 12 + + + + + Selection + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + + 0 + 0 + + + + + 250 + 350 + + + + Qt::AlignCenter + + + + + + + + + Vendor: + + + + + + + TextLabel + + + + + + + Part #: + + + + + + + TextLabel + + + + + + + Description: + + + + + + + TextLabel + + + + + + + Page size: + + + + + + + TextLabel + + + + + + + Label size: + + + + + + + TextLabel + + + + + + + Layout: + + + + + + + TextLabel + + + + + + + Similar to: + + + + + + + + 0 + 0 + + + + + 150 + 16777215 + + + + false + + + false + + + QFrame::NoFrame + + + false + + + + + + + + + + + + + 0 + 0 + + + + Orientation + + + + 9 - - - - - - TextLabel - - - - - - - Part #: - - - - - - - TextLabel - - - - - - - Description: - - - - - - - TextLabel - - - - - - - Page size: - - - - - - - TextLabel - - - - - - - Label size: - - - - - - - TextLabel - - - - - - - Layout: - - - - - - - TextLabel - - - - - - - Similar to: - - - - - - - - 0 - 0 - - - - - 150 - 16777215 - - - - false - - - false - - - QFrame::NoFrame - - - false - - - - - - - - - - - - - 0 - 0 - - - - Orientation - - - - 9 - - - - - - - - 0 - 0 - - - - Normal - - - - - - - - 0 - 0 - - - - Rotated - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - + + + + + + + 0 + 0 + + + + Normal + + + + + + + + 0 + 0 + + + + Rotated + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + +