diff --git a/ImportDialog.cpp b/ImportDialog.cpp
index 59ea61d..afc2373 100644
--- a/ImportDialog.cpp
+++ b/ImportDialog.cpp
@@ -52,6 +52,8 @@ ImportDialog::ImportDialog(QWidget *parent) :
ui->setupUi(this);
importAgreed = false;
+ watermarkAvatar = true;
+ watermarkPicture = false;
insideAvatarZone = false;
avatarAreaImage = QImage(":/img/avatarareaimport.png");
selectedColour = QColor::fromRgb(0, 0, 0, 255);
@@ -169,6 +171,7 @@ void ImportDialog::processImage()
snapmaticImage = snapmaticImage.scaled(snapmaticAvatarResolution, snapmaticAvatarResolution, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
snapmaticPainter.drawImage(snapmaticAvatarPlacementW + diffWidth, snapmaticAvatarPlacementH + diffHeight, snapmaticImage);
+ if (ui->cbWatermark->isChecked()) { processWatermark(&snapmaticPainter); }
imageTitle = tr("Custom Avatar", "Custom Avatar Description in SC, don't use Special Character!");
}
else
@@ -195,6 +198,7 @@ void ImportDialog::processImage()
snapmaticImage = snapmaticImage.scaled(snapmaticResolutionW, snapmaticResolutionH, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
snapmaticPainter.drawImage(0 + diffWidth, 0 + diffHeight, snapmaticImage);
+ if (ui->cbWatermark->isChecked()) { processWatermark(&snapmaticPainter); }
imageTitle = tr("Custom Picture", "Custom Picture Description in SC, don't use Special Character!");
}
snapmaticPainter.end();
@@ -202,6 +206,47 @@ void ImportDialog::processImage()
ui->labPicture->setPixmap(snapmaticPixmap.scaled(snapmaticResolutionLW, snapmaticResolutionLH, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
}
+void ImportDialog::processWatermark(QPainter *snapmaticPainter)
+{
+ bool blackWatermark = false;
+ bool redWatermark = false;
+ if (selectedColour.red() > 127)
+ {
+ if (selectedColour.green() > 127 || selectedColour.blue() > 127)
+ {
+ redWatermark = true;
+ }
+ }
+ else
+ {
+ redWatermark = true;
+ }
+ if (selectedColour.lightness() > 127)
+ {
+ blackWatermark = true;
+ }
+ // draw watermark
+ if (redWatermark)
+ {
+ snapmaticPainter->drawImage(0, 0, QImage(":/img/watermark_2r.png"));
+ }
+ else
+ {
+ QImage viewWatermark = QImage(":/img/watermark_2b.png");
+ if (!blackWatermark)
+ {
+ viewWatermark.invertPixels(QImage::InvertRgb);
+ }
+ snapmaticPainter->drawImage(0, 0, viewWatermark);
+ }
+ QImage textWatermark = QImage(":/img/watermark_1b.png");
+ if (!blackWatermark)
+ {
+ textWatermark.invertPixels(QImage::InvertRgb);
+ }
+ snapmaticPainter->drawImage(0, 0, textWatermark);
+}
+
QImage ImportDialog::image()
{
return newImage;
@@ -271,6 +316,16 @@ void ImportDialog::on_cbAvatar_toggled(bool checked)
}
}
insideAvatarZone = ui->cbAvatar->isChecked();
+ watermarkBlock = true;
+ if (insideAvatarZone)
+ {
+ ui->cbWatermark->setChecked(watermarkAvatar);
+ }
+ else
+ {
+ ui->cbWatermark->setChecked(watermarkPicture);
+ }
+ watermarkBlock = false;
processImage();
}
@@ -402,3 +457,19 @@ void ImportDialog::on_cbForceAvatarColour_toggled(bool checked)
Q_UNUSED(checked)
processImage();
}
+
+void ImportDialog::on_cbWatermark_toggled(bool checked)
+{
+ if (!watermarkBlock)
+ {
+ if (insideAvatarZone)
+ {
+ watermarkAvatar = checked;
+ }
+ else
+ {
+ watermarkPicture = checked;
+ }
+ processImage();
+ }
+}
diff --git a/ImportDialog.h b/ImportDialog.h
index 70e0648..c58b9f5 100644
--- a/ImportDialog.h
+++ b/ImportDialog.h
@@ -49,6 +49,7 @@ private slots:
void on_cmdBackgroundWipe_clicked();
void on_cbStretch_toggled(bool checked);
void on_cbForceAvatarColour_toggled(bool checked);
+ void on_cbWatermark_toggled(bool checked);
private:
Ui::ImportDialog *ui;
@@ -60,9 +61,13 @@ private:
QImage newImage;
QColor selectedColour;
bool insideAvatarZone;
+ bool watermarkPicture;
+ bool watermarkAvatar;
+ bool watermarkBlock;
bool importAgreed;
int snapmaticResolutionLW;
int snapmaticResolutionLH;
+ void processWatermark(QPainter *snapmaticPainter);
};
#endif // IMPORTDIALOG_H
diff --git a/ImportDialog.ui b/ImportDialog.ui
index 61c15fe..a4e76a8 100644
--- a/ImportDialog.ui
+++ b/ImportDialog.ui
@@ -7,13 +7,13 @@
0
0
516
- 425
+ 512
516
- 425
+ 512
@@ -85,7 +85,7 @@
-
-
+
-
@@ -114,6 +114,23 @@
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Watermark
+
+
+
+
+
diff --git a/res/5sync-128.png b/res/5sync-128.png
index 4b4bf5a..fc3d97a 100644
Binary files a/res/5sync-128.png and b/res/5sync-128.png differ
diff --git a/res/5sync-16.png b/res/5sync-16.png
index 9db49fd..662b09d 100644
Binary files a/res/5sync-16.png and b/res/5sync-16.png differ
diff --git a/res/5sync-24.png b/res/5sync-24.png
index 01c2fcf..3b2797b 100644
Binary files a/res/5sync-24.png and b/res/5sync-24.png differ
diff --git a/res/5sync-256.png b/res/5sync-256.png
index bf41d47..e728fb4 100644
Binary files a/res/5sync-256.png and b/res/5sync-256.png differ
diff --git a/res/5sync-32.png b/res/5sync-32.png
index 6a768fd..b0f64cd 100644
Binary files a/res/5sync-32.png and b/res/5sync-32.png differ
diff --git a/res/5sync-40.png b/res/5sync-40.png
index 0852394..27a6988 100644
Binary files a/res/5sync-40.png and b/res/5sync-40.png differ
diff --git a/res/5sync-48.png b/res/5sync-48.png
index ff8390c..3f32f7e 100644
Binary files a/res/5sync-48.png and b/res/5sync-48.png differ
diff --git a/res/5sync-64.png b/res/5sync-64.png
index 123db7e..e48fb58 100644
Binary files a/res/5sync-64.png and b/res/5sync-64.png differ
diff --git a/res/5sync-96.png b/res/5sync-96.png
index 49f1db7..975157d 100644
Binary files a/res/5sync-96.png and b/res/5sync-96.png differ
diff --git a/res/app.qrc b/res/app.qrc
index 6267979..9874535 100644
--- a/res/app.qrc
+++ b/res/app.qrc
@@ -20,8 +20,9 @@
pointmaker-24.png
pointmaker-32.png
savegame.png
- watermark.png
- watermarkdark.png
+ watermark_1b.png
+ watermark_2b.png
+ watermark_2r.png
global.rcc
diff --git a/res/avatararea.png b/res/avatararea.png
index 6305664..463d846 100644
Binary files a/res/avatararea.png and b/res/avatararea.png differ
diff --git a/res/avatarareaimport.png b/res/avatarareaimport.png
index 97c53cf..cddc1d8 100644
Binary files a/res/avatarareaimport.png and b/res/avatarareaimport.png differ
diff --git a/res/back.png b/res/back.png
index 49beb0a..3c01d8c 100644
Binary files a/res/back.png and b/res/back.png differ
diff --git a/res/empty1x16.png b/res/empty1x16.png
index 6ab4481..b5abfe6 100644
Binary files a/res/empty1x16.png and b/res/empty1x16.png differ
diff --git a/res/gta5sync.ts b/res/gta5sync.ts
index 6efb796..768e44b 100644
--- a/res/gta5sync.ts
+++ b/res/gta5sync.ts
@@ -238,102 +238,107 @@ Pictures and Savegames
-
+
-
+
+
+
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
Custom Avatar Description in SC, don't use Special Character!
-
+
Custom Picture Description in SC, don't use Special Character!
-
+
-
+
-
+
-
+
-
+
Background Image: File
@@ -1040,7 +1045,7 @@ Press 1 for Default View
-
+
@@ -1051,9 +1056,9 @@ Press 1 for Default View
-
-
-
+
+
+
@@ -1073,14 +1078,14 @@ Press 1 for Default View
-
+
-
+
@@ -1088,14 +1093,14 @@ Press 1 for Default View
-
+
-
+
diff --git a/res/gta5sync_de.qm b/res/gta5sync_de.qm
index 796c47a..704e02b 100644
Binary files a/res/gta5sync_de.qm and b/res/gta5sync_de.qm differ
diff --git a/res/gta5sync_de.ts b/res/gta5sync_de.ts
index 62c8814..a1ee2c3 100644
--- a/res/gta5sync_de.ts
+++ b/res/gta5sync_de.ts
@@ -238,7 +238,7 @@ Snapmatic Bilder und Spielständen
-
+
Seitenverhältnis ignorieren
@@ -253,98 +253,103 @@ Snapmatic Bilder und Spielständen
Bild
-
+
+
+ Wasserzeichen
+
+
+
Hintergrund
-
-
-
+
+
+
Hintergrundfarbe: <span style="color: %1">%1</span>
-
-
+
+
...
-
+
Hintergrundbild: %1
-
+
X
-
+
Erzwinge Farbe in Avatar Zone
-
+
Bild importieren
-
+
&OK
-
+
Bild verwerfen
-
+
Abbre&chen
-
-
-
+
+
+
Hintergrundbild:
-
+
Custom Avatar Description in SC, don't use Special Character!
Eigener Avatar
-
+
Custom Picture Description in SC, don't use Special Character!
Eigenes Bild
-
+
Bist du sicher ein Quadrat Bild außerhalb der Avatar Zone zu verwenden?
Wenn du es als Avatar verwenden möchtest wird es abgetrennt!
-
+
Snapmatic Avatar Zone
-
+
Farbe auswählen...
-
+
Background Image: File
Datei
@@ -1067,7 +1072,7 @@ Drücke 1 für Standardmodus
-
+
@@ -1078,9 +1083,9 @@ Drücke 1 für Standardmodus
-
-
-
+
+
+
@@ -1117,14 +1122,14 @@ Drücke 1 für Standardmodus
-
+
Alle Bilddateien (%1)
-
+
@@ -1159,14 +1164,14 @@ Drücke 1 für Standardmodus
-
+
Kann %1 nicht importieren weil die Datei nicht geöffnet werden kann
-
+
Kann %1 nicht importieren weil die Datei nicht richtig gelesen werden kann
diff --git a/res/gta5sync_en_US.ts b/res/gta5sync_en_US.ts
index 44c126f..3e5d5a4 100644
--- a/res/gta5sync_en_US.ts
+++ b/res/gta5sync_en_US.ts
@@ -227,15 +227,15 @@ Pictures and Savegames
-
-
-
+
+
+
Background Color: <span style="color: %1">%1</span>
-
-
+
+
@@ -251,89 +251,94 @@ Pictures and Savegames
-
+
-
+
+
+
+
+
+
-
+
-
+
-
+
Force Color in Avatar Zone
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
Custom Avatar Description in SC, don't use Special Character!
-
+
Custom Picture Description in SC, don't use Special Character!
-
+
-
+
-
+
Select Color...
-
+
Background Image: File
@@ -1060,7 +1065,7 @@ Press 1 for Default View
-
+
@@ -1071,9 +1076,9 @@ Press 1 for Default View
-
-
-
+
+
+
@@ -1116,14 +1121,14 @@ Press 1 for Default View
-
+
-
+
@@ -1163,14 +1168,14 @@ Press 1 for Default View
-
+
-
+
diff --git a/res/gta5sync_fr.ts b/res/gta5sync_fr.ts
index 61db6be..03c8751 100644
--- a/res/gta5sync_fr.ts
+++ b/res/gta5sync_fr.ts
@@ -238,7 +238,7 @@ et les fichiers de sauvegarde de Grand Theft Auto V
-
+
Déverrouiller le ratio d'aspect
@@ -253,98 +253,103 @@ et les fichiers de sauvegarde de Grand Theft Auto V
Image
-
+
+
+
+
+
+
Fond
-
-
-
+
+
+
Couleur de fond : <span style="color: %1">%1</span>
-
-
+
+
...
-
+
Image de fond : %1
-
+
X
-
+
Forcer la couleur dans la Zone d'Avatar
-
+
Importer l'image
-
+
&OK
-
+
Supprimer l'image
-
+
A&nnuler
-
-
-
+
+
+
Image de fond :
-
+
Custom Avatar Description in SC, don't use Special Character!
Avatar personnalisé
-
+
Custom Picture Description in SC, don't use Special Character!
Image personnalisé
-
+
Êtes-vous sûr d'utiliser une image carrée en dehors de la Zone d'Avatar ?
Si vous l'utilisez comme Avatar, l'image sera détachée !
-
+
Zone d'Avatar Snapmatic
-
+
Choisir une couleur...
-
+
Background Image: File
Fichier
@@ -1078,7 +1083,7 @@ Appuyer sur 1 pour le mode par défaut
-
+
@@ -1089,9 +1094,9 @@ Appuyer sur 1 pour le mode par défaut
-
-
-
+
+
+
@@ -1123,14 +1128,14 @@ Appuyer sur 1 pour le mode par défaut
-
+
Toutes les images (%1)
-
+
@@ -1177,14 +1182,14 @@ Appuyer sur 1 pour le mode par défaut
-
+
Impossible d'importer %1, le fichier ne peut pas être ouvert
-
+
Impossible d'importer %1, le fichier ne peut pas être parsé correctement
diff --git a/res/gta5sync_ru.ts b/res/gta5sync_ru.ts
index 0e4d386..f1b3b96 100644
--- a/res/gta5sync_ru.ts
+++ b/res/gta5sync_ru.ts
@@ -240,7 +240,7 @@ Pictures and Savegames
-
+
Игнорировать соотн. сторон
@@ -255,99 +255,104 @@ Pictures and Savegames
Картинка
-
+
+
+
+
+
+
Фон
-
-
-
+
+
+
Цвет фона: <span style="color: %1">%1</span>
-
-
+
+
...
-
+
Фоновая картинка: %1
-
+
latin X
X
-
+
Задать цвет в зоне аватарки
-
+
Импортировать картинку
-
+
&ОК
-
+
Отклонить картинку
-
+
Я не уверен насчет горячих клавиш...
От&мена
-
-
-
+
+
+
Фоновая картинка:
-
+
Custom Avatar Description in SC, don't use Special Character!
Свой Аватар
-
+
Custom Picture Description in SC, don't use Special Character!
Своя Картинка
-
+
Ты точно хочешь использовать квадратное изображение вне зоны аватарки? Если это аватар, то изображение будет обрезано!
-
+
Зона Snapmatic Аватарки
-
+
Выбрать цвет...
-
+
Background Image: File
Файл
@@ -1072,7 +1077,7 @@ Press 1 for Default View
-
+
@@ -1083,9 +1088,9 @@ Press 1 for Default View
-
-
-
+
+
+
@@ -1117,7 +1122,7 @@ Press 1 for Default View
-
+
@@ -1169,21 +1174,21 @@ Press 1 for Default View
-
+
Все файлы изображений (%1)
-
+
Не удалось открыть %1, файл не может быть открыт
-
+
Не получилось импортировать %1, файл не может быть правильно обработан
diff --git a/res/gta5sync_uk.ts b/res/gta5sync_uk.ts
index 706673b..8309401 100644
--- a/res/gta5sync_uk.ts
+++ b/res/gta5sync_uk.ts
@@ -248,103 +248,108 @@ Pictures and Savegames
-
+
Ігнорувати співвідношення сторін
-
+
+
+
+
+
+
Фон
-
-
-
+
+
+
Фоновий колір: <span style="color: %1">%1</span>
-
-
+
+
...
-
-
-
+
+
+
Фонове зображення:
-
+
Х
-
+
Примусовий колір в зоні Аватару
-
+
Імпортувати зображення
-
+
&OK
-
+
Відхилити зображення
-
+
&Скасувати
-
+
Custom Avatar Description in SC, don't use Special Character!
Користувацький Аватар
-
+
Custom Picture Description in SC, don't use Special Character!
Користувацьке Зображення
-
+
Зона Snapmatic Аватару
-
+
Ви впевнені, що будете використовувати квадратне зображення поза зоною аватара?
Якщо ви хочете використовувати його як Аватар, зображення буде відокремлено!
-
+
Вибір кольору...
-
+
Фонове зображення: %1
-
+
Background Image: File
Файл
@@ -1058,7 +1063,7 @@ Press 1 for Default View
-
+
@@ -1069,9 +1074,9 @@ Press 1 for Default View
-
-
-
+
+
+
@@ -1091,14 +1096,14 @@ Press 1 for Default View
-
+
Файли зображень (%1)
-
+
@@ -1106,14 +1111,14 @@ Press 1 for Default View
-
+
Неможливо імпортувати %1, оскільки файл не може бути відкритий
-
+
Неможливо імпортувати %1, оскільки файл неможливо розібрати правильно
diff --git a/res/gta5sync_zh_TW.ts b/res/gta5sync_zh_TW.ts
index bbd099c..e7af4e8 100644
--- a/res/gta5sync_zh_TW.ts
+++ b/res/gta5sync_zh_TW.ts
@@ -247,102 +247,107 @@ Pictures and Savegames
-
+
忽略長寬比
-
+
+
+
+
+
+
背景
-
-
-
+
+
+
背景顏色: <span style="color: %1">%1</span>
-
-
+
+
...
-
-
-
+
+
+
背景圖片:
-
+
X
-
+
強制在大頭貼區域使用顏色
-
+
匯入圖片
-
+
確定(&O)
-
+
捨棄圖片
-
+
取消(&C)
-
+
Custom Avatar Description in SC, don't use Special Character!
自訂大頭貼
-
+
Custom Picture Description in SC, don't use Special Character!
自訂圖片
-
+
Snapmatic 大頭貼區域
-
+
你確定要在大頭貼區域以外的地方使用方形圖片嗎? 作為大頭貼的圖片將被分離!
-
+
選擇顏色...
-
+
背景圖片: %1
-
+
Background Image: File
文件
@@ -1056,7 +1061,7 @@ Press 1 for Default View
-
+
@@ -1067,9 +1072,9 @@ Press 1 for Default View
-
-
-
+
+
+
@@ -1089,14 +1094,14 @@ Press 1 for Default View
-
+
所有圖片 (%1)
-
+
@@ -1104,14 +1109,14 @@ Press 1 for Default View
-
+
無法匯入 %1,因為檔案無法開啟
-
+
無法匯入 %1,因為檔案無法正確解析
diff --git a/res/gta5view.png b/res/gta5view.png
index bf41d47..3e955a6 100644
Binary files a/res/gta5view.png and b/res/gta5view.png differ
diff --git a/res/next.png b/res/next.png
index 4a36bc2..d87fd54 100644
Binary files a/res/next.png and b/res/next.png differ
diff --git a/res/pointmaker-16.png b/res/pointmaker-16.png
index 3244d6e..f038879 100644
Binary files a/res/pointmaker-16.png and b/res/pointmaker-16.png differ
diff --git a/res/pointmaker-24.png b/res/pointmaker-24.png
index d337357..87e9669 100644
Binary files a/res/pointmaker-24.png and b/res/pointmaker-24.png differ
diff --git a/res/pointmaker-32.png b/res/pointmaker-32.png
index 610efd4..de591b1 100644
Binary files a/res/pointmaker-32.png and b/res/pointmaker-32.png differ
diff --git a/res/pointmaker-8.png b/res/pointmaker-8.png
index a116c72..5c0e653 100644
Binary files a/res/pointmaker-8.png and b/res/pointmaker-8.png differ
diff --git a/res/savegame.png b/res/savegame.png
index a2c61b0..90988fa 100644
Binary files a/res/savegame.png and b/res/savegame.png differ
diff --git a/res/watermark.png b/res/watermark.png
deleted file mode 100644
index 82de998..0000000
Binary files a/res/watermark.png and /dev/null differ
diff --git a/res/watermark_1b.png b/res/watermark_1b.png
new file mode 100644
index 0000000..eddab17
Binary files /dev/null and b/res/watermark_1b.png differ
diff --git a/res/watermark_2b.png b/res/watermark_2b.png
new file mode 100644
index 0000000..4a4cb57
Binary files /dev/null and b/res/watermark_2b.png differ
diff --git a/res/watermark_2r.png b/res/watermark_2r.png
new file mode 100644
index 0000000..2747605
Binary files /dev/null and b/res/watermark_2r.png differ
diff --git a/res/watermarkbright.png b/res/watermarkbright.png
deleted file mode 100644
index 2ce0168..0000000
Binary files a/res/watermarkbright.png and /dev/null differ
diff --git a/res/watermarkdark.png b/res/watermarkdark.png
deleted file mode 100644
index 07b3ef6..0000000
Binary files a/res/watermarkdark.png and /dev/null differ