Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 10378 → Rev 10379

/trunk/Scribus/scribus/stylemanager.cpp
35,9 → 35,7
shortcutWidget_(0), currentType_(QString::null), isEditMode_(true), doc_(0)
{
setupUi(this);
splitter->setMinimumWidth(0);
splitter->setResizeMode(leftFrame, QSplitter::KeepSize);
splitter->setResizeMode(rightFrame, QSplitter::Stretch);
 
uniqueLabel->hide();
rightFrame->hide();
 
56,8 → 54,6
editPosition_.setX(prefs_->getInt("eX", x()));
editPosition_.setY(prefs_->getInt("eY", y()));
 
setMinimumHeight(500); // 135
 
newButton->setEnabled(false);
cloneButton->setEnabled(false);
importButton->setEnabled(false);
446,14 → 442,11
{
styleView->setCurrentItem(item);
item->setSelected(true);
// item->repaint();
}
}
}
++it;
}
 
// styleView->triggerUpdate();
}
 
void StyleManager::slotEdit()
474,7 → 467,6
{
styleView->setCurrentItem(item);
item->setSelected(true);
// item->repaint();
break;
}
}
504,7 → 496,6
{
styleView->setCurrentItem(item);
item->setSelected(true);
// item->repaint();
break;
}
}
573,10 → 564,8
styleView->clearSelection();
styleView->setCurrentItem(item);
item->setSelected(true);
// item->repaint();
}
 
// StyleViewItem *sitem = dynamic_cast<StyleViewItem*>(item);
if (item && !item->isRoot())
{
rightClickPopup_->removeItem(rcpNewId_);
625,7 → 614,6
styleView->clearSelection();
styleView->setCurrentItem(item);
item->setSelected(true);
// item->repaint();
return; // work done, already in edit mode
}
 
677,7 → 665,6
newItem->setDirty(true);
styleView->setCurrentItem(newItem);
newItem->setSelected(true);
// newItem->repaint();
slotSetupWidget();
nameEdit->setFocus();
nameEdit->selectAll();
698,7 → 685,6
editFrame->hide();
applyButton->hide();
resetButton->hide();
// editButtonsFrame->hide();
rightFrame->hide();
isEditMode_ = false;
for (int i = 0; i < items_.count(); ++i)
709,13 → 695,7
QToolTip::add(okButton, enterEditModeOk_);
slotClean();
slotDocSelectionChanged();
setMinimumSize(230,500);
setMaximumSize(300,500);
QList<int> l;
l << 220 << 0;
splitter->setSizes(l);
resize(220, 500);
//adjustSize();
 
if (!isFirst)
move(editPosition_);
prefs_->set("isEditMode", isEditMode_);
736,7 → 716,6
disconnect(styleView, SIGNAL(itemClicked(QTreeWidgetItem*,int)),
this, SLOT(slotApplyStyle(QTreeWidgetItem*,int)));
 
 
slotSetupWidget();
styleView->setSelectionMode(QAbstractItemView::ExtendedSelection);
editPosition_.setX(x());
743,11 → 722,9
editPosition_.setY(y());
prefs_->set("eX", x());
prefs_->set("eY", y());
// okButton->setText(QString("<< %1").arg( tr("&Done")));
editFrame->show();
applyButton->show();
resetButton->show();
// editButtonsFrame->show();
rightFrame->show();
isEditMode_ = true;
for (int i = 0; i < items_.count(); ++i)
754,18 → 731,16
items_.at(i)->editMode(true);
QToolTip::add(okButton, exitEditModeOk_);
slotClean();
setMinimumSize(700,500);
setMaximumSize(700,500);
QList<int> l;
l << 220 << 470;
splitter->setSizes(l);
resize(700, 500);
//adjustSize();
 
prefs_->set("isEditMode", isEditMode_);
connect(styleView, SIGNAL(itemSelectionChanged()), this, SLOT(slotSetupWidget()));
}
setOkButtonText();
isFirst = false;
isFirst = false;
 
resize(1, 1); // megahack to keep palette small
updateGeometry();
adjustSize();
}
 
void StyleManager::addNewType(StyleItem *item, bool loadFromDoc)
837,7 → 812,6
if (item)
{
item->setDirty(true);
// item->repaint();
applyButton->setEnabled(true);
resetButton->setEnabled(true);
}
855,10 → 829,7
{
StyleViewItem *item = dynamic_cast<StyleViewItem*>(*it);
if (item)
{
item->setDirty(false);
// item->repaint();
}
++it;
}
 
1168,7 → 1139,6
{
styleView->setCurrentItem(item);
item->setSelected(true);
// item->repaint();
}
}
}
1175,8 → 1145,6
++it;
}
 
// styleView->triggerUpdate();
 
connect(styleView, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
this, SLOT(slotApplyStyle(QTreeWidgetItem*,QTreeWidgetItem*)));
}
1270,7 → 1238,6
prefs_->set("InitY", y());
storeVisibility(false);
storePosition();
// QT4 SMBase::hideEvent(e);
ScrPaletteBase::hideEvent(e);
emit closed();
}
1284,7 → 1251,6
prefs_->set("InitY", y());
storeVisibility(false);
storePosition();
// Qt4 SMBase::closeEvent(e);
ScrPaletteBase::closeEvent(e);
emit closed();
}
1299,7 → 1265,6
slotEdit();
}
setOkButtonText();
// Qt4 SMBase::showEvent(e);
ScrPaletteBase::showEvent(e);
if (isFirst)
{
/trunk/Scribus/scribus/stylemanager.ui
1,29 → 1,15
<ui version="4.0" >
<class>StyleManager</class>
<widget class="ScrPaletteBase" name="StyleManager" >
<widget class="QDialog" name="StyleManager" >
<property name="enabled" >
<bool>true</bool>
</property>
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>682</width>
<height>531</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
<sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>6</number>
43,8 → 29,8
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<item row="0" column="0" >
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>5</number>
</property>
61,25 → 47,32
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
<widget class="StyleView" name="styleView" >
<property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
<property name="alternatingRowColors" >
<bool>true</bool>
</property>
<property name="sizeHint" >
<size>
<width>0</width>
<height>20</height>
</size>
<property name="allColumnsShowFocus" >
<bool>true</bool>
</property>
</spacer>
<column>
<property name="text" >
<string>Name</string>
</property>
</column>
<column>
<property name="text" >
<string>Shortcut</string>
</property>
</column>
</widget>
</item>
<item>
<widget class="QToolButton" name="okButton" >
<widget class="QFrame" name="leftFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
86,142 → 79,48
</property>
<property name="minimumSize" >
<size>
<width>85</width>
<height>24</height>
<width>190</width>
<height>0</height>
</size>
</property>
<property name="text" >
<string>&lt;&lt; &amp;Done</string>
</property>
<property name="shortcut" >
<string>Alt+D</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="applyButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<property name="maximumSize" >
<size>
<width>85</width>
<height>24</height>
<width>32767</width>
<height>32767</height>
</size>
</property>
<property name="text" >
<string>&amp;Apply</string>
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
</property>
<property name="shortcut" >
<string>Alt+A</string>
<property name="frameShadow" >
<enum>QFrame::Plain</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="resetButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<property name="lineWidth" >
<number>0</number>
</property>
<property name="minimumSize" >
<size>
<width>85</width>
<height>24</height>
</size>
</property>
<property name="text" >
<string>&amp;Reset</string>
</property>
<property name="shortcut" >
<string>Alt+R</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" >
<widget class="QFrame" name="frame9" >
<property name="frameShape" >
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth" >
<number>0</number>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<number>0</number>
</property>
<property name="verticalSpacing" >
<number>0</number>
</property>
<item row="0" column="0" >
<widget class="QSplitter" name="splitter" >
<property name="minimumSize" >
<size>
<width>668</width>
<height>67</height>
</size>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>6</number>
</property>
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
<property name="topMargin" >
<number>6</number>
</property>
<property name="frameShadow" >
<enum>QFrame::Plain</enum>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
<property name="bottomMargin" >
<number>6</number>
</property>
<widget class="QFrame" name="leftFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>190</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>32767</width>
<height>32767</height>
</size>
</property>
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth" >
<number>0</number>
</property>
<layout class="QVBoxLayout" >
<property name="horizontalSpacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="0" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>0</number>
<number>3</number>
</property>
<property name="leftMargin" >
<number>0</number>
236,243 → 135,70
<number>0</number>
</property>
<item>
<widget class="QFrame" name="styleViewFrame" >
<widget class="QToolButton" name="newButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="frameShadow" >
<enum>QFrame::Plain</enum>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>6</number>
</property>
<property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>6</number>
</property>
<property name="horizontalSpacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="0" column="0" >
<widget class="StyleView" name="styleView" >
<property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="alternatingRowColors" >
<bool>true</bool>
</property>
<column>
<property name="text" >
<string>Name</string>
</property>
</column>
<column>
<property name="text" >
<string>Shortcut</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<property name="maximumSize" >
<size>
<width>20</width>
<height>5</height>
<width>1000</width>
<height>32767</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>3</number>
<property name="text" >
<string>&amp;New</string>
</property>
<property name="leftMargin" >
<number>0</number>
<property name="shortcut" >
<string>Alt+N</string>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="newButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>1000</width>
<height>32767</height>
</size>
</property>
<property name="text" >
<string>&amp;New</string>
</property>
<property name="shortcut" >
<string>Alt+N</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="cloneButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>1000</width>
<height>32767</height>
</size>
</property>
<property name="toolTip" >
<string>Clone copies the style to make similar styles easily.</string>
</property>
<property name="text" >
<string>&amp;Clone</string>
</property>
<property name="shortcut" >
<string>Alt+C</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
<widget class="QToolButton" name="cloneButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="sizeHint" >
<property name="maximumSize" >
<size>
<width>20</width>
<height>3</height>
<width>1000</width>
<height>32767</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>3</number>
<property name="toolTip" >
<string>Clone copies the style to make similar styles easily.</string>
</property>
<property name="leftMargin" >
<number>0</number>
<property name="text" >
<string>&amp;Clone</string>
</property>
<property name="topMargin" >
<number>0</number>
<property name="shortcut" >
<string>Alt+C</string>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="importButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>&amp;Import</string>
</property>
<property name="shortcut" >
<string>Alt+I</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="deleteButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>&amp;Delete</string>
</property>
<property name="shortcut" >
<string>Alt+D</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QFrame" name="rightFrame" >
<property name="minimumSize" >
<size>
<width>472</width>
<height>0</height>
</size>
</property>
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth" >
<number>0</number>
</property>
<layout class="QVBoxLayout" >
</item>
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>0</number>
<number>3</number>
</property>
<property name="leftMargin" >
<number>0</number>
487,130 → 213,293
<number>0</number>
</property>
<item>
<widget class="QFrame" name="editFrame" >
<widget class="QToolButton" name="importButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
<property name="text" >
<string>&amp;Import</string>
</property>
<property name="frameShadow" >
<enum>QFrame::Plain</enum>
<property name="shortcut" >
<string>Alt+I</string>
</property>
<property name="lineWidth" >
<number>0</number>
</widget>
</item>
<item>
<widget class="QToolButton" name="deleteButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>0</number>
<property name="text" >
<string>&amp;Delete</string>
</property>
<property name="shortcut" >
<string>Alt+D</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="0" column="1" >
<widget class="QFrame" name="rightFrame" >
<property name="minimumSize" >
<size>
<width>472</width>
<height>0</height>
</size>
</property>
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth" >
<number>0</number>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>0</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<widget class="QFrame" name="editFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth" >
<number>0</number>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>0</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>10</number>
</property>
<property name="leftMargin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<item>
<widget class="QLabel" name="nameLabel" >
<property name="text" >
<string>Name:</string>
</property>
<property name="leftMargin" >
<number>0</number>
<property name="wordWrap" >
<bool>false</bool>
</property>
<property name="topMargin" >
<number>0</number>
</widget>
</item>
<item>
<widget class="QLineEdit" name="nameEdit" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>10</number>
</property>
<property name="leftMargin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<item>
<widget class="QLabel" name="nameLabel" >
<property name="text" >
<string>Name:</string>
</property>
<property name="wordWrap" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="nameEdit" >
<property name="enabled" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="uniqueLabel" >
<property name="maximumSize" >
<size>
<width>32767</width>
<height>30</height>
</size>
</property>
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Please select a unique name for the style</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="mainFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="uniqueLabel" >
<property name="maximumSize" >
<size>
<width>32767</width>
<height>30</height>
</size>
</property>
<property name="font" >
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text" >
<string>Please select a unique name for the style</string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="mainFrame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" colspan="2" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>5</number>
</property>
<property name="leftMargin" >
<number>6</number>
</property>
<property name="topMargin" >
<number>6</number>
</property>
<property name="rightMargin" >
<number>6</number>
</property>
<property name="bottomMargin" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="okButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>85</width>
<height>24</height>
</size>
</property>
<property name="text" >
<string>&lt;&lt; &amp;Done</string>
</property>
<property name="shortcut" >
<string>Alt+D</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="applyButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>85</width>
<height>24</height>
</size>
</property>
<property name="text" >
<string>&amp;Apply</string>
</property>
<property name="shortcut" >
<string>Alt+A</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="resetButton" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>85</width>
<height>24</height>
</size>
</property>
<property name="text" >
<string>&amp;Reset</string>
</property>
<property name="shortcut" >
<string>Alt+R</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<customwidgets>
<customwidget>
<class>ScrPaletteBase</class>
<extends>QWidget</extends>
<header>scrpalettebase.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>StyleView</class>
<extends>QTreeWidget</extends>
<header>styleview.h</header>
/trunk/Scribus/scribus/shortcutwidget.ui
58,6 → 58,9
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<property name="lineWidth" >
<number>2</number>
</property>
<property name="text" >
<string/>
</property>
/trunk/Scribus/scribus/smcstylewidget.ui
6,7 → 6,7
<x>0</x>
<y>0</y>
<width>521</width>
<height>511</height>
<height>540</height>
</rect>
</property>
<layout class="QGridLayout" >
58,7 → 58,7
<item row="0" column="0" >
<widget class="SMFontComboH" native="1" name="fontFace_" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
65,26 → 65,13
</property>
<property name="minimumSize" >
<size>
<width>30</width>
<height>0</height>
<width>0</width>
<height>62</height>
</size>
</property>
</widget>
</item>
<item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2" >
<item row="1" column="0" >
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="fontSizeLabel_" >
100,7 → 87,14
</widget>
</item>
<item>
<widget class="SMScrSpinBox" name="fontSize_" />
<widget class="SMScrSpinBox" name="fontSize_" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>2048</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="trackingLabel_" >
116,7 → 110,17
</widget>
</item>
<item>
<widget class="SMScrSpinBox" name="tracking_" />
<widget class="SMScrSpinBox" name="tracking_" >
<property name="suffix" >
<string> %</string>
</property>
<property name="minimum" >
<number>-300</number>
</property>
<property name="maximum" >
<number>300</number>
</property>
</widget>
</item>
<item>
<spacer>
134,37 → 138,41
</layout>
</item>
<item row="2" column="0" >
<widget class="SMStyleSelect" native="1" name="effects_" >
<property name="sizePolicy" >
<sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>30</width>
<height>0</height>
</size>
</property>
</widget>
<layout class="QHBoxLayout" >
<item>
<widget class="SMStyleSelect" native="1" name="effects_" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>30</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="2" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0" >
<spacer>
<property name="orientation" >
203,7 → 211,17
</widget>
</item>
<item>
<widget class="SMScrSpinBox" name="fontHScale_" />
<widget class="SMScrSpinBox" name="fontHScale_" >
<property name="suffix" >
<string> %</string>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>400</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="vscaleLabel_" >
219,7 → 237,17
</widget>
</item>
<item>
<widget class="SMScrSpinBox" name="fontVScale_" />
<widget class="SMScrSpinBox" name="fontVScale_" >
<property name="suffix" >
<string> %</string>
</property>
<property name="minimum" >
<number>10</number>
</property>
<property name="maximum" >
<number>400</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="baselineOffsetLabel_" >
235,7 → 263,17
</widget>
</item>
<item>
<widget class="SMScrSpinBox" name="baselineOffset_" />
<widget class="SMScrSpinBox" name="baselineOffset_" >
<property name="suffix" >
<string> %</string>
</property>
<property name="minimum" >
<number>-100</number>
</property>
<property name="maximum" >
<number>100</number>
</property>
</widget>
</item>
<item>
<spacer>
279,6 → 317,19
</item>
</layout>
</item>
<item row="2" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
386,6 → 437,19
</property>
</spacer>
</item>
<item row="2" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
/trunk/Scribus/scribus/smcstylewidget.cpp
14,29 → 14,29
{
setupUi(this);
 
fontSize_->setMinimum(1.0);
fontSize_->setMaximum(2048.0);
// fontSize_->setMinimum(1.0);
// fontSize_->setMaximum(2048.0);
fontSizeLabel_->setPixmap(loadIcon("Zeichen.xpm"));
 
trackingLabel_->setPixmap( loadIcon("textkern.png") );
tracking_->setMinimum(-300.0);
tracking_->setMaximum(300.0);
tracking_->setSuffix( tr( " %" ) );
// tracking_->setMinimum(-300.0);
// tracking_->setMaximum(300.0);
// tracking_->setSuffix( tr( " %" ) );
 
baselineOffsetLabel_->setPixmap( loadIcon("textbase.png") );
baselineOffset_->setMinimum(-100.0);
baselineOffset_->setMaximum(100.0);
baselineOffset_->setSuffix( tr( " %" ) );
// baselineOffset_->setMinimum(-100.0);
// baselineOffset_->setMaximum(100.0);
// baselineOffset_->setSuffix( tr( " %" ) );
 
hscaleLabel_->setPixmap( loadIcon("textscaleh.png") );
fontHScale_->setMinimum(10.0);
fontHScale_->setMaximum(400.0);
fontHScale_->setSuffix( tr( " %" ) );
// fontHScale_->setMinimum(10.0);
// fontHScale_->setMaximum(400.0);
// fontHScale_->setSuffix( tr( " %" ) );
 
vscaleLabel_->setPixmap( loadIcon("textscalev.png") );
fontVScale_->setMinimum(10.0);
fontVScale_->setMaximum(400.0);
fontVScale_->setSuffix( tr( " %" ) );
// fontVScale_->setMinimum(10.0);
// fontVScale_->setMaximum(400.0);
// fontVScale_->setSuffix( tr( " %" ) );
 
FillIcon->setPixmap(loadIcon("16/color-fill.png"));
fillShadeLabel->setPixmap( loadIcon("shade.png") );
83,10 → 83,10
 
parentLabel->setText( tr("Based On:"));
languageLabel_->setText( tr("Language:"));
fontVScale_->setSuffix( tr(" %"));
fontHScale_->setSuffix( tr(" %"));
baselineOffset_->setSuffix( tr(" %"));
tracking_->setSuffix( tr(" %"));
// fontVScale_->setSuffix( tr(" %"));
// fontHScale_->setSuffix( tr(" %"));
// baselineOffset_->setSuffix( tr(" %"));
// tracking_->setSuffix( tr(" %"));
fontSize_->setSuffix(unitGetSuffixFromIndex(0));
}
 
/trunk/Scribus/scribus/smpstylewidget.cpp
20,9 → 20,6
}
 
 
/******************************************************************************/
/******************************************************************************/
 
SMPStyleWidget::SMPStyleWidget() : QWidget()
{
setupUi(this);
37,20 → 34,10
connect(lineSpacingMode_, SIGNAL(highlighted(int)), this, SLOT(slotLineSpacingModeChanged(int)));
 
lineSpacing_->setSuffix(unitGetSuffixFromIndex(0));
lineSpacing_->setMinimum(1);
lineSpacing_->setMaximum(300);
 
spaceAbove_->setSuffix(unitGetSuffixFromIndex(0));
spaceAbove_->setMinimum(0);
spaceAbove_->setMaximum(300);
 
spaceBelow_->setSuffix(unitGetSuffixFromIndex(0));
spaceBelow_->setMinimum(0);
spaceBelow_->setMaximum(300);
 
dropCapOffset_->setSuffix(unitGetSuffixFromIndex(0));
 
// characterBox->setEnabled(true);
}
 
void SMPStyleWidget::slotLineSpacingModeChanged(int i)
/trunk/Scribus/scribus/smpstylewidget.ui
31,7 → 31,7
<item row="0" column="0" >
<widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab" >
<attribute name="title" >
106,7 → 106,14
<widget class="SMScComboBox" name="lineSpacingMode_" />
</item>
<item row="0" column="2" >
<widget class="SMScrSpinBox" name="lineSpacing_" />
<widget class="SMScrSpinBox" name="lineSpacing_" >
<property name="minimum" >
<number>1</number>
</property>
<property name="maximum" >
<number>300</number>
</property>
</widget>
</item>
<item row="0" column="3" >
<spacer>
135,7 → 142,11
</widget>
</item>
<item row="1" column="1" >
<widget class="SMScrSpinBox" name="spaceAbove_" />
<widget class="SMScrSpinBox" name="spaceAbove_" >
<property name="maximum" >
<number>300</number>
</property>
</widget>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="pixmapLabel4" >
151,7 → 162,11
</widget>
</item>
<item row="2" column="1" >
<widget class="SMScrSpinBox" name="spaceBelow_" />
<widget class="SMScrSpinBox" name="spaceBelow_" >
<property name="maximum" >
<number>300</number>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="SMAlignSelect" native="1" name="alignement_" />
343,7 → 358,7
<item>
<widget class="QFrame" name="characterBox" >
<property name="enabled" >
<bool>false</bool>
<bool>true</bool>
</property>
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>