Commit 3fab8574 authored by Adam Celarek's avatar Adam Celarek

o shring the toolbox widget of the transform tool.

 - it uses 6 more icons instead of text
 - added tooltips for icons
 - changed layoutspacing and rearanged some parts

svn path=/trunk/koffice/; revision=1177268
parent 367376c5
......@@ -28,6 +28,12 @@ install(FILES
paintop_settings_02.png
paintop_settings_disabled.png
paintop_presets_disabled.png
width_icon.png
height_icon.png
shear_horizontal.png
shear_vertical.png
offset_horizontal.png
offset_vertical.png
DESTINATION ${DATA_INSTALL_DIR}/krita/pics)
kde4_install_icons( ${ICON_INSTALL_DIR} )
......
......@@ -486,7 +486,7 @@ void KisToolTransform::paint(QPainter& gc, const KoViewConverter &converter)
if (m_origSelectionImg != NULL)
m_scaledOrigSelectionImg = m_origSelectionImg->scaled(m_refSize.width() * m_origSelectionImg->width(), m_refSize.height() * m_origSelectionImg->height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
if (m_optWidget && m_optWidget->hideDecorationsBox && m_optWidget->hideDecorationsBox->isChecked()) {
if (m_optWidget && m_optWidget->showDecorationsBox && !m_optWidget->showDecorationsBox->isChecked()) {
if (m_imageTooBig)
return;
......@@ -588,7 +588,7 @@ void KisToolTransform::paint(QPainter& gc, const KoViewConverter &converter)
if (m_origSelectionImg != NULL)
m_scaledOrigSelectionImg = m_origSelectionImg->scaled(m_refSize.width() * m_origSelectionImg->width(), m_refSize.height() * m_origSelectionImg->height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
if (m_optWidget && m_optWidget->hideDecorationsBox && !m_optWidget->hideDecorationsBox->isChecked()) {
if (m_optWidget && m_optWidget->showDecorationsBox && m_optWidget->showDecorationsBox->isChecked()) {
gc.setOpacity(0.6);
gc.drawImage(origtopleft, m_scaledOrigSelectionImg, QRectF(m_scaledOrigSelectionImg.rect()));
......@@ -2286,7 +2286,7 @@ QWidget* KisToolTransform::createOptionWidget() {
connect(m_optWidget->buttonBox, SIGNAL(clicked(QAbstractButton *)), this, SLOT(slotButtonBoxClicked(QAbstractButton *)));
KisCanvas2 *canvas = dynamic_cast<KisCanvas2 *>(m_canvas);
if (canvas)
connect(m_optWidget->hideDecorationsBox, SIGNAL(stateChanged(int)), canvas, SLOT(updateCanvas()));
connect(m_optWidget->showDecorationsBox, SIGNAL(toggled(bool)), canvas, SLOT(updateCanvas()));
setButtonBoxDisabled(true);
connect(m_optWidget->scaleXBox, SIGNAL(editingFinished()), this, SLOT(slotEditingFinished()));
......
......@@ -32,6 +32,7 @@
#include <QButtonGroup>
#include <KStandardDirs>
#include <KIcon>
#include <KoInteractionTool.h>
#include <KoToolFactoryBase.h>
......@@ -55,6 +56,15 @@ class WdgToolTransform : public QWidget, public Ui::WdgToolTransform
public:
WdgToolTransform(QWidget *parent) : QWidget(parent) {
setupUi(this);
showDecorationsBox->setIcon(KIcon("krita_tool_transform"));
label_shearX->setPixmap(KIcon("shear_horizontal").pixmap(16, 16));
label_shearY->setPixmap(KIcon("shear_vertical").pixmap(16, 16));
label_width->setPixmap(KIcon("width_icon").pixmap(16, 16));
label_height->setPixmap(KIcon("height_icon").pixmap(16, 16));
label_offsetX->setPixmap(KIcon("offset_horizontal").pixmap(16, 16));
label_offsetY->setPixmap(KIcon("offset_vertical").pixmap(16, 16));
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment