mirror of
https://github.com/creyD/intelliphoto.git
synced 2026-04-15 21:00:37 +02:00
Merge branch 'hotfix' into 'dev'
Fixed the Linux color picker and system dialog bugs See merge request creyd/intelliphoto!20
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,5 @@
|
|||||||
# Build folders
|
# Build folders
|
||||||
/build-*/
|
build-*/
|
||||||
|
|
||||||
# QT Creator Files
|
# QT Creator Files
|
||||||
*.creator.user*
|
*.creator.user*
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ IntelliPhotoGui::IntelliPhotoGui(){
|
|||||||
createMenus();
|
createMenus();
|
||||||
//set style of the gui
|
//set style of the gui
|
||||||
setIntelliStyle();
|
setIntelliStyle();
|
||||||
|
|
||||||
// Size the app
|
// Size the app
|
||||||
showMaximized();
|
showMaximized();
|
||||||
}
|
}
|
||||||
@@ -28,7 +27,6 @@ void IntelliPhotoGui::closeEvent(QCloseEvent *event){
|
|||||||
if (maybeSave()) {
|
if (maybeSave()) {
|
||||||
event->accept();
|
event->accept();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// If there have been changes ignore the event
|
// If there have been changes ignore the event
|
||||||
event->ignore();
|
event->ignore();
|
||||||
}
|
}
|
||||||
@@ -45,7 +43,7 @@ void IntelliPhotoGui::slotOpen(){
|
|||||||
// tr sets the window title to Open File
|
// tr sets the window title to Open File
|
||||||
// QDir opens the current dirctory
|
// QDir opens the current dirctory
|
||||||
QString fileName = QFileDialog::getOpenFileName(this,
|
QString fileName = QFileDialog::getOpenFileName(this,
|
||||||
tr("Open File"), QDir::currentPath());
|
tr("Open File"), QDir::currentPath(), nullptr, nullptr, QFileDialog::DontUseNativeDialog);
|
||||||
|
|
||||||
// If we have a file name load the image and place
|
// If we have a file name load the image and place
|
||||||
// it in the paintingArea
|
// it in the paintingArea
|
||||||
@@ -234,7 +232,7 @@ void IntelliPhotoGui::slotCreateLineTool(){
|
|||||||
void IntelliPhotoGui::slotAboutDialog(){
|
void IntelliPhotoGui::slotAboutDialog(){
|
||||||
// Window title and text to display
|
// Window title and text to display
|
||||||
QMessageBox::about(this, tr("About Painting"),
|
QMessageBox::about(this, tr("About Painting"),
|
||||||
tr("<p><b>IntelliPhoto</b> Some nice ass looking software</p>"));
|
tr("<p><b>IntelliPhoto</b>Pretty basic editor.</p>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define menu actions that call functions
|
// Define menu actions that call functions
|
||||||
@@ -276,6 +274,7 @@ void IntelliPhotoGui::createActions(){
|
|||||||
|
|
||||||
// Create New Layer action and tie to IntelliPhotoGui::newLayer()
|
// Create New Layer action and tie to IntelliPhotoGui::newLayer()
|
||||||
actionCreateNewLayer = new QAction(tr("&New Layer..."), this);
|
actionCreateNewLayer = new QAction(tr("&New Layer..."), this);
|
||||||
|
actionCreateNewLayer->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N));
|
||||||
connect(actionCreateNewLayer, SIGNAL(triggered()), this, SLOT(slotCreateNewLayer()));
|
connect(actionCreateNewLayer, SIGNAL(triggered()), this, SLOT(slotCreateNewLayer()));
|
||||||
|
|
||||||
// Delete New Layer action and tie to IntelliPhotoGui::deleteLayer()
|
// Delete New Layer action and tie to IntelliPhotoGui::deleteLayer()
|
||||||
@@ -317,7 +316,7 @@ void IntelliPhotoGui::createActions(){
|
|||||||
connect(actionColorPickerFirstColor, SIGNAL(triggered()), this, SLOT(slotSetFirstColor()));
|
connect(actionColorPickerFirstColor, SIGNAL(triggered()), this, SLOT(slotSetFirstColor()));
|
||||||
|
|
||||||
actionColorPickerSecondColor = new QAction(tr("&Secondary"), this);
|
actionColorPickerSecondColor = new QAction(tr("&Secondary"), this);
|
||||||
connect(actionColorPickerSecondColor, SIGNAL(triggered()), this, SLOT(slotSetFirstColor()));
|
connect(actionColorPickerSecondColor, SIGNAL(triggered()), this, SLOT(slotSetSecondColor()));
|
||||||
|
|
||||||
actionColorSwitch = new QAction(tr("&Switch"), this);
|
actionColorSwitch = new QAction(tr("&Switch"), this);
|
||||||
actionColorSwitch->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
|
actionColorSwitch->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_S));
|
||||||
@@ -462,7 +461,7 @@ bool IntelliPhotoGui::saveFile(const QByteArray &fileFormat){
|
|||||||
initialPath,
|
initialPath,
|
||||||
tr("%1 Files (*.%2);;All Files (*)")
|
tr("%1 Files (*.%2);;All Files (*)")
|
||||||
.arg(QString::fromLatin1(fileFormat.toUpper()))
|
.arg(QString::fromLatin1(fileFormat.toUpper()))
|
||||||
.arg(QString::fromLatin1(fileFormat)));
|
.arg(QString::fromLatin1(fileFormat)), nullptr, QFileDialog::DontUseNativeDialog);
|
||||||
|
|
||||||
// If no file do nothing
|
// If no file do nothing
|
||||||
if (fileName.isEmpty()) {
|
if (fileName.isEmpty()) {
|
||||||
|
|||||||
@@ -164,12 +164,12 @@ void PaintingArea::slotActivateLayer(int a){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::colorPickerSetFirstColor(){
|
void PaintingArea::colorPickerSetFirstColor(){
|
||||||
QColor clr = QColorDialog::getColor(colorPicker.getFirstColor(), nullptr, "Main Color");
|
QColor clr = QColorDialog::getColor(colorPicker.getFirstColor(), nullptr, "Main Color", QColorDialog::DontUseNativeDialog);
|
||||||
this->colorPicker.setFirstColor(clr);
|
this->colorPicker.setFirstColor(clr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaintingArea::colorPickerSetSecondColor(){
|
void PaintingArea::colorPickerSetSecondColor(){
|
||||||
QColor clr = QColorDialog::getColor(colorPicker.getSecondColor(), nullptr, "Secondary Color");
|
QColor clr = QColorDialog::getColor(colorPicker.getSecondColor(), nullptr, "Secondary Color", QColorDialog::DontUseNativeDialog);
|
||||||
this->colorPicker.setSecondColor(clr);
|
this->colorPicker.setSecondColor(clr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ struct LayerObject{
|
|||||||
int widthOffset;
|
int widthOffset;
|
||||||
int hightOffset;
|
int hightOffset;
|
||||||
int alpha=255;
|
int alpha=255;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PaintingArea : public QWidget
|
class PaintingArea : public QWidget
|
||||||
@@ -83,7 +81,6 @@ private:
|
|||||||
void activateUpperLayer();
|
void activateUpperLayer();
|
||||||
void activateLowerLayer();
|
void activateLowerLayer();
|
||||||
|
|
||||||
|
|
||||||
QImage* Canvas;
|
QImage* Canvas;
|
||||||
int maxWidth;
|
int maxWidth;
|
||||||
int maxHeight;
|
int maxHeight;
|
||||||
@@ -104,4 +101,3 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user