Hide selection information when there is no selection in NewLabelDialog.
This commit is contained in:
@@ -45,6 +45,8 @@ namespace gLabels
|
|||||||
similarBrowser->setAttribute(Qt::WA_TranslucentBackground);
|
similarBrowser->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
similarBrowser->viewport()->setAutoFillBackground(false);
|
similarBrowser->viewport()->setAutoFillBackground(false);
|
||||||
|
|
||||||
|
selectionStackedWidget->setCurrentIndex( 0 );
|
||||||
|
|
||||||
connect( searchEntry, SIGNAL(textChanged(const QString &)),
|
connect( searchEntry, SIGNAL(textChanged(const QString &)),
|
||||||
this, SLOT(searchEntryTextChanged(const QString &)) );
|
this, SLOT(searchEntryTextChanged(const QString &)) );
|
||||||
|
|
||||||
@@ -83,11 +85,12 @@ namespace gLabels
|
|||||||
|
|
||||||
if ( selectedItems.isEmpty() )
|
if ( selectedItems.isEmpty() )
|
||||||
{
|
{
|
||||||
// Clear preview
|
selectionStackedWidget->setCurrentIndex( 0 );
|
||||||
simplePreview->setTemplate( NULL );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
selectionStackedWidget->setCurrentIndex( 1 );
|
||||||
|
|
||||||
// Set template to preview
|
// Set template to preview
|
||||||
TemplatePickerItem *tItem = dynamic_cast<TemplatePickerItem*>(selectedItems.first());
|
TemplatePickerItem *tItem = dynamic_cast<TemplatePickerItem*>(selectedItems.first());
|
||||||
const libglabels::Template *tmplate = tItem->tmplate();
|
const libglabels::Template *tmplate = tItem->tmplate();
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>958</width>
|
<width>860</width>
|
||||||
<height>759</height>
|
<height>777</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -123,17 +123,71 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="gLabels::TemplatePicker" name="templatePicker"/>
|
<widget class="gLabels::TemplatePicker" name="templatePicker">
|
||||||
|
<property name="showDropIndicator" stdset="0">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QStackedWidget" name="selectionStackedWidget">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="page">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>12</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>No selection</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="page_2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetFixedSize</enum>
|
||||||
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>12</number>
|
<number>12</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
<widget class="QGroupBox" name="selectionInfoGroup">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Selection info</string>
|
<string>Selection</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
|
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
|
||||||
@@ -348,6 +402,10 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
|||||||
Reference in New Issue
Block a user