Commit 062db74d authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Merge branch 'master' into krita-testing-wolthera

parents 2e057e7a 76255392
From 674cfce97c4972176d2bcb55d7013c0ac2190029 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Tue, 21 Jun 2016 14:50:07 +0300
Subject: [PATCH 1/2] Don't request the MIME image every time Windows asks for
the list of supported types
Change-Id: I05516d83dc4e0f192bc94f92cefc722f25dae4d4
---
src/plugins/platforms/windows/qwindowsmime.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index a8264b5..90d646b 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -1081,12 +1081,15 @@ bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *p
bool QWindowsMimeImage::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
{
int cf = getCf(formatetc);
+
+ if (cf != CF_DIBV5 && cf != CF_DIB && cf != CF_PNG)
+ return false;
+
if (!mimeData->hasImage())
return false;
+
const QImage image = qvariant_cast<QImage>(mimeData->imageData());
- if (image.isNull())
- return false;
- return cf == CF_DIBV5 || (cf == CF_DIB) || cf == int(CF_PNG);
+ return !image.isNull();
}
bool QWindowsMimeImage::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const
--
2.6.4
From 5e5026beb420018266d3d00fdb530bb714a841a6 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Tue, 21 Jun 2016 14:50:47 +0300
Subject: [PATCH 2/2] Hack: always return we support DIBV5
Asking for the entire image may be too expensive
Change-Id: I44c38fad73f1bb5859eb58b941054eeb6c3c6b66
---
src/plugins/platforms/windows/qwindowsmime.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index 90d646b..ef97db7 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -1052,9 +1052,7 @@ QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, co
QVector<FORMATETC> formatetcs;
if (mimeData->hasImage() && mimeType == QLatin1String("application/x-qt-image")) {
//add DIBV5 if image has alpha channel. Do not add CF_PNG here as it will confuse MS Office (QTBUG47656).
- QImage image = qvariant_cast<QImage>(mimeData->imageData());
- if (!image.isNull() && image.hasAlphaChannel())
- formatetcs += setCf(CF_DIBV5);
+ formatetcs += setCf(CF_DIBV5);
formatetcs += setCf(CF_DIB);
}
if (!formatetcs.isEmpty())
--
2.6.4
......@@ -7,6 +7,8 @@ ExternalProject_Add(
URL_MD5 03402708f260dcc917abae9bc559c1df
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/disable-wintab.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qtgui-private-headers.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Hack-always-return-we-support-DIBV5.patch
INSTALL_DIR ${EXTPREFIX_qt}
CONFIGURE_COMMAND <SOURCE_DIR>/configure.bat -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools -no-compile-examples -no-dbus -no-iconv -no-angle -no-ssl -no-openssl -no-wmf-backend -no-qml-debug -no-libproxy -no-system-proxies -no-nis -no-icu -no-mtdev -opensource -confirm-license -release -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -prefix ${EXTPREFIX_qt}
......
......@@ -4,7 +4,9 @@ URL=.source/Anim-Jp-EN.kra
Icon=template_animation
Name=Animation-Japanese-En
Name[ca]=Animació-Japonès-EN
Name[ca@valencia]=Animació-Japonés-EN
Name[es]=Animación-Japonés-En
Name[it]=Animazione-Giapponese-EN
Name[nl]=Animatie-Japans-En
Name[pl]=Animacja-Japońska-En
Name[pt]=Animação-Japonês-EN
......
......@@ -4,7 +4,9 @@ URL=.source/Anim-Jp-JP.kra
Icon=template_animation
Name=Animation-Japanese-JP
Name[ca]=Animació-Japonès-JP
Name[ca@valencia]=Animació-Japonés-JP
Name[es]=Animación-Japonés-JP
Name[it]=Animazione-Giapponese-JP
Name[nl]=Animatie-Japans-JP
Name[pl]=Animacja-Japońska-JP
Name[pt]=Animação-Japonês-JP
......
......@@ -445,11 +445,6 @@ void KoCanvasControllerWidget::zoomTo(const QRect &viewRect)
zoomBy(viewRect.center(), scale);
}
void KoCanvasControllerWidget::setToolOptionWidgets(const QList<QPointer<QWidget> >&widgetMap)
{
emit toolOptionWidgetsChanged(widgetMap);
}
void KoCanvasControllerWidget::updateDocumentSize(const QSize &sz, bool recalculateCenter)
{
// Don't update if the document-size didn't changed to prevent infinite loops and unneeded updates.
......
......@@ -145,13 +145,6 @@ public:
class Private;
KoCanvasControllerWidget::Private *priv();
Q_SIGNALS:
/**
* Emit the new tool option widgets to be used with this canvas.
*/
void toolOptionWidgetsChanged(const QList<QPointer<QWidget> > &widgets);
private Q_SLOTS:
/// Called by the horizontal scrollbar when its value changes
......
......@@ -744,10 +744,7 @@ void KoToolManager::Private::postSwitchTool(bool temporary)
emit q->changedTool(canvasData->canvas, uniqueToolIds.value(canvasData->activeTool));
KoCanvasControllerWidget *canvasControllerWidget = dynamic_cast<KoCanvasControllerWidget*>(canvasData->canvas);
if (canvasControllerWidget) {
canvasControllerWidget->setToolOptionWidgets(optionWidgetList);
}
emit q->toolOptionWidgetsChanged(optionWidgetList);
}
......@@ -821,10 +818,7 @@ void KoToolManager::Private::detachCanvas(KoCanvasController *controller)
if (newCanvas) {
switchCanvasData(canvasses.value(newCanvas).first());
} else {
KoCanvasControllerWidget *canvasControllerWidget = dynamic_cast<KoCanvasControllerWidget*>(canvasData->canvas);
if (canvasControllerWidget) {
canvasControllerWidget->setToolOptionWidgets(QList<QPointer<QWidget> >());
}
emit q->toolOptionWidgetsChanged(QList<QPointer<QWidget> >());
// as a last resort just set a blank one
canvasData = 0;
}
......
......@@ -324,6 +324,10 @@ Q_SIGNALS:
*/
void addedTool(KoToolAction *toolAction, KoCanvasController *canvas);
/**
* Emit the new tool option widgets to be used with this canvas.
*/
void toolOptionWidgetsChanged(const QList<QPointer<QWidget> > &widgets);
private:
KoToolManager(const KoToolManager&);
KoToolManager operator=(const KoToolManager&);
......
......@@ -82,7 +82,6 @@ Value::Value(const Value& v) : d(new Private)
Value& Value::operator=(const Value & v)
{
Q_ASSERT(d->type == Invalid || d->type == v.d->type);
d->type = v.d->type;
d->propertyQualifiers = v.d->propertyQualifiers;
switch (d->type) {
......
......@@ -351,6 +351,7 @@ KisMainWindow::KisMainWindow()
if (d->toolOptionsDocker) {
dockwidgetActions[d->toolOptionsDocker->toggleViewAction()->text()] = d->toolOptionsDocker->toggleViewAction();
}
connect(KoToolManager::instance(), SIGNAL(toolOptionWidgetsChanged(QList<QPointer<QWidget> >)), this, SLOT(newOptionWidgets(QList<QPointer<QWidget> >)));
Q_FOREACH (QString title, dockwidgetActions.keys()) {
d->dockWidgetMenu->addAction(dockwidgetActions[title]);
......
......@@ -382,7 +382,6 @@ void KisViewManager::setCurrentView(KisView *view)
d->viewConnections.addUniqueConnection(d->levelOfDetailAction, SIGNAL(toggled(bool)), canvasController, SLOT(slotToggleLevelOfDetailMode(bool)));
d->levelOfDetailAction->setChecked(canvasController->levelOfDetailMode());
d->viewConnections.addUniqueConnection(d->currentImageView->canvasController(), SIGNAL(toolOptionWidgetsChanged(QList<QPointer<QWidget> >)), mainWindow(), SLOT(newOptionWidgets(QList<QPointer<QWidget> >)));
d->viewConnections.addUniqueConnection(d->currentImageView->image(), SIGNAL(sigColorSpaceChanged(const KoColorSpace*)), d->controlFrame.paintopBox(), SLOT(slotColorSpaceChanged(const KoColorSpace*)));
d->viewConnections.addUniqueConnection(d->showRulersAction, SIGNAL(toggled(bool)), imageView->zoomManager(), SLOT(setShowRulers(bool)));
d->viewConnections.addUniqueConnection(d->rulersTrackMouseAction, SIGNAL(toggled(bool)), imageView->zoomManager(), SLOT(setRulersTrackMouse(bool)));
......
......@@ -813,11 +813,11 @@ void KisCanvas2::slotSetDisplayProfile(const KoColorProfile *monitorProfile)
m_d->displayColorConverter.setMonitorProfile(monitorProfile);
KisImageWSP image = this->image();
image->barrierLock();
m_d->canvasWidget->setDisplayProfile(&m_d->displayColorConverter);
{
KisImageSP image = this->image();
KisImageBarrierLocker l(image);
m_d->canvasWidget->setDisplayProfile(&m_d->displayColorConverter);
}
refetchDataFromImage();
}
......
......@@ -464,14 +464,35 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
}
// d->resetSavedTabletEvent(event->type());
break;
case QEvent::TouchUpdate:
touch_start_block_press_events();
KisAbstractInputAction::setInputManager(this);
case QEvent::TouchUpdate: {
QTouchEvent *tevent = static_cast<QTouchEvent*>(event);
#ifdef Q_OS_MAC
int count = 0;
Q_FOREACH (const QTouchEvent::TouchPoint &point, tevent->touchPoints()) {
if (point.state() != Qt::TouchPointReleased) {
count++;
}
}
retval = d->matcher.touchUpdateEvent(static_cast<QTouchEvent*>(event));
if (count < 2 && tevent->touchPoints().length() > count) {
touch_stop_block_press_events();
d->saveTouchEvent(tevent);
retval = d->matcher.touchEndEvent(tevent);
delete d->lastTouchEvent;
d->lastTouchEvent = 0;
} else {
#endif
touch_start_block_press_events();
KisAbstractInputAction::setInputManager(this);
retval = d->matcher.touchUpdateEvent(tevent);
#ifdef Q_OS_MAC
}
#endif
event->accept();
// d->resetSavedTabletEvent(event->type());
break;
}
case QEvent::TouchEnd:
touch_stop_block_press_events();
d->saveTouchEvent(static_cast<QTouchEvent*>(event));
......
......@@ -220,7 +220,7 @@ void QXcbConnection::xi2SetupDevices()
isTablet = true;
tabletData.pointerType = QTabletEvent::Pen;
dbgType = QLatin1String("pen");
} else if (name.contains("uc-logic") && isTablet) {
} else if (name.contains("uc-logic")) {
isTablet = true;
tabletData.pointerType = QTabletEvent::Pen;
dbgType = QLatin1String("pen");
......
......@@ -37,6 +37,7 @@
#include <KoResourceModel.h>
#include <KoResourceServerAdapter.h>
#include <KoResourceItemChooserSync.h>
#include "KoResourceItemView.h"
#include <brushengine/kis_paintop_settings.h>
#include <brushengine/kis_paintop_preset.h>
......@@ -242,6 +243,8 @@ void KisPresetChooser::updateViewSettings()
} else if (m_mode == STRIP) {
m_chooser->setSynced(false);
m_chooser->setRowCount(1);
m_chooser->itemView()->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_chooser->itemView()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
// An offset of 7 keeps the cell exactly square, TODO: use constants, not hardcoded numbers
m_chooser->setColumnWidth(m_chooser->viewSize().height() - 7);
m_delegate->setShowText(false);
......
......@@ -35,8 +35,6 @@ KisPresetSelectorStrip::KisPresetSelectorStrip(QWidget* parent)
smallPresetChooser->showButtons(false);
smallPresetChooser->setViewMode(KisPresetChooser::STRIP);
m_resourceItemView = smallPresetChooser->itemChooser()->itemView();
m_resourceItemView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_resourceItemView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
/* This is an heuristic to fill smallPresetChooser with only the presets
* for the paintop that comes selected by default: Pixel Brush. */
......
......@@ -173,6 +173,7 @@ KoResourceItemChooser::KoResourceItemChooser(QSharedPointer<KoAbstractResourceSe
d->viewModeButton->setVisible(false);
d->tagManager = new KoResourceTaggingManager(d->model, this);
connect(d->tagManager, SIGNAL(updateView()), this, SLOT(updateView()));
layout->addWidget(d->tagManager->tagChooserWidget(), 0, 0);
layout->addWidget(d->viewModeButton, 0, 1);
......
......@@ -295,6 +295,7 @@ void KoResourceTaggingManager::updateTaggedResourceView()
d->model->setCurrentTag(d->currentTag);
d->model->updateServer();
d->originalResources = d->model->currentlyVisibleResources();
emit updateView();
}
void KoResourceTaggingManager::tagChooserIndexChanged(const QString& lineEditText)
......
......@@ -59,6 +59,9 @@ public:
KoTagFilterWidget* tagFilterWidget();
KoTagChooserWidget* tagChooserWidget();
Q_SIGNALS:
void updateView();
private Q_SLOTS:
void undeleteTag(const QString& tagToUndelete);
......
name: krita
version: 3.0-snap11
summary: Pixel-based image manipulation program for the Calligra Suite
summary: Krita is the digital painting studio for artists
description: Krita is a creative application for raster images. Whether you want to create
from scratch or work with existing images, Krita is for you. You can work with
photos or scanned images, or start with a blank slate. Krita supports most
......
set -e # stop on errors
set -x # be verbise
set -x # be verbose
/Users/boud/dev/bin/fixrpath.sh
rm -rf ~/dev/krita.app/
rm -rf ~/dev/krita.dmg
cp -r ~/dev/i/bin/krita.app ~/dev
cp -r ~/dev/i/share ~/dev/krita.app/Contents/
mkdir -p ~/dev/krita.app/Contents/PlugIns/kritaplugins
cp -r ~/dev/i/share/* ~/dev/krita.app/Contents/Resources
cd ~/dev/krita.app/Contents
ln -s Resources share
install_name_tool -add_rpath /Users/boud/dev/i/lib ~/dev/krita.app/Contents/MacOS/krita
......@@ -15,8 +15,7 @@ install_name_tool -add_rpath /Users/boud/dev/i/lib ~/dev/krita.app/Contents/MacO
-executable=/Users/boud/dev/krita.app/Contents/MacOS/krita \
-extra-plugins=/Users/boud/dev/i/lib/kritaplugins/ \
-extra-plugins=/Users/boud/dev/i/lib/plugins/ \
-extra-plugins=/Users/boud/dev/i/plugins/ \
-dmg
-extra-plugins=/Users/boud/dev/i/plugins/
#install_name_tool -delete_rpath @loader_path/../../../../lib ~/dev/krita.app/Contents/MacOS/krita
set(KRITA_HISTOGRAMDOCKER_SOURCES histogramdocker.cpp histogramdocker_dock.cpp )
add_library(kritahistogramdocker MODULE ${KRITA_HISTOGRAMDOCKER_SOURCES})
target_link_libraries(kritahistogramdocker kritaui)
install(TARGETS kritahistogramdocker DESTINATION ${KRITA_PLUGIN_INSTALL_DIR})
#install(TARGETS kritahistogramdocker DESTINATION ${KRITA_PLUGIN_INSTALL_DIR})
......@@ -51,7 +51,7 @@ WdgFeatherSelection::WdgFeatherSelection(QWidget* parent, KisViewManager* view)
spbGroup->addWidget(spbRadius);
spbGroup->addWidget(spbRadiusDouble);
connect(spbRadius, SIGNAL(valueChanged(double)), this, SLOT(slotRadiusChanged(double)));
connect(spbRadius, SIGNAL(valueChanged(int)), this, SLOT(slotRadiusChanged(int)));
connect(spbRadiusDouble, SIGNAL(valueChanged(double)), this, SLOT(slotRadiusChanged(double)));
connect(cmbUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUnitChanged(int)));
}
......
......@@ -108,7 +108,7 @@ KisImportExportFilter::ConversionStatus KisVideoExport::convert(const QByteArray
if (!kpc.hasFFMpeg()) {
const QString warningMessage =
i18n("Couldn not find \'ffmpeg\' binary. Saving to video formats is impossible.");
i18n("Could not find \'ffmpeg\' binary. Saving to video formats is impossible.");
if (askForOptions) {
QMessageBox::critical(KisPart::instance()->currentMainwindow(),
......
......@@ -385,6 +385,8 @@ bool KisFreeTransformStrategy::beginPrimaryAction(const QPointF &pt)
void KisFreeTransformStrategy::continuePrimaryAction(const QPointF &mousePos, bool specialModifierActive)
{
// Note: "specialModifierActive" just tells us if the shift key is being pressed
switch (m_d->function) {
case MOVE: {
QPointF diff = mousePos - m_d->clickPos;
......@@ -421,9 +423,18 @@ void KisFreeTransformStrategy::continuePrimaryAction(const QPointF &mousePos, bo
qreal a1 = atan2(clickMouseImagePos.y(), clickMouseImagePos.x());
qreal a2 = atan2(mouseImagePos.y(), mouseImagePos.x());
double theta = -a1 + a2;
qreal theta = a2 - a1;
m_d->currentArgs.setAZ(normalizeAngle(m_d->clickArgs.aZ() + theta));
// Snap with shift key
if (specialModifierActive) {
const qreal snapAngle = M_PI_4 / 6.0; // fifteen degrees
qint32 thetaIndex = static_cast<qint32>((theta / snapAngle) + 0.5);
m_d->currentArgs.setAZ(normalizeAngle(thetaIndex * snapAngle));
}
else {
m_d->currentArgs.setAZ(normalizeAngle(m_d->clickArgs.aZ() + theta));
}
KisTransformUtils::MatricesPack m(m_d->currentArgs);
QTransform t = m.finalTransform();
......
......@@ -61,17 +61,25 @@ class KisPerspectiveTransformStrategy;
/**
* Transform tool
* The tool offers two different modes : Free Transform and Warp
* - Free Transform mode allows the user to translate, scale, shear, rotate
* and apply a perspective transformation to a selection or the whole
* canvas.
* - Warp mode allows the user to warp the selection of the canvas
* by grabbing and moving control points placed on the image.
* The user can either work with default control points, like a grid
* whose density can be modified, or place the control points manually.
* The modifications made on the selected pixels are applied only when
* the user clicks the Apply button : the semi-transparent image displayed
* until the user click that button is only a preview.
* This tool offers several modes.
* - Free Transform mode allows the user to translate, scale, shear, rotate and
* apply a perspective transformation to a selection or the whole canvas.
* - Warp mode allows the user to warp the selection of the canvas by grabbing
* and moving control points placed on the image. The user can either work
* with default control points, like a grid whose density can be modified, or
* place the control points manually. The modifications made on the selected
* pixels are applied only when the user clicks the Apply button : the
* semi-transparent image displayed until the user click that button is only a
* preview.
* - Cage transform is similar to warp transform with control points exactly
* placed on the outer boundary. The user draws a boundary polygon, the
* vertices of which become control points.
* - Perspective transform applies a two-point perspective transformation. The
* user can manipulate the corners of the selection. If the vanishing points
* of the resulting quadrilateral are on screen, the user can manipulate those
* as well.
* - Liquify transform transforms the selection by painting motions, as if the
* user were fingerpainting.
*/
class KisToolTransform : public KisTool
{
......
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