Browse Source

New features, rewriting patches download manager

Ivan Arkhipov 5 years ago
parent
commit
63da4a84b9

+ 1 - 1
src/Launcher/main.cpp

@@ -9,7 +9,7 @@ int main(int argc, char *argv[]) {
     QApplication app(argc, argv);
     QStringList args = app.arguments();
 
-    if (args.contains("launched")) {
+    if (args.contains("gamelaunch")) {
         QProcess process;
         process.setProgram("lotro_ru.exe");
         process.setArguments({{"-skiprawdownload", "-disablePatch"}});

+ 8 - 4
src/Legacy/Legacy.pro

@@ -17,7 +17,8 @@ SOURCES += \
     main.cpp \
     models/downloader.cpp \
     models/filesystem.cpp \
-    models/lotromanager.cpp \
+    models/lotrodatmanager.cpp \
+    models/patchdownloader.cpp \
     widgets/helpwidget.cpp \
     widgets/mainwindow.cpp \
     widgets/menuentry.cpp \
@@ -30,12 +31,14 @@ SOURCES += \
     widgets/newspiece.cpp \
     widgets/statusflagwidget.cpp \
     widgets/serverstatuswidget.cpp \
-    models/patchdownloader.cpp
+    models/selfupdater.cpp \
+    widgets/eventslistwidget.cpp
 
 HEADERS += \
     models/downloader.h \
     models/filesystem.h \
-    models/lotromanager.h \
+    models/lotrodatmanager.h \
+    models/patchdownloader.h \
     widgets/helpwidget.h \
     widgets/mainwindow.h \
     widgets/menuentry.h \
@@ -48,7 +51,8 @@ HEADERS += \
     widgets/newspiece.h \
     widgets/statusflagwidget.h \
     widgets/serverstatuswidget.h \
-    models/patchdownloader.h
+    models/selfupdater.h \
+    widgets/eventslistwidget.h
 
 FORMS += \
     widgets/helpwidget.ui \

+ 28 - 4
src/Legacy/models/downloader.cpp

@@ -7,6 +7,11 @@
 Downloader::Downloader(QObject *parent) :QObject(parent), busy(false)
 {
     connect(&m_WebCtrl, SIGNAL(finished(QNetworkReply*)), this, SLOT(onDownloadFinished(QNetworkReply*)));
+    bytes_downloaded = 0;
+    bytes_total = 0;
+    download_speed = 0;
+    bytesReceivedBeforeSecond = 0;
+    timeElapsedBeforeSecond = 0;
 }
 
 Downloader::~Downloader() {
@@ -24,6 +29,9 @@ void Downloader::setUrl(const QUrl &_url)
 
 void Downloader::waitForDownloaded()
 {
+    if (!busy)
+        return;
+
     QEventLoop loop;
     connect(this, &Downloader::downloadFinished, &loop, &QEventLoop::quit);
     loop.exec();
@@ -71,6 +79,23 @@ QString Downloader::getSpeedFormatted(quint64 speed_bytes_per_sec)
     return QString::number(speed) + " " + unit;
 }
 
+QString Downloader::getSizeFormatted(quint64 bytes)
+{
+
+    QString unit;
+    if (bytes < 1024) {
+        unit = "байт";
+    } else if (bytes < 1024*1024) {
+        bytes /= 1024;
+        unit = "kB";
+    } else {
+        bytes /= 1024*1024;
+        unit = "MB";
+    }
+    return QString::number(bytes) + " " + unit;
+}
+
+
 QString Downloader::getElapsedTimeFormatted(quint64 elapsed_time_secs)
 {
     qint64 secs = elapsed_time_secs;
@@ -165,18 +190,16 @@ void Downloader::updateDownloadSpeedLimit(int bytes_per_sec)
 
 void Downloader::onDownloadProgressChanged(qint64 bytesReceived, qint64 bytesTotal)
 {
-    qDebug() << "Downloaded " << bytesReceived << " of " << bytesTotal << " from url " << getUrl();
 
     bytes_downloaded = bytesReceived;
     bytes_total = bytesTotal;
 
-    if (downloadTime.elapsed() - timeElapsedBeforeSecond >= 1000) {
+    if (downloadTime.elapsed() - timeElapsedBeforeSecond >= 300) {
         download_speed = (bytes_downloaded - bytesReceivedBeforeSecond) * 1000.0 / (downloadTime.elapsed() - timeElapsedBeforeSecond);
         timeElapsedBeforeSecond = downloadTime.elapsed();
         bytesReceivedBeforeSecond = bytes_downloaded;
+        emit progressChanged(this);
     }
-
-    emit progressChanged(this);
 }
 
 void Downloader::stop()
@@ -191,6 +214,7 @@ void Downloader::onDownloadFinished(QNetworkReply*) {
     if (m_CurrentReply)
         m_CurrentReply->deleteLater();
 
+    download_speed = 0;
     busy = false;
 
     emit downloadFinished(this);

+ 1 - 0
src/Legacy/models/downloader.h

@@ -30,6 +30,7 @@ public:
     quint64 getBytesDownloaded();
     quint64 getElapsedTime();
     quint64 getSpeed();
+    static QString getSizeFormatted(quint64 bytes);
     static QString getSpeedFormatted(quint64 speed_bytes_per_sec);
     static QString getElapsedTimeFormatted(quint64 elapsed_time_secs);
 

+ 51 - 28
src/Legacy/models/lotromanager.cpp → src/Legacy/models/lotrodatmanager.cpp

@@ -1,10 +1,11 @@
-#include "lotromanager.h"
+#include "lotrodatmanager.h"
 #include "filesystem.h"
 #include "LotroDat/Subfiles/TextSubFile.h"
 
 #include <QtConcurrent/QtConcurrent>
 #include <QFontDatabase>
 #include <QMessageBox>
+#include <QDebug>
 
 #include <string>
 #include <iostream>
@@ -13,14 +14,14 @@
 Q_DECLARE_METATYPE(LOTRO_DAT::FILE_TYPE)
 Q_DECLARE_METATYPE(LOTRO_DAT::SubfileData)
 
-LotroManager::LotroManager(QSettings* app_settings_, QObject *parent) :
+LotroDatManager::LotroDatManager(QSettings* app_settings_, QObject *parent) :
     QObject(parent), app_settings(app_settings_) {
 
     qRegisterMetaType<LOTRO_DAT::FILE_TYPE>();
     qRegisterMetaType<LOTRO_DAT::SubfileData>();
 }
 
-void LotroManager::initialiseDatFile(QString file_path) {
+void LotroDatManager::initialiseDatFile(QString file_path) {
     emit processStarted("initialiseDatFile", {file_path});
 
     qDebug() << "Initialising file " << file_path;
@@ -35,7 +36,7 @@ void LotroManager::initialiseDatFile(QString file_path) {
     emit processFinished("initialiseDatFile", {QString("Success"), file_path});
 }
 
-void LotroManager::deinitialiseDatFile()
+void LotroDatManager::deinitialiseDatFile()
 {
     emit processStarted("deintialiseDatFile", {});
     qDebug() << "Deinitialising file...";
@@ -43,7 +44,7 @@ void LotroManager::deinitialiseDatFile()
     emit processFinished("deinitialiseDatFile", {});
 }
 
-void LotroManager::changeLocale() {
+void LotroDatManager::changeLocale() {
     qDebug() << "Changing locale of dat file...";
     // Setting locale, opposite to current
     auto current_locale = file.GetLocaleManager().GetCurrentLocale();
@@ -69,7 +70,7 @@ void LotroManager::changeLocale() {
     }
 }
 
-void LotroManager::getLocaleFileContents(long long file_id, int locale) {
+void LotroDatManager::getLocaleFileContents(long long file_id, int locale) {
     emit processStarted("getLocaleFileContents", {file_id, locale});
 
     auto getfile_op = file.GetLocaleManager().GetLocaleFile(file_id, (LOTRO_DAT::DatLocaleManager::LOCALE)locale);
@@ -109,7 +110,7 @@ void LotroManager::getLocaleFileContents(long long file_id, int locale) {
     emit processFinished("getLocaleFileContents", {"Success", file_id, locale});
 }
 
-void LotroManager::importFilesFromDatabase(QString database_path) {
+void LotroDatManager::importFilesFromDatabase(QString database_path) {
     emit processStarted("importFilesFromDatabase", {database_path});
 
     if (!FileSystem::fileExists(database_path)) {
@@ -136,7 +137,7 @@ void LotroManager::importFilesFromDatabase(QString database_path) {
     }
 }
 
-void LotroManager::importFile(long long file_id, QString file_path) {
+void LotroDatManager::importFile(long long file_id, QString file_path) {
     emit processStarted("importFile", {file_id, file_path});
 
     if (!FileSystem::fileExists(file_path)) {
@@ -156,11 +157,11 @@ void LotroManager::importFile(long long file_id, QString file_path) {
         return;
     }
 
-    LOTRO_DAT::SubFile subfile = *(getfile_op.value);
-    data.options["ext"] = subfile.Extension();
-    data.options["cat"] = subfile.category;
+    std::shared_ptr<LOTRO_DAT::SubFile> subfile = getfile_op.value;
+    data.options["ext"] = subfile->Extension();
+    data.options["cat"] = subfile->category;
 
-    if (subfile.FileType() == LOTRO_DAT::TEXT) {
+    if (subfile->FileType() == LOTRO_DAT::TEXT) {
         std::basic_ifstream<char16_t> input_stream(file_path.toStdString(), std::ios::in);
         if (!input_stream.is_open()) {
             emit caughtError("importFile", {QString("Ошибка импорта!"), QString("Текстовый файл ") + file_path + QString(" не удаётся открыть!")});
@@ -201,7 +202,7 @@ void LotroManager::importFile(long long file_id, QString file_path) {
     return;
 }
 
-void LotroManager::importTextFragment(long long file_id, long long fragment_id,
+void LotroDatManager::importTextFragment(long long file_id, long long fragment_id,
                                QString fragment_contents, QString arguments) {
     emit processStarted("importTextFragment", {file_id, fragment_id});
 
@@ -260,7 +261,7 @@ void LotroManager::importTextFragment(long long file_id, long long fragment_id,
     }
 }
 
-void LotroManager::getTextFragment(long long file_id, long long fragment_id) {
+void LotroDatManager::getTextFragment(long long file_id, long long fragment_id) {
     emit processStarted("getTextFragment", {file_id, fragment_id});
 
     auto getfile_op = file.GetFileSystem().GetFile(file_id);
@@ -314,7 +315,7 @@ void LotroManager::getTextFragment(long long file_id, long long fragment_id) {
     emit processFinished("getTextFragment", {"Success"});
 }
 
-void LotroManager::createCoreStatusFile(QString output_filename) {
+void LotroDatManager::createCoreStatusFile(QString output_filename) {
     emit processStarted("createCoreStatusFile", {output_filename});
     auto gatherinfo_op = file.GatherInformation(output_filename.toStdString());
 
@@ -326,7 +327,7 @@ void LotroManager::createCoreStatusFile(QString output_filename) {
     }
 }
 
-void LotroManager::extractSingleFile(QString output_filename, long long file_id) {
+void LotroDatManager::extractSingleFile(QString output_filename, long long file_id) {
     emit processStarted("extractSingleFile", {output_filename, file_id});
     auto extractfile_op = file.GetExporter().ExtractFileById(file_id, output_filename.toStdString());
     if (extractfile_op.result == LOTRO_DAT::SUCCESS) {
@@ -337,7 +338,7 @@ void LotroManager::extractSingleFile(QString output_filename, long long file_id)
     }
 }
 
-void LotroManager::extractSingleFileToDatabase(QString database_path, long long file_id) {
+void LotroDatManager::extractSingleFileToDatabase(QString database_path, long long file_id) {
     emit processStarted("extractSingleFileToDatabase", {database_path, file_id});
     LOTRO_DAT::Database db;
     if (!db.InitDatabase(database_path.toStdString())) {
@@ -356,7 +357,7 @@ void LotroManager::extractSingleFileToDatabase(QString database_path, long long
     }
 }
 
-void LotroManager::extractGrouppedFiles(QString output_foldername, LOTRO_DAT::FILE_TYPE type) {
+void LotroDatManager::extractGrouppedFiles(QString output_foldername, LOTRO_DAT::FILE_TYPE type) {
     emit processStarted("extractGrouppedFiles", {output_foldername, type});
     auto extractfile_op = file.GetExporter().ExtractAllFilesByType(type, output_foldername.toStdString());
     if (extractfile_op.result == LOTRO_DAT::SUCCESS) {
@@ -367,7 +368,7 @@ void LotroManager::extractGrouppedFiles(QString output_foldername, LOTRO_DAT::FI
     }
 }
 
-void LotroManager::extractGrouppedFilesToDatabase(QString database_path, LOTRO_DAT::FILE_TYPE type) {
+void LotroDatManager::extractGrouppedFilesToDatabase(QString database_path, LOTRO_DAT::FILE_TYPE type) {
     emit processStarted(QString("extractGrouppedFilesToDatabase"), {database_path, type});
     LOTRO_DAT::Database db;
     if (!db.InitDatabase(database_path.toStdString())) {
@@ -385,21 +386,23 @@ void LotroManager::extractGrouppedFilesToDatabase(QString database_path, LOTRO_D
     }
 }
 
-void LotroManager::getUnactiveCategories() {
+void LotroDatManager::getUnactiveCategories() {
     emit processStarted("getUnactiveCategories", {});
 
     const std::set<long long>& categories = file.GetLocaleManager().GetInactiveCategories();
 
     QStringList result;
     for (long long category : categories) {
-        result << QString::number(category);
+        result.append(QString::number(category));
     }
 
+    qDebug() << "Received category set: " << result;
+
     emit unactiveCategoriesReceived(result);
     emit processFinished("getUnactiveCategories", {"Success"});
 }
 
-void LotroManager::startGame() {
+void LotroDatManager::startGame() {
     emit processStarted("startGame", {});
 
     QStringList args;
@@ -434,7 +437,7 @@ void LotroManager::startGame() {
     }
 }
 
-void LotroManager::getLocaleFileInfo(long long file_id, int locale) {
+void LotroDatManager::getLocaleFileInfo(long long file_id, int locale) {
     emit processStarted("getLocaleFileInfo", {file_id, locale});
 
     auto getfile_op = file.GetLocaleManager().GetLocaleFile(file_id, (LOTRO_DAT::DatLocaleManager::LOCALE)locale);
@@ -462,7 +465,7 @@ void LotroManager::getLocaleFileInfo(long long file_id, int locale) {
     emit processFinished("getLocaleFileInfo", {"Success"});
 }
 
-void LotroManager::getFileInfo(long long file_id) {
+void LotroDatManager::getFileInfo(long long file_id) {
     emit processStarted(QString("getFileInfo"), {file_id});
 
     auto getfile_op = file.GetFileSystem().GetFile(file_id);
@@ -489,19 +492,39 @@ void LotroManager::getFileInfo(long long file_id) {
     emit processFinished("getFileInfo", {"Success"});
 }
 
-LOTRO_DAT::DatStatus *LotroManager::getStatusModule()
+void LotroDatManager::disableCategory(long long category_id)
+{
+    emit processStarted(QString("disableCategory"), {category_id});
+    file.GetLocaleManager().DisableCategory(category_id);
+    file.GetLocaleManager().CommitLocales();
+    file.GetFileSystem().CommitDirectories();
+    getUnactiveCategories();
+    emit processFinished("disableCategory", {"Success"});
+}
+
+void LotroDatManager::enableCategory(long long category_id)
+{
+    emit processStarted(QString("enableCategory"), {category_id});
+    file.GetLocaleManager().EnableCategory(category_id);
+    file.GetLocaleManager().CommitLocales();
+    file.GetFileSystem().CommitDirectories();
+    getUnactiveCategories();
+    emit processFinished("enableCategory", {"Success"});
+}
+
+LOTRO_DAT::DatStatus *LotroDatManager::getStatusModule()
 {
     return &file.GetStatusModule();
 }
 
-bool LotroManager::initialised() {
+bool LotroDatManager::initialised() {
     return file.Initialized();
 }
 
-int LotroManager::currentLocale() {
+int LotroDatManager::currentLocale() {
     return file.GetLocaleManager().GetCurrentLocale();
 }
 
-bool LotroManager::notPatched() {
+bool LotroDatManager::notPatched() {
     return file.GetStatusModule().CheckIfNotPatched();
 }

+ 6 - 2
src/Legacy/models/lotromanager.h → src/Legacy/models/lotrodatmanager.h

@@ -7,12 +7,12 @@
 
 #include <LotroDat/LotroDat.h>
 
-class LotroManager : public QObject
+class LotroDatManager : public QObject
 {
     Q_OBJECT
 
 public:
-    explicit LotroManager(QSettings* app_settings_, QObject *parent = nullptr);
+    explicit LotroDatManager(QSettings* app_settings_, QObject *parent = nullptr);
 
     bool initialised();
 
@@ -55,6 +55,10 @@ public slots:
 
     void getFileInfo(long long file_id);
 
+    void disableCategory(long long category_id);
+
+    void enableCategory(long long category_id);
+
     LOTRO_DAT::DatStatus *getStatusModule();
 
 signals:

+ 61 - 64
src/Legacy/models/patchdownloader.cpp

@@ -7,9 +7,10 @@
 #include <QVariant>
 #include <QDebug>
 
-PatchDownloader::PatchDownloader(QObject *parent) : QObject(parent)
+PatchDownloader::PatchDownloader(QSettings *settings, QObject *parent) : QObject(parent), patch_download_dir(QApplication::applicationDirPath() + "/data")
 {
-    patch_download_dir = QDir(QApplication::applicationDirPath() + "/data");
+    app_settings = settings;
+    active_downloads_number = 0;
 
     connect(&update_check_timer, &QTimer::timeout, this, &PatchDownloader::checkForUpdates);
     update_check_timer.setInterval(1000 * 60 * 5); // 5 minutes
@@ -18,26 +19,50 @@ PatchDownloader::PatchDownloader(QObject *parent) : QObject(parent)
 
 PatchDownloader::~PatchDownloader()
 {
-    clearDownloadQueue();
+    foreach (Downloader* downloader, downloads_list) {
+        downloader->waitForDownloaded();
+        downloader->deleteLater();
+    }
 }
 
 void PatchDownloader::checkForUpdates()
 {
-    if (!download_queue.empty()) {
+    foreach (QString patch_name, all_patch_names) {
+        if (downloads_list.contains(patch_name))
+            continue;
+
+        downloads_list[patch_name] = new Downloader();
+        connect(downloads_list[patch_name], &Downloader::progressChanged, this, &PatchDownloader::onDownloaderProgressChanged);
+        connect(downloads_list[patch_name], &Downloader::downloadFinished, this, &PatchDownloader::onDownloaderCompleted);
+    }
+
+    if (active_downloads_number > 0) {
         qDebug() << "PatchDownloader: downloads are not ready yet, passing checkForUpdates";
         return;
     }
 
-    if (!updatePatchList())
+    emit checkForUpdatesStarted();
+    if (!updatePatchList()) {
+        emit checkForUpdatesFinished();
         return;
+    }
     removeOldPatchesFromDirecrory();
     addMissingPatchesToDownloadList();
+    emit checkForUpdatesFinished();
 }
 
 void PatchDownloader::onDownloaderCompleted(Downloader *downloader_ptr)
 {
-    downloader_ptr->targetFile->close();
-    downloader_ptr->targetFile->deleteLater();
+    if (downloader_ptr->targetFile) {
+        downloader_ptr->targetFile->close();
+        downloader_ptr->targetFile->deleteLater();
+    }
+
+    active_downloads_number--;
+
+    if (active_downloads_number == 0) {
+        emit downloadCompleted();
+    }
 }
 
 void PatchDownloader::onDownloaderProgressChanged(Downloader*)
@@ -47,7 +72,7 @@ void PatchDownloader::onDownloaderProgressChanged(Downloader*)
     quint64 summary_speed = 0;
     quint64 time_elapsed = 0;
 
-    foreach (Downloader* downloader, download_queue) {
+    foreach (Downloader* downloader, downloads_list) {
         totalSize += downloader->getBytesTotal();
         downloadedSize += downloader->getBytesDownloaded();
 
@@ -58,12 +83,9 @@ void PatchDownloader::onDownloaderProgressChanged(Downloader*)
 
     time_elapsed = (totalSize - downloadedSize) / qMax(quint64(1), summary_speed);
 
-    if (totalSize == downloadedSize)
-        emit downloadCompleted();
-    else
-        emit progressChanged(downloadedSize, totalSize,
-                             Downloader::getSpeedFormatted(summary_speed),
-                             Downloader::getElapsedTimeFormatted(time_elapsed));
+    emit progressChanged(downloadedSize, totalSize,
+                         Downloader::getSpeedFormatted(summary_speed),
+                         Downloader::getElapsedTimeFormatted(time_elapsed));
 }
 
 int PatchDownloader::versionFromPatchFilename(QString filename)
@@ -79,10 +101,7 @@ bool PatchDownloader::updatePatchList()
 {
     QUrlQuery query; // query for building GET-request aka patch-version
 
-    QStringList names;
-    names  << "sound" << "text" << "image" << "loadscreen" << "texture" << "font";
-
-    foreach(QString patch_name, names) {
+    foreach (QString patch_name, all_patch_names) {
         query.addQueryItem(patch_name, "100");
     }
 
@@ -105,21 +124,20 @@ bool PatchDownloader::updatePatchList()
 
     QStringList entry_list = QString(target_array).split('|');
 
-    if (entry_list.size() != names.size()) {
+    if (entry_list.size() != all_patch_names.size()) {
         qDebug() << __FUNCTION__ << "Entry list size is not equal to patch names size!" << QString(target_array);
         emit getPatchListError();
         return false;
     }
 
-    patches.clear();
     for (int i = 0; i < entry_list.size(); ++i) {
-        QStringList patch_data = entry_list[i].split(":::");
-        if (patch_data.size() != 3) {
+        QStringList current_patch_data = entry_list[i].split(":::");
+        if (current_patch_data.size() != 3) {
             qDebug() << __FUNCTION__ << "Incorrect patch entry size! Entry: " << entry_list[i];
             emit getPatchListError();
             return false;
         }
-        patches.append({patch_data[0], patch_data[1], patch_data[2]});
+        patch_data[all_patch_names[i]] = {current_patch_data[0], current_patch_data[1], current_patch_data[2], all_patch_names[i]};
     }
     return true;
 }
@@ -127,7 +145,7 @@ bool PatchDownloader::updatePatchList()
 bool PatchDownloader::removeOldPatchesFromDirecrory()
 {
     QStringList actual_hash_list;
-    foreach (Patch patch, patches) {
+    foreach (Patch patch, patch_data) {
         actual_hash_list.append(patch.md5_hash);
     }
 
@@ -145,69 +163,48 @@ bool PatchDownloader::removeOldPatchesFromDirecrory()
             }
         }
     }
-
     return true;
 }
 
 bool PatchDownloader::addMissingPatchesToDownloadList()
 {
-    QStringList file_hashes;
-    QStringList paths = patch_download_dir.entryList(QDir::Files);
-
     QDir dir(patch_download_dir);
     if (!dir.exists())
         QDir().mkdir(patch_download_dir.absolutePath());
 
-    foreach (QString filename, paths) {
-        file_hashes << FileSystem::fileHash(patch_download_dir.absolutePath() + "/" + filename, QCryptographicHash::Md5);
-    }
-
     bool download_started = false;
 
-    foreach (Patch patch, patches) {
-        if (file_hashes.contains(patch.md5_hash))
-            continue;
-
+    foreach (Patch patch, patch_data) {
         QString patch_filepath = patch_download_dir.absolutePath() + "/" + patch.url.fileName();
 
-        if (FileSystem::fileExists(patch_filepath) && !QFile::remove(patch_filepath)) {
-            qDebug() << __FUNCTION__ << "Unable to remove file " << patch_filepath;
-            emit removeFileError(patch_filepath);
+        qDebug() << "Patch" << patch.name << "is marked as" << app_settings->value("patches/" + patch.name, "Disabled");
+        if (app_settings->value("patches/" + patch.name, "Disabled").toString() != "Enabled")
             continue;
+
+        if (FileSystem::fileExists(patch_filepath)) {
+            if (FileSystem::fileHash(patch_filepath, QCryptographicHash::Md5) == patch.md5_hash)
+                continue;
+
+            if (!QFile::remove(patch_filepath)) {
+                qDebug() << __FUNCTION__ << "Unable to remove file " << patch_filepath;
+                emit removeFileError(patch_filepath);
+                continue;
+            }
         }
 
         if (!download_started) {
             download_started = true;
+            qDebug() << "Started downloads of PatchDownloader!";
             emit downloadStarted();
         }
 
         qDebug() << "Starting download of file " << patch_filepath << " from url " << patch.url;
 
-        Downloader* downloader = new Downloader();
-        connect(downloader, &Downloader::progressChanged, this, &PatchDownloader::onDownloaderProgressChanged);
-        connect(downloader, &Downloader::downloadFinished, this, &PatchDownloader::onDownloaderCompleted);
-        downloader->setUrl(patch.url);
-        downloader->targetFile = new QFile(patch_filepath, downloader);
-        downloader->targetFile->open(QIODevice::ReadWrite);
-        downloader->start();
-        download_queue.append(downloader);
+        downloads_list[patch.name]->setUrl(patch.url);
+        downloads_list[patch.name]->targetFile = new QFile(patch_filepath, downloads_list[patch.name]);
+        downloads_list[patch.name]->targetFile->open(QIODevice::ReadWrite);
+        downloads_list[patch.name]->start();
+        active_downloads_number++;
     }
     return true;
 }
-
-void PatchDownloader::clearDownloadQueue()
-{
-    for (int i = 0; i < download_queue.size(); ++i) {
-        Downloader* downloader = download_queue[i];
-
-        if (download_queue.indexOf(downloader) != i)
-            continue; // this downloader was already stopped and deleted in previous iterations.
-                      // this shouldn't normally happen because it means that file was being downloaded many times
-
-        downloader->stop();
-        downloader->targetFile->close();
-        downloader->targetFile->deleteLater();
-        downloader->deleteLater();
-    }
-    download_queue.clear();
-}

+ 12 - 6
src/Legacy/models/patchdownloader.h

@@ -13,13 +13,14 @@ struct Patch {
     QUrl url;
     QString md5_hash;
     QString datetime;
+    QString name;
 };
 
 class PatchDownloader : public QObject
 {
     Q_OBJECT
 public:
-    explicit PatchDownloader(QObject *parent = nullptr);
+    explicit PatchDownloader(QSettings* settings, QObject *parent = nullptr);
     ~PatchDownloader();
     void enableAutoUpdate();
     void disableAutoUpdate();
@@ -34,6 +35,8 @@ private slots:
     void onDownloaderProgressChanged(Downloader* downloader_ptr);
 
 signals:
+    void checkForUpdatesStarted();
+    void checkForUpdatesFinished();
     void getPatchListError();
     void removeFileError(QString filename);
     void downloadNewFilesError();
@@ -51,16 +54,19 @@ private:
     bool updatePatchList();
     bool removeOldPatchesFromDirecrory();
     bool addMissingPatchesToDownloadList();
-    void clearDownloadQueue();
 
 private:
-    QTimer auto_update_timer;
 
-    QDir patch_download_dir;
-    QList<Patch> patches;
+    QSettings* app_settings;
+    quint8 active_downloads_number = 0;
+
+    const QDir patch_download_dir;
+    const QStringList all_patch_names = {"sound", "text", "image", "loadscreen", "texture", "font", "video"};
 
     QTimer update_check_timer;
-    QList<Downloader*> download_queue;
+
+    QMap<QString, Downloader*> downloads_list;
+    QMap<QString, Patch> patch_data;
 };
 
 #endif // PATCHDOWNLOADER_H

+ 21 - 0
src/Legacy/models/selfupdater.cpp

@@ -0,0 +1,21 @@
+#include "selfupdater.h"
+
+SelfUpdater::SelfUpdater(QObject *parent) : QObject(parent)
+{
+
+}
+
+void SelfUpdater::checkForUpdates()
+{
+
+}
+
+void SelfUpdater::onDownloaderCompleted(Downloader *downloader_ptr)
+{
+
+}
+
+void SelfUpdater::onDownloaderProgressChanged(Downloader *downloader_ptr)
+{
+
+}

+ 34 - 0
src/Legacy/models/selfupdater.h

@@ -0,0 +1,34 @@
+#ifndef SELFUPDATER_H
+#define SELFUPDATER_H
+
+#include <QObject>
+
+class Downloader;
+
+class SelfUpdater : public QObject
+{
+    Q_OBJECT
+public:
+    explicit SelfUpdater(QObject *parent = nullptr);
+    
+public slots:
+    void checkForUpdates();
+
+private slots:
+    void onDownloaderCompleted(Downloader *downloader_ptr);
+    void onDownloaderProgressChanged(Downloader *downloader_ptr);
+
+signals:
+    void downloadCompleted();
+    void downloadStarted();
+    void progressChanged(quint64 bytesDownloaded, quint64 bytesTotal,
+                         QString download_speed_formatted,
+                         QString elapsed_time_formatted);
+
+
+signals:
+
+public slots:
+};
+
+#endif // SELFUPDATER_H

+ 8 - 4
src/Legacy/object_script.Legacy.Debug

@@ -4,7 +4,8 @@ INPUT(
 ./..\..\build\debug\Legacy\obj\main.o
 ./..\..\build\debug\Legacy\obj\downloader.o
 ./..\..\build\debug\Legacy\obj\filesystem.o
-./..\..\build\debug\Legacy\obj\lotromanager.o
+./..\..\build\debug\Legacy\obj\lotrodatmanager.o
+./..\..\build\debug\Legacy\obj\patchdownloader.o
 ./..\..\build\debug\Legacy\obj\helpwidget.o
 ./..\..\build\debug\Legacy\obj\mainwindow.o
 ./..\..\build\debug\Legacy\obj\menuentry.o
@@ -17,11 +18,13 @@ INPUT(
 ./..\..\build\debug\Legacy\obj\newspiece.o
 ./..\..\build\debug\Legacy\obj\statusflagwidget.o
 ./..\..\build\debug\Legacy\obj\serverstatuswidget.o
-./..\..\build\debug\Legacy\obj\patchdownloader.o
+./..\..\build\debug\Legacy\obj\selfupdater.o
+./..\..\build\debug\Legacy\obj\eventslistwidget.o
 ./..\..\build\debug\Legacy\obj\legacy_plugin_import.o
 ./..\..\build\debug\Legacy\obj\moc_downloader.o
 ./..\..\build\debug\Legacy\obj\moc_filesystem.o
-./..\..\build\debug\Legacy\obj\moc_lotromanager.o
+./..\..\build\debug\Legacy\obj\moc_lotrodatmanager.o
+./..\..\build\debug\Legacy\obj\moc_patchdownloader.o
 ./..\..\build\debug\Legacy\obj\moc_helpwidget.o
 ./..\..\build\debug\Legacy\obj\moc_mainwindow.o
 ./..\..\build\debug\Legacy\obj\moc_menuentry.o
@@ -33,5 +36,6 @@ INPUT(
 ./..\..\build\debug\Legacy\obj\moc_newspiece.o
 ./..\..\build\debug\Legacy\obj\moc_statusflagwidget.o
 ./..\..\build\debug\Legacy\obj\moc_serverstatuswidget.o
-./..\..\build\debug\Legacy\obj\moc_patchdownloader.o
+./..\..\build\debug\Legacy\obj\moc_selfupdater.o
+./..\..\build\debug\Legacy\obj\moc_eventslistwidget.o
 );

+ 8 - 4
src/Legacy/object_script.Legacy.Release

@@ -2,7 +2,8 @@ INPUT(
 ./..\..\build\release\Legacy\obj\main.o
 ./..\..\build\release\Legacy\obj\downloader.o
 ./..\..\build\release\Legacy\obj\filesystem.o
-./..\..\build\release\Legacy\obj\lotromanager.o
+./..\..\build\release\Legacy\obj\lotrodatmanager.o
+./..\..\build\release\Legacy\obj\patchdownloader.o
 ./..\..\build\release\Legacy\obj\helpwidget.o
 ./..\..\build\release\Legacy\obj\mainwindow.o
 ./..\..\build\release\Legacy\obj\menuentry.o
@@ -15,11 +16,13 @@ INPUT(
 ./..\..\build\release\Legacy\obj\newspiece.o
 ./..\..\build\release\Legacy\obj\statusflagwidget.o
 ./..\..\build\release\Legacy\obj\serverstatuswidget.o
-./..\..\build\release\Legacy\obj\patchdownloader.o
+./..\..\build\release\Legacy\obj\selfupdater.o
+./..\..\build\release\Legacy\obj\eventslistwidget.o
 ./..\..\build\release\Legacy\obj\legacy_plugin_import.o
 ./..\..\build\release\Legacy\obj\moc_downloader.o
 ./..\..\build\release\Legacy\obj\moc_filesystem.o
-./..\..\build\release\Legacy\obj\moc_lotromanager.o
+./..\..\build\release\Legacy\obj\moc_lotrodatmanager.o
+./..\..\build\release\Legacy\obj\moc_patchdownloader.o
 ./..\..\build\release\Legacy\obj\moc_helpwidget.o
 ./..\..\build\release\Legacy\obj\moc_mainwindow.o
 ./..\..\build\release\Legacy\obj\moc_menuentry.o
@@ -31,5 +34,6 @@ INPUT(
 ./..\..\build\release\Legacy\obj\moc_newspiece.o
 ./..\..\build\release\Legacy\obj\moc_statusflagwidget.o
 ./..\..\build\release\Legacy\obj\moc_serverstatuswidget.o
-./..\..\build\release\Legacy\obj\moc_patchdownloader.o
+./..\..\build\release\Legacy\obj\moc_selfupdater.o
+./..\..\build\release\Legacy\obj\moc_eventslistwidget.o
 );

+ 99 - 0
src/Legacy/widgets/eventslistwidget.cpp

@@ -0,0 +1,99 @@
+#include "eventslistwidget.h"
+#include <QtConcurrent/QtConcurrent>
+#include <QLabel>
+#include <QStringList>
+#include <QSpacerItem>
+#include <widgets/newspiece.h>
+
+EventsListWidget::EventsListWidget(QWidget *parent) : QWidget(parent)
+{
+    event_downloader.targetBytearray = &events_data;
+    event_downloader.setUrl(QUrl("http://translate.lotros.ru/events/get/1"));
+
+    event_layout = new QVBoxLayout(this);
+    event_layout->setSpacing(7);
+    event_layout->setObjectName(QStringLiteral("events_layout"));
+    event_layout->setContentsMargins(11, 11, 11, 0);
+
+    connect(&event_update_timer, &QTimer::timeout, &event_downloader, &Downloader::start);
+    connect(&event_downloader, &Downloader::downloadFinished, this, &EventsListWidget::updateEvents);
+    emit event_downloader.start();
+    event_update_timer.setInterval(1000 * 60); // 60 seconds;
+    event_update_timer.start();
+}
+
+EventsListWidget::~EventsListWidget()
+{
+    event_update_timer.stop();
+}
+
+void EventsListWidget::updateEvents()
+{
+    if (!qApp)
+        return;
+
+    qDebug() << "Received data: " << QString(events_data);
+
+    if (events_data.size() == 0) {
+        constructEventPiece(0, "Не могу загрузить список событий", "Загрузка списка событий не удалась. Чтобы просмотреть текущие игровые события, перейдите на <a href='http://translate.lotros.ru/'>http://translate.lotros.ru/</a>", "http://translate.lotros.ru/", "");
+        return;
+    }
+
+    QStringList events_list = QString(events_data).split("|");
+    events_data.clear();
+
+    for (int i = 0; i < events_list.size(); i++) {
+        QStringList event_piece = events_list[i].split(":::");
+
+        qDebug() << "Processing event " << event_piece;
+
+        QString title = event_piece[0];
+        QString img_src = event_piece[1];
+        QString desrc = event_piece[2];
+        QString date_begin = event_piece[3];
+        QString date_end = event_piece[4];
+        QString date_formatted = event_piece[5];
+
+        constructEventPiece(i, title, desrc, "", date_formatted);
+
+        QtConcurrent::run([i, this, img_src](){
+            Downloader img_dwnld;
+            QByteArray img = "";
+            img_dwnld.setUrl(QUrl(img_src));
+            img_dwnld.targetBytearray = &img;
+            img_dwnld.start();
+            img_dwnld.waitForDownloaded();
+            qDebug() << "Downloaded " << img_src;
+            QPixmap img_pixmap;
+            img_pixmap.loadFromData(img);
+            QMetaObject::invokeMethod(this, "setImgToEventPiece", Qt::QueuedConnection, Q_ARG(int, i), Q_ARG(QPixmap, img_pixmap));
+        });
+    }
+}
+
+void EventsListWidget::constructEventPiece(int piece_id, QString title, QString text, QString news_src, QString news_date)
+{
+    NewsPiece* old_piece = findChild<NewsPiece*>("event_piece_" + QString::number(piece_id));
+
+    if (old_piece) {
+        event_layout->removeWidget(old_piece);
+        old_piece->deleteLater();
+    }
+
+    NewsPiece* news_piece = new NewsPiece(this);
+    news_piece->setObjectName(QStringLiteral("event_piece_") + QString::number(piece_id));
+    news_piece->setIcon(QPixmap(QString::fromUtf8(":/appicon.ico")).scaled(40, 40));
+    news_piece->setTitle(title, news_src);
+    news_piece->setContents(text);
+    news_piece->setDate(news_date);
+
+    event_layout->addWidget(news_piece, piece_id, 0);
+}
+
+void EventsListWidget::setImgToEventPiece(int piece_id, QPixmap img)
+{
+    NewsPiece* piece = findChild<NewsPiece*>("event_piece_" + QString::number(piece_id));
+    if (!piece)
+        return;
+    piece->setIcon(img);
+}

+ 39 - 0
src/Legacy/widgets/eventslistwidget.h

@@ -0,0 +1,39 @@
+#ifndef EVENTSLISTWIDGET_H
+#define EVENTSLISTWIDGET_H
+
+#include <QWidget>
+#include <QVBoxLayout>
+#include "models/downloader.h"
+#include <QTimer>
+#include <QMutex>
+
+class EventsListWidget : public QWidget
+{
+    Q_OBJECT
+public:
+    explicit EventsListWidget(QWidget *parent = nullptr);
+    ~EventsListWidget();
+
+signals:
+    void eventsUpdated();
+
+public slots:
+    void updateEvents();
+private slots:
+    void setImgToEventPiece(int piece_id, QPixmap img);
+
+private:
+    void constructEventPiece(int piece_id, QString title, QString text, QString news_src, QString news_date);
+
+private:
+    QVBoxLayout* event_layout;
+    QTimer event_update_timer;
+    QByteArray events_data;
+    Downloader event_downloader;
+
+signals:
+
+public slots:
+};
+
+#endif // EVENTSLISTWIDGET_H

+ 58 - 941
src/Legacy/widgets/helpwidget.ui

@@ -13,26 +13,20 @@
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <widget class="QScrollArea" name="scrollArea">
-   <property name="geometry">
-    <rect>
-     <x>11</x>
-     <y>11</y>
-     <width>464</width>
-     <height>384</height>
-    </rect>
-   </property>
-   <property name="sizePolicy">
-    <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-     <horstretch>0</horstretch>
-     <verstretch>0</verstretch>
-    </sizepolicy>
-   </property>
-   <property name="autoFillBackground">
-    <bool>false</bool>
-   </property>
-   <property name="styleSheet">
-    <string notr="true">QScrollArea{
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <widget class="QScrollArea" name="scrollArea">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="autoFillBackground">
+      <bool>false</bool>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">QScrollArea{
 	background: transparent;
 }
 
@@ -75,938 +69,61 @@ QScrollBar:vertical {
  QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
      background: none;
  }</string>
-   </property>
-   <property name="frameShape">
-    <enum>QFrame::NoFrame</enum>
-   </property>
-   <property name="frameShadow">
-    <enum>QFrame::Plain</enum>
-   </property>
-   <property name="lineWidth">
-    <number>0</number>
-   </property>
-   <property name="horizontalScrollBarPolicy">
-    <enum>Qt::ScrollBarAlwaysOff</enum>
-   </property>
-   <property name="sizeAdjustPolicy">
-    <enum>QAbstractScrollArea::AdjustIgnored</enum>
-   </property>
-   <property name="widgetResizable">
-    <bool>true</bool>
-   </property>
-   <property name="alignment">
-    <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-   </property>
-   <widget class="QWidget" name="scrollAreaWidgetContents">
-    <property name="geometry">
-     <rect>
-      <x>0</x>
-      <y>0</y>
-      <width>464</width>
-      <height>627</height>
-     </rect>
-    </property>
-    <property name="autoFillBackground">
-     <bool>false</bool>
-    </property>
-    <layout class="QGridLayout" name="news_layout">
-     <property name="leftMargin">
-      <number>11</number>
      </property>
-     <property name="topMargin">
-      <number>11</number>
+     <property name="frameShape">
+      <enum>QFrame::NoFrame</enum>
      </property>
-     <property name="rightMargin">
-      <number>11</number>
+     <property name="frameShadow">
+      <enum>QFrame::Plain</enum>
      </property>
-     <property name="bottomMargin">
-      <number>11</number>
+     <property name="lineWidth">
+      <number>0</number>
      </property>
-     <property name="spacing">
-      <number>7</number>
+     <property name="horizontalScrollBarPolicy">
+      <enum>Qt::ScrollBarAlwaysOff</enum>
      </property>
-     <item row="5" column="0">
-      <spacer name="verticalSpacer">
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>40</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item row="2" column="0">
-      <widget class="QWidget" name="backup_status_8" native="true">
-       <property name="styleSheet">
-        <string notr="true">border-radius: 20px;
-background-color: rgba(30, 0, 0, 100);</string>
+     <property name="sizeAdjustPolicy">
+      <enum>QAbstractScrollArea::AdjustIgnored</enum>
+     </property>
+     <property name="widgetResizable">
+      <bool>true</bool>
+     </property>
+     <property name="alignment">
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+     </property>
+     <widget class="QWidget" name="scrollAreaWidgetContents">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>618</width>
+        <height>458</height>
+       </rect>
+      </property>
+      <property name="autoFillBackground">
+       <bool>false</bool>
+      </property>
+      <layout class="QGridLayout" name="news_layout">
+       <property name="leftMargin">
+        <number>11</number>
        </property>
-       <layout class="QGridLayout" name="gridLayout_7">
-        <item row="0" column="0">
-         <widget class="QLabel" name="label_4_title_3">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-            <pointsize>8</pointsize>
-            <weight>50</weight>
-            <bold>false</bold>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: #cfa644;  background-color:none;</string>
-          </property>
-          <property name="text">
-           <string>Основные тексты:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QLabel" name="label_5_common_6">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>a_AlgeriusNr</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true"> background-color:none;
-color: rgb(255, 255, 127);</string>
-          </property>
-          <property name="text">
-           <string>Скачивается: 56%</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QPushButton" name="pushButton_3">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>80</width>
-            <height>20</height>
-           </size>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">QPushButton {
-	background-image: url(:/assets/buttons/gray_btn.png);
-	color: black;
-	border-radius: 5px;
-	border: 1px solid black;
-}
- 
-QPushButton:pressed {
-	border: 2px solid black;
-}</string>
-          </property>
-          <property name="text">
-           <string>Выключить</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0" colspan="3">
-         <widget class="QLabel" name="label_common_14">
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
-          </property>
-          <property name="text">
-           <string>Краткое описание бла-бла-бла lorem ipsum dolor sit amet bla-bla-bla angus magnus petricus жил я как-то в хижине, деревянной, да потом сгорела она</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-          </property>
-          <property name="wordWrap">
-           <bool>true</bool>
-          </property>
-          <property name="margin">
-           <number>0</number>
-          </property>
-          <property name="indent">
-           <number>0</number>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </item>
-     <item row="3" column="0">
-      <widget class="QWidget" name="backup_status_14" native="true">
-       <property name="styleSheet">
-        <string notr="true">border-radius: 20px;
-background-color: rgba(30, 0, 0, 100);</string>
+       <property name="topMargin">
+        <number>11</number>
        </property>
-       <layout class="QGridLayout" name="gridLayout_8">
-        <item row="0" column="2">
-         <widget class="QPushButton" name="pushButton_6">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>80</width>
-            <height>20</height>
-           </size>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">QPushButton {
-	background-image: url(:/assets/buttons/gray_btn.png);
-	color: black;
-	border-radius: 5px;
-	border: 1px solid black;
-}
- 
-QPushButton:pressed {
-	border: 2px solid black;
-}</string>
-          </property>
-          <property name="text">
-           <string>Выключить</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QLabel" name="label_5_common_15">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>a_AlgeriusNr</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true"> background-color:none;
-color: rgb(255, 255, 127);</string>
-          </property>
-          <property name="text">
-           <string>В очереди</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="0">
-         <widget class="QLabel" name="label_4_title_6">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-            <pointsize>8</pointsize>
-            <weight>50</weight>
-            <bold>false</bold>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: #cfa644;  background-color:none;</string>
-          </property>
-          <property name="text">
-           <string>Названия предметов:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0" colspan="3">
-         <widget class="QLabel" name="label_common_15">
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
-          </property>
-          <property name="text">
-           <string>Краткое описание бла-бла-бла lorem ipsum dolor sit amet bla-bla-bla angus magnus petricus жил я как-то в хижине, деревянной, да потом сгорела она</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-          </property>
-          <property name="wordWrap">
-           <bool>true</bool>
-          </property>
-          <property name="margin">
-           <number>0</number>
-          </property>
-          <property name="indent">
-           <number>0</number>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </item>
-     <item row="4" column="0">
-      <widget class="QWidget" name="backup_status_15" native="true">
-       <property name="styleSheet">
-        <string notr="true">border-radius: 20px;
-background-color: rgba(30, 0, 0, 100);</string>
+       <property name="rightMargin">
+        <number>11</number>
        </property>
-       <layout class="QGridLayout" name="gridLayout_9">
-        <item row="0" column="0">
-         <widget class="QLabel" name="label_4_title_7">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-            <pointsize>8</pointsize>
-            <weight>50</weight>
-            <bold>false</bold>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: #cfa644;  background-color:none;</string>
-          </property>
-          <property name="text">
-           <string>Названия эмоций:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QLabel" name="label_5_title_16">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>a_AlgeriusNr</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true"> background-color:none;
-color: rgb(255, 255, 127);</string>
-          </property>
-          <property name="text">
-           <string>В очереди</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QPushButton" name="pushButton_7">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">QPushButton {
-	color: black;
-    border: 2px solid #8f8f91;
-    border-radius: 6px;
-    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
-                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
-    min-width: 80px;
-}
- 
-QPushButton:pressed {
-    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
-                                      stop: 0 #caccd3, stop: 1 #f6f7fa);
-}
- 
-QPushButton:flat {
-    border: none; /* no border for a flat push button */
-}
- 
-QPushButton:default {
-    border-color: navy; /* make the default button prominent */
-}</string>
-          </property>
-          <property name="text">
-           <string>Выключить</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0" colspan="3">
-         <widget class="QLabel" name="label_common_10">
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
-          </property>
-          <property name="text">
-           <string>Краткое описание бла-бла-бла</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-          </property>
-          <property name="wordWrap">
-           <bool>true</bool>
-          </property>
-          <property name="margin">
-           <number>0</number>
-          </property>
-          <property name="indent">
-           <number>0</number>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </item>
-     <item row="1" column="0">
-      <widget class="QWidget" name="backup_status_16" native="true">
-       <property name="styleSheet">
-        <string notr="true">border-radius: 20px;
-background-color: rgba(30, 0, 0, 100);</string>
+       <property name="bottomMargin">
+        <number>11</number>
        </property>
-       <layout class="QGridLayout" name="gridLayout_13">
-        <item row="0" column="2">
-         <widget class="QLabel" name="label_5_common_18">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>a_AlgeriusNr</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true"> background-color:none;
-color: rgb(255, 0, 0);</string>
-          </property>
-          <property name="text">
-           <string>Выключен</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="3">
-         <widget class="QPushButton" name="pushButton_9">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>80</width>
-            <height>20</height>
-           </size>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">QPushButton {
-	background-image: url(:/assets/buttons/gray_btn.png);
-	color: black;
-	border-radius: 5px;
-	border: 1px solid black;
-}
- 
-QPushButton:pressed {
-	border: 2px solid black;
-}</string>
-          </property>
-          <property name="text">
-           <string>Включить</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QLabel" name="label_4_title_9">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-            <pointsize>8</pointsize>
-            <weight>50</weight>
-            <bold>false</bold>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: #cfa644;  background-color:none;</string>
-          </property>
-          <property name="text">
-           <string>Шрифты (старая версия):</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1" colspan="3">
-         <widget class="QLabel" name="label_common_13">
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
-          </property>
-          <property name="text">
-           <string>Краткое описание бла-бла-бла lorem ipsum dolor sit amet bla-bla-bla angus magnus petricus жил я как-то в хижине, деревянной, да потом сгорела она</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-          </property>
-          <property name="wordWrap">
-           <bool>true</bool>
-          </property>
-          <property name="margin">
-           <number>0</number>
-          </property>
-          <property name="indent">
-           <number>0</number>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="0" rowspan="2">
-         <widget class="QLabel" name="label_2">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>64</width>
-            <height>64</height>
-           </size>
-          </property>
-          <property name="maximumSize">
-           <size>
-            <width>64</width>
-            <height>64</height>
-           </size>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">border-image: url(:/assets/patch_icons/shrifty-photo-small.png);
-background: transparent; border-radius: 0px;</string>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </item>
-     <item row="0" column="0">
-      <widget class="QWidget" name="backup_status_3" native="true">
-       <property name="styleSheet">
-        <string notr="true">border-radius: 20px;
-background-color: rgba(30, 0, 0, 100);</string>
+       <property name="spacing">
+        <number>7</number>
        </property>
-       <layout class="QGridLayout" name="gridLayout_2">
-        <item row="0" column="1">
-         <widget class="QLabel" name="label_4_title">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-            <pointsize>8</pointsize>
-            <weight>50</weight>
-            <bold>false</bold>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: #cfa644;  background-color:none;</string>
-          </property>
-          <property name="text">
-           <string>Шрифты:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QLabel" name="label_5_common">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="font">
-           <font>
-            <family>a_AlgeriusNr</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: rgb(0, 170, 0); background-color:none;</string>
-          </property>
-          <property name="text">
-           <string>Включен</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="3">
-         <widget class="QPushButton" name="pushButton">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>80</width>
-            <height>20</height>
-           </size>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">QPushButton {
-	background-image: url(:/assets/buttons/gray_btn.png);
-	color: black;
-	border-radius: 5px;
-	border: 1px solid black;
-}
- 
-QPushButton:pressed {
-	border: 2px solid black;
-}</string>
-          </property>
-          <property name="text">
-           <string>Выключить</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="1" colspan="3">
-         <widget class="QLabel" name="label_common_4">
-          <property name="font">
-           <font>
-            <family>Trajan Pro 3</family>
-           </font>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">color: rgb(255, 255, 255); background-color: transparent;</string>
-          </property>
-          <property name="text">
-           <string>Краткое описание бла-бла-бла lorem ipsum dolor sit amet bla-bla-bla angus magnus petricus жил я как-то в хижине, деревянной, да потом сгорела она</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-          </property>
-          <property name="wordWrap">
-           <bool>true</bool>
-          </property>
-          <property name="margin">
-           <number>0</number>
-          </property>
-          <property name="indent">
-           <number>0</number>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="0" rowspan="4">
-         <widget class="QLabel" name="label">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="minimumSize">
-           <size>
-            <width>64</width>
-            <height>64</height>
-           </size>
-          </property>
-          <property name="maximumSize">
-           <size>
-            <width>64</width>
-            <height>64</height>
-           </size>
-          </property>
-          <property name="styleSheet">
-           <string notr="true">border-image: url(:/assets/patch_icons/shrifty-photo-small.png);
-background: transparent; border-radius: 0px;</string>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </item>
-    </layout>
-   </widget>
-  </widget>
-  <widget class="QWidget" name="servers_list" native="true">
-   <property name="enabled">
-    <bool>false</bool>
-   </property>
-   <property name="geometry">
-    <rect>
-     <x>500</x>
-     <y>50</y>
-     <width>156</width>
-     <height>353</height>
-    </rect>
-   </property>
-   <property name="sizePolicy">
-    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-     <horstretch>0</horstretch>
-     <verstretch>0</verstretch>
-    </sizepolicy>
-   </property>
-   <property name="maximumSize">
-    <size>
-     <width>16777215</width>
-     <height>16777215</height>
-    </size>
-   </property>
-   <property name="styleSheet">
-    <string notr="true">QWidget{
-border-radius: 10px;
-background-color: rgba(30, 0, 0, 70);
-color: white;
-}
-
-QLabel{
-border-radius: 2px;
-background-color:rgba(0,0,0,0);
-}</string>
-   </property>
-   <layout class="QGridLayout" name="gridLayout">
-    <item row="0" column="0">
-     <widget class="QLabel" name="anor_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Anor [VIP]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="1" column="0">
-     <widget class="QLabel" name="arkenstone_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Arkenstone [US]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="2" column="0">
-     <widget class="QLabel" name="belegaer_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Belegaer [DE]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="3" column="0">
-     <widget class="QLabel" name="brandywine_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Brandywine [US]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="4" column="0">
-     <widget class="QLabel" name="bullroarer_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Bullroarer [PTS]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="5" column="0">
-     <widget class="QLabel" name="crickhollow_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Crickhollow [US]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="6" column="0">
-     <widget class="QLabel" name="evernight_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Evernight [EU]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="7" column="0">
-     <widget class="QLabel" name="gladden_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Gladden [US]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="8" column="0">
-     <widget class="QLabel" name="gwaihir_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Gwaihir [DE]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="9" column="0">
-     <widget class="QLabel" name="ithil_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Ithil [VIP]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="10" column="0">
-     <widget class="QLabel" name="landroval_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Landroval [US]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="11" column="0">
-     <widget class="QLabel" name="laurelin_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Laurelin [EU-RP]</string>
-      </property>
-     </widget>
-    </item>
-    <item row="12" column="0">
-     <widget class="QLabel" name="sirannon_small">
-      <property name="font">
-       <font>
-        <family>Trajan Pro 3</family>
-       </font>
-      </property>
-      <property name="styleSheet">
-       <string notr="true">color: rgb(0, 170, 0); </string>
-      </property>
-      <property name="text">
-       <string>Sirannon [FR]</string>
-      </property>
+      </layout>
      </widget>
-    </item>
-   </layout>
-  </widget>
+    </widget>
+   </item>
+  </layout>
  </widget>
  <resources/>
  <connections/>

+ 5 - 5
src/Legacy/widgets/mainwindow.cpp

@@ -17,14 +17,14 @@ MainWindow::MainWindow(QWidget *parent) :
     QMainWindow(parent, Qt::Window | Qt::FramelessWindowHint),
     ui(new Ui::MainWindow), menuHoverWidget(nullptr), menuHoverWidgetAnimation(nullptr)
 {
+    setObjectName("ApplicationMainWindow");
     ui->setupUi(this);
-
     qDebug() << "Initialising Settings module";
     QSettings *settings = new QSettings(qApp->applicationDirPath() + "/legacy_v2.ini", QSettings::IniFormat);
 
     qDebug() << "Creating patch downloader instance & thread";
     patch_updater_thread = new QThread();
-    patch_updater = new PatchDownloader();
+    patch_updater = new PatchDownloader(settings);
     QObject::connect(patch_updater_thread, &QThread::finished, patch_updater, &QObject::deleteLater, Qt::QueuedConnection);
     patch_updater->moveToThread(patch_updater_thread);
     patch_updater_thread->start();
@@ -34,7 +34,7 @@ MainWindow::MainWindow(QWidget *parent) :
 
     status_widget = new StatusWidget(patch_updater, this);
     rusification_widget = new RusificationWidget(this);
-    settings_widget = new SettingsWidget(this);
+    settings_widget = new SettingsWidget(settings, this);
     help_widget = new HelpWidget(this);
 
     ui->content_layout->addWidget(status_widget);
@@ -96,8 +96,8 @@ void MainWindow::resizeEvent(QResizeEvent * event)
     int width = event->size().width();
     int height = event->size().height();
 
-    ui->menu_widget->move(width * 293 / 900, height * 35 / 650);
-    ui->menu_widget->resize(width * 571 / 900, height * 51 / 650);
+    ui->menu_widget->move(width * 300 / 900, height * 35 / 650);
+    ui->menu_widget->resize(width * 570 / 900, height * 50 / 650);
 
     ui->content_area->move(0, height * 110 / 650);
     ui->content_area->resize(width * 900 / 900, height * 515 / 650);

+ 17 - 40
src/Legacy/widgets/mainwindow.ui

@@ -90,14 +90,14 @@
    <widget class="QWidget" name="menu_widget" native="true">
     <property name="geometry">
      <rect>
-      <x>293</x>
+      <x>300</x>
       <y>35</y>
-      <width>571</width>
-      <height>51</height>
+      <width>570</width>
+      <height>50</height>
      </rect>
     </property>
     <property name="sizePolicy">
-     <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+     <sizepolicy hsizetype="Ignored" vsizetype="Minimum">
       <horstretch>0</horstretch>
       <verstretch>0</verstretch>
      </sizepolicy>
@@ -108,7 +108,7 @@
     <property name="styleSheet">
      <string notr="true">border-image:transparent;</string>
     </property>
-    <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,6,7,13,6,0,0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
      <property name="spacing">
       <number>10</number>
      </property>
@@ -127,23 +127,10 @@
      <property name="bottomMargin">
       <number>0</number>
      </property>
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
      <item>
       <widget class="MenuEntry" name="menuentry_1">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+        <sizepolicy hsizetype="Ignored" vsizetype="Expanding">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
@@ -157,7 +144,7 @@
        <property name="font">
         <font>
          <family>Constantia</family>
-         <pointsize>9</pointsize>
+         <pointsize>8</pointsize>
          <weight>50</weight>
          <bold>false</bold>
         </font>
@@ -172,7 +159,7 @@
         <string notr="true">color:rgb(255, 255, 255);</string>
        </property>
        <property name="text">
-        <string>  СТАТУС  </string>
+        <string>ИНФОРМАЦИЯ</string>
        </property>
        <property name="scaledContents">
         <bool>true</bool>
@@ -194,7 +181,7 @@
         <bool>true</bool>
        </property>
        <property name="sizePolicy">
-        <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+        <sizepolicy hsizetype="Ignored" vsizetype="Expanding">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
@@ -202,6 +189,7 @@
        <property name="font">
         <font>
          <family>Constantia</family>
+         <pointsize>8</pointsize>
         </font>
        </property>
        <property name="mouseTracking">
@@ -227,7 +215,7 @@
      <item>
       <widget class="MenuEntry" name="menuentry_3">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
+        <sizepolicy hsizetype="Ignored" vsizetype="Expanding">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
@@ -241,6 +229,7 @@
        <property name="font">
         <font>
          <family>Constantia</family>
+         <pointsize>8</pointsize>
         </font>
        </property>
        <property name="mouseTracking">
@@ -250,7 +239,7 @@
         <string notr="true">color:rgb(255, 255, 255)</string>
        </property>
        <property name="text">
-        <string notr="true">  РУСИФИКАЦИЯ  </string>
+        <string notr="true">РУСИФИКАЦИЯ</string>
        </property>
        <property name="scaledContents">
         <bool>true</bool>
@@ -266,7 +255,7 @@
      <item>
       <widget class="MenuEntry" name="menuentry_4">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+        <sizepolicy hsizetype="Ignored" vsizetype="Expanding">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
@@ -280,6 +269,7 @@
        <property name="font">
         <font>
          <family>Constantia</family>
+         <pointsize>8</pointsize>
         </font>
        </property>
        <property name="mouseTracking">
@@ -292,7 +282,7 @@
         <string notr="true">color:rgb(255, 255, 255);</string>
        </property>
        <property name="text">
-        <string>О НАСЛЕДИИ</string>
+        <string>  О НАСЛЕДИИ  </string>
        </property>
        <property name="scaledContents">
         <bool>true</bool>
@@ -305,23 +295,10 @@
        </property>
       </widget>
      </item>
-     <item>
-      <spacer name="horizontalSpacer_2">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
      <item>
       <widget class="QWidget" name="widget" native="true">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+        <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>

+ 1 - 1
src/Legacy/widgets/newslistwidget.cpp

@@ -14,7 +14,7 @@ NewsListWidget::NewsListWidget(QWidget *parent) : QWidget(parent)
     news_layout->setSpacing(7);
     news_layout->setObjectName(QStringLiteral("news_layout"));
     news_layout->setContentsMargins(11, 11, 11, 11);
-
+    news_layout->setSizeConstraint(QLayout::SetNoConstraint);
     connect(&news_update_timer, &QTimer::timeout, &news_downloader, &Downloader::start);
     connect(&news_downloader, &Downloader::downloadFinished, this, &NewsListWidget::updateNews);
     emit news_downloader.start();

+ 6 - 3
src/Legacy/widgets/newspiece.cpp

@@ -13,17 +13,20 @@ void NewsPiece::setTitle(const QString &title, const QString &url)
 {
     _title = title;
     _url = url;
-    ui->news_head_small->setText("<a style=\"color: #cfa644; text-decoration:none;\" href = '" + url + "'>" + title + "</a>");
+    ui->news_head_small->setText("<a style=\"color: #cfa644; text-decoration:none;\" href = '" + QString(url).remove("\n") + "'>" + QString(title).remove("\n") + "</a>");
+    resize(sizeHint());
 }
 
 void NewsPiece::setDate(const QString &date)
 {
-    ui->news_date_small->setText(date);
+    ui->news_date_small->setText(QString(date).remove("\n"));
+    resize(sizeHint());
 }
 
 void NewsPiece::setContents(const QString &contents)
 {
-    ui->news_content_small->setText(contents);
+    ui->news_content_small->setText(QString(contents).remove("\n"));
+    resize(sizeHint());
 }
 
 void NewsPiece::setIcon(const QPixmap &pixmap)

+ 137 - 80
src/Legacy/widgets/newspiece.ui

@@ -2,24 +2,22 @@
 <ui version="4.0">
  <class>NewsPiece</class>
  <widget class="QWidget" name="NewsPiece">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>471</width>
-    <height>131</height>
-   </rect>
-  </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+   <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
+  <property name="minimumSize">
+   <size>
+    <width>350</width>
+    <height>0</height>
+   </size>
   </property>
   <layout class="QGridLayout" name="gridLayout_2">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetNoConstraint</enum>
+   </property>
    <property name="leftMargin">
     <number>0</number>
    </property>
@@ -38,15 +36,18 @@
    <item row="0" column="0">
     <widget class="QWidget" name="piece_widget" native="true">
      <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+      <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
      <property name="styleSheet">
-      <string notr="true">QWidget{
-border-radius: 20px;
+      <string notr="true">QWidget#piece_widget{
+border-radius: 10px;
 background-color: rgba(30, 0, 0, 100);
+}
+
+QWidget {
 color: white;
 }
 
@@ -56,62 +57,115 @@ background-color:rgba(0,0,0,0);
 }</string>
      </property>
      <layout class="QGridLayout" name="gridLayout">
+      <property name="sizeConstraint">
+       <enum>QLayout::SetNoConstraint</enum>
+      </property>
+      <property name="leftMargin">
+       <number>11</number>
+      </property>
+      <property name="rightMargin">
+       <number>11</number>
+      </property>
+      <property name="bottomMargin">
+       <number>5</number>
+      </property>
       <property name="spacing">
-       <number>7</number>
+       <number>11</number>
       </property>
-      <item row="0" column="0" rowspan="2">
-       <widget class="QLabel" name="news_icon">
-        <property name="minimumSize">
-         <size>
-          <width>40</width>
-          <height>40</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>40</width>
-          <height>40</height>
-         </size>
-        </property>
-        <property name="text">
-         <string/>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="1">
-       <widget class="QLabel" name="news_head_small">
+      <item row="0" column="1" rowspan="2" colspan="3">
+       <widget class="QWidget" name="widget" native="true">
         <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+         <sizepolicy hsizetype="Expanding" vsizetype="Ignored">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <property name="font">
-         <font>
-          <family>Aniron</family>
-          <pointsize>7</pointsize>
-          <weight>50</weight>
-          <bold>false</bold>
-         </font>
-        </property>
-        <property name="styleSheet">
-         <string notr="true"/>
-        </property>
-        <property name="text">
-         <string>LOOTBOX WEEKEND</string>
-        </property>
-        <property name="wordWrap">
-         <bool>true</bool>
-        </property>
-        <property name="openExternalLinks">
-         <bool>true</bool>
-        </property>
+        <layout class="QVBoxLayout" name="verticalLayout">
+         <property name="spacing">
+          <number>5</number>
+         </property>
+         <property name="sizeConstraint">
+          <enum>QLayout::SetNoConstraint</enum>
+         </property>
+         <property name="leftMargin">
+          <number>5</number>
+         </property>
+         <property name="topMargin">
+          <number>0</number>
+         </property>
+         <property name="rightMargin">
+          <number>5</number>
+         </property>
+         <property name="bottomMargin">
+          <number>0</number>
+         </property>
+         <item>
+          <widget class="QLabel" name="news_head_small">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Ignored">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="font">
+            <font>
+             <family>Aniron</family>
+             <pointsize>7</pointsize>
+             <weight>75</weight>
+             <bold>true</bold>
+            </font>
+           </property>
+           <property name="styleSheet">
+            <string notr="true"/>
+           </property>
+           <property name="text">
+            <string>Рейд &quot;Ледяная наковальня Кузницы Зимы&quot; снова работает jhgf jhgf jhgf jhgf jhgf jhgf hh </string>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+           <property name="openExternalLinks">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QLabel" name="news_date_small">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Ignored">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="font">
+            <font>
+             <family>Trajan Pro 3</family>
+             <pointsize>7</pointsize>
+             <weight>50</weight>
+             <bold>false</bold>
+            </font>
+           </property>
+           <property name="styleSheet">
+            <string notr="true"/>
+           </property>
+           <property name="text">
+            <string>15 ноября 2018 - 19 ноября 2018</string>
+           </property>
+           <property name="textFormat">
+            <enum>Qt::RichText</enum>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </widget>
       </item>
-      <item row="1" column="1">
-       <widget class="QLabel" name="news_date_small">
+      <item row="2" column="0" colspan="4">
+       <widget class="QLabel" name="news_content_small">
         <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+         <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
@@ -119,47 +173,50 @@ background-color:rgba(0,0,0,0);
         <property name="font">
          <font>
           <family>Trajan Pro 3</family>
-          <pointsize>8</pointsize>
-          <weight>50</weight>
-          <bold>false</bold>
+          <pointsize>7</pointsize>
          </font>
         </property>
         <property name="styleSheet">
          <string notr="true"/>
         </property>
         <property name="text">
-         <string>15 ноября 2018 - 19 ноября 2018</string>
+         <string>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin congue porttitor semper. Maecenas tellus nisl, iaculis ut ipsum in, posuere consequat ligula. Sed id nulla a massa viverra imperdiet at vel nibh. Morbi in mauris lorem. Mauris tellus libero, placerat et tristique in, suscipit eget mauris. Donec fringilla dictum velit eget posuere. Nunc vitae tortor auctor, posuere velit quis, tempor felis. Nullam et justo vel nunc rhoncus mollis. Mauris cursus erat eget risus feugiat, non ornare erat vestibulum. In cursus sodales turpis, accumsan euismod arcu suscipit sed. Sed vitae mi sollicitudin arcu iaculis efficitur id ac mauris. Pellentesque facilisis mauris a mauris tempus tincidunt. Praesent eget egestas libero. Nunc consequat mattis sapien eget sodales.
+
+</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
         </property>
         <property name="wordWrap">
          <bool>true</bool>
         </property>
+        <property name="openExternalLinks">
+         <bool>true</bool>
+        </property>
        </widget>
       </item>
-      <item row="2" column="0" colspan="2">
-       <widget class="QLabel" name="news_content_small">
+      <item row="0" column="0" rowspan="2">
+       <widget class="QLabel" name="news_icon">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <property name="font">
-         <font>
-          <family>Trajan Pro 3</family>
-          <pointsize>8</pointsize>
-         </font>
+        <property name="minimumSize">
+         <size>
+          <width>45</width>
+          <height>45</height>
+         </size>
         </property>
-        <property name="styleSheet">
-         <string notr="true"/>
+        <property name="maximumSize">
+         <size>
+          <width>45</width>
+          <height>45</height>
+         </size>
         </property>
         <property name="text">
-         <string>Уикенд сундуков! Шансы найти окованные ларцы заметно увеличены.</string>
-        </property>
-        <property name="wordWrap">
-         <bool>true</bool>
-        </property>
-        <property name="openExternalLinks">
-         <bool>true</bool>
+         <string/>
         </property>
        </widget>
       </item>

+ 0 - 73
src/Legacy/widgets/rusificationwidget.cpp

@@ -3,35 +3,11 @@
 #include "widgets/rusificationtreeitem.h"
 #include <QDebug>
 
-void doStuffWithEveryItemInMyTree( QTreeWidgetItem *item )
-{
-    item->setCheckState(0, Qt::Checked);
-    for( int i = 0; i < item->childCount(); ++i )
-        doStuffWithEveryItemInMyTree( item->child(i) );
-}
-
-QTreeWidgetItem* findItemByName(QTreeWidgetItem* item, QString name) {
-    for (int i = 0; i < item->childCount(); i++) {
-        if (((RusificationTreeItem*)item->child(i))->name == name)
-            return item->child(i);
-
-        QTreeWidgetItem* found_item = findItemByName(item->child(i), name);
-        if (found_item)
-            return found_item;
-    }
-    return nullptr;
-}
-
 RusificationWidget::RusificationWidget(QWidget *parent) :
     QWidget(parent),
     ui(new Ui::RusificationWidget)
 {
     ui->setupUi(this);
-    setupTreeWidget();
-
-    ui_update_timer.setInterval(500);
-    connect(&ui_update_timer, &QTimer::timeout, this, &RusificationWidget::updateUI);
-    ui_update_timer.start();
 }
 
 RusificationWidget::~RusificationWidget()
@@ -39,52 +15,3 @@ RusificationWidget::~RusificationWidget()
     delete ui;
 }
 
-void RusificationWidget::setupTreeWidget()
-{
-    connect(ui->treeWidget_title, &QTreeWidget::itemEntered, this, &RusificationWidget::onHoveredTreeItemChanged);
-
-    QSettings patch_list(qApp->applicationDirPath() + "/legacy_patches.ini", QSettings::IniFormat);
-    patch_list.setIniCodec("UTF-8");
-    ui->treeWidget_title->setMouseTracking(true);
-
-    foreach (const QString &group, patch_list.childGroups()) {
-        qDebug() << "Processing " << group << " patch item";
-
-        RusificationTreeItem* item = new RusificationTreeItem(group);
-        item->parseSettingsItem(patch_list);
-
-        QTreeWidgetItem* parent_item = findItemByName(ui->treeWidget_title->invisibleRootItem(), item->parent_name);
-        if (!parent_item)
-            parent_item = ui->treeWidget_title->invisibleRootItem();
-
-        parent_item->addChild(item);
-    }
-
-    ui->treeWidget_title->expandAll();
-    doStuffWithEveryItemInMyTree(ui->treeWidget_title->invisibleRootItem());
-}
-
-void RusificationWidget::onHoveredTreeItemChanged(QTreeWidgetItem *item, int column)
-{
-    RusificationTreeItem *tree_item = (RusificationTreeItem*)(item);
-    ui->patch_hint->setText("Патч: " + tree_item->title + "\nОписание: " + tree_item->description);
-}
-
-void RusificationWidget::updateUI()
-{
-    if (!qApp)
-        return;
-
-    QPoint pos = QCursor::pos();
-    QWidget *hovered = qApp->widgetAt(pos);
-    if (!hovered) {
-        ui->patch_hint->setText("No object!");
-    }
-
-    if (hovered) {
-        QWidget* parent = hovered->parentWidget();
-        if (parent && (hovered->objectName() != "qt_scrollarea_viewport"
-                       || parent->objectName() != "treeWidget_title"))
-            ui->patch_hint->setText(hovered->objectName() + "\n" + parent->objectName());
-    }
-}

+ 0 - 8
src/Legacy/widgets/rusificationwidget.h

@@ -18,17 +18,9 @@ public:
 
     ~RusificationWidget();
 
-private:
-    void setupTreeWidget();
-
-private slots:
-    void onHoveredTreeItemChanged(QTreeWidgetItem *item, int column);
-
-    void updateUI();
 
 private:
     Ui::RusificationWidget *ui;
-    QTimer ui_update_timer;
 };
 
 #endif // RUSIFICATIONWIDGET_H

+ 884 - 248
src/Legacy/widgets/rusificationwidget.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>860</width>
-    <height>491</height>
+    <width>895</width>
+    <height>481</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -24,320 +24,956 @@
 	color: white;
 }</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout_4">
-   <item row="0" column="0">
-    <widget class="QWidget" name="left_column_widget" native="true">
+  <layout class="QGridLayout" name="gridLayout_5">
+   <item row="0" column="1" colspan="2">
+    <widget class="QWidget" name="widget_15" native="true">
      <property name="sizePolicy">
-      <sizepolicy hsizetype="Fixed" vsizetype="Ignored">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
-     <property name="minimumSize">
-      <size>
-       <width>350</width>
-       <height>0</height>
-      </size>
-     </property>
-     <property name="styleSheet">
-      <string notr="true">border-radius: 20px;
-background-color: rgba(30, 0, 0, 100);</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout">
-      <item row="0" column="0">
-       <widget class="QTreeWidget" name="treeWidget_title">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="mouseTracking">
-         <bool>true</bool>
-        </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_7">
+      <property name="spacing">
+       <number>25</number>
+      </property>
+      <property name="topMargin">
+       <number>30</number>
+      </property>
+      <item>
+       <widget class="QWidget" name="widget" native="true">
         <property name="styleSheet">
-         <string notr="true">QTreeWidget{
-border-radius: 20px;
-color: rgb(255, 255, 255);
-background-color: rgba(255, 255, 255, 0);
-}
-QScrollBar:vertical {
-     border: 0px solid grey;
-     background: transparent;
-     width: 10px;
-     margin: 22px 0 22px 0;
- }
-
- QScrollBar::handle:vertical {
-	background-color: rgba(129, 129, 129, 150);	
-    min-height: 10px;
-	border-radius: 5px;
- }
- QScrollBar::add-line:vertical {
-     border: 0px solid grey;
-     background: transparent;
-     height: 1px;
-     subcontrol-position: bottom;
-     subcontrol-origin: margin;
- }
-
- QScrollBar::sub-line:vertical {
-     border: 0px solid grey;
-     background: transparent;
-     height: 1px;
-     subcontrol-position: top;
-     subcontrol-origin: margin;
- }
- QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
-     border: 0px;
-     width: 3px;
-     height: 3px;
-     background: transparent;
- }
-
- QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
-     background: none;
- }
-
-QTreeView::branch:closed:has-children{
-	width: 16px;
-	height: 16px;
-	image: url(:/assets/buttons/right_plus.png);
-}
-
-QTreeView::branch:open:has-children{
-	width: 16px;
-	height: 16px;
-	image: url(:/assets/buttons/down_minus.png);
-}
-</string>
-        </property>
-        <property name="frameShape">
-         <enum>QFrame::NoFrame</enum>
-        </property>
-        <property name="verticalScrollBarPolicy">
-         <enum>Qt::ScrollBarAsNeeded</enum>
-        </property>
-        <property name="editTriggers">
-         <set>QAbstractItemView::EditKeyPressed</set>
-        </property>
-        <property name="showDropIndicator" stdset="0">
-         <bool>false</bool>
-        </property>
-        <property name="alternatingRowColors">
-         <bool>false</bool>
-        </property>
-        <property name="selectionMode">
-         <enum>QAbstractItemView::NoSelection</enum>
-        </property>
-        <property name="verticalScrollMode">
-         <enum>QAbstractItemView::ScrollPerItem</enum>
-        </property>
-        <property name="autoExpandDelay">
-         <number>0</number>
-        </property>
-        <property name="indentation">
-         <number>20</number>
-        </property>
-        <property name="rootIsDecorated">
-         <bool>false</bool>
-        </property>
-        <property name="uniformRowHeights">
-         <bool>false</bool>
-        </property>
-        <property name="itemsExpandable">
-         <bool>true</bool>
-        </property>
-        <property name="animated">
-         <bool>true</bool>
-        </property>
-        <property name="allColumnsShowFocus">
-         <bool>false</bool>
-        </property>
-        <property name="headerHidden">
-         <bool>true</bool>
-        </property>
-        <property name="expandsOnDoubleClick">
-         <bool>false</bool>
+         <string notr="true">QWidget#widget{
+	border-radius: 20px;
+	background-color: rgba(30, 0, 0, 100);
+}</string>
         </property>
-        <attribute name="headerVisible">
-         <bool>false</bool>
-        </attribute>
-        <column>
-         <property name="text">
-          <string>Устанавливаемые элементы</string>
+        <layout class="QGridLayout" name="gridLayout">
+         <property name="leftMargin">
+          <number>20</number>
          </property>
-         <property name="background">
-          <color alpha="0">
-           <red>0</red>
-           <green>0</green>
-           <blue>0</blue>
-          </color>
+         <property name="topMargin">
+          <number>10</number>
          </property>
-         <property name="foreground">
-          <brush brushstyle="NoBrush">
-           <color alpha="0">
-            <red>0</red>
-            <green>0</green>
-            <blue>0</blue>
-           </color>
-          </brush>
+         <property name="rightMargin">
+          <number>20</number>
          </property>
-        </column>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="0" column="1">
-    <widget class="QWidget" name="right_column_widget" native="true">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <layout class="QGridLayout" name="gridLayout_2">
-      <item row="0" column="1" colspan="2">
-       <widget class="QWidget" name="widget_2" native="true">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="styleSheet">
-         <string notr="true">QWidget#widget_2 {
-border-radius: 20px;
-background-color: rgba(30, 0, 0, 100);
-color:rgb(255,255,255);
-}</string>
-        </property>
-        <layout class="QGridLayout" name="gridLayout_3">
+         <property name="bottomMargin">
+          <number>11</number>
+         </property>
+         <item row="2" column="0" colspan="4">
+          <widget class="QCheckBox" name="checkBox">
+           <property name="font">
+            <font>
+             <family>Trajan Pro 3</family>
+            </font>
+           </property>
+           <property name="text">
+            <string>Включить</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0" colspan="4">
+          <widget class="QLabel" name="label_common">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="font">
+            <font>
+             <family>Aniron</family>
+             <weight>75</weight>
+             <bold>true</bold>
+            </font>
+           </property>
+           <property name="text">
+            <string>Тексты</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="3">
+          <spacer name="horizontalSpacer_2">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
          <item row="1" column="0">
-          <widget class="QLabel" name="label_3">
+          <spacer name="horizontalSpacer">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="1" column="1" colspan="2">
+          <widget class="QLabel" name="label_2">
            <property name="minimumSize">
             <size>
-             <width>100</width>
-             <height>100</height>
+             <width>70</width>
+             <height>70</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>70</width>
+             <height>70</height>
             </size>
            </property>
            <property name="styleSheet">
-            <string notr="true">background-color:none;</string>
+            <string notr="true">border-image: url(:/patch_icons/teksty-photo-small.png);</string>
            </property>
            <property name="text">
-            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/assets/teksty-photo-normal.png&quot; width=&quot;100&quot; height=&quot;100&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+            <string/>
            </property>
-           <property name="alignment">
-            <set>Qt::AlignCenter</set>
+          </widget>
+         </item>
+         <item row="3" column="0" colspan="4">
+          <widget class="QWidget" name="widget_2" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
            </property>
+           <layout class="QHBoxLayout" name="horizontalLayout">
+            <property name="spacing">
+             <number>7</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="QLabel" name="label_3_common">
+              <property name="text">
+               <string>Статус:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_4_common">
+              <property name="font">
+               <font>
+                <family>a_AlgeriusNr</family>
+               </font>
+              </property>
+              <property name="text">
+               <string>АКТИВЕН</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
           </widget>
          </item>
-         <item row="1" column="1">
-          <widget class="QTextBrowser" name="patch_hint">
-           <property name="styleSheet">
-            <string notr="true">border-radius: 20px;
-background-color: rgba(30, 0, 0, 0);
-color:rgb(255,255,255);
-</string>
+         <item row="4" column="0" colspan="4">
+          <widget class="QWidget" name="widget_4" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
            </property>
-           <property name="html">
-            <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:7.8pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Ставьте или убирайте галочки в пунктах меню слева, чтобы включить или отключить фрагмент русификации.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Для включения некоторых фрагментов потребуется дополнительная загрузка данных&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Чтобы применить изменения, нажмите кнопку &amp;quot;Применить&amp;quot;. &lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+           <layout class="QVBoxLayout" name="verticalLayout">
+            <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="QLabel" name="label_7_common">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="font">
+               <font>
+                <family>Trajan Pro 3</family>
+               </font>
+              </property>
+              <property name="text">
+               <string>Дополнительные опции:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignCenter</set>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="Line" name="line">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QRadioButton" name="radioButton_common">
+              <property name="text">
+               <string>Шрифты (версия 1)</string>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QRadioButton" name="radioButton_2_common">
+              <property name="text">
+               <string>Шрифты (версия 2)</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QCheckBox" name="checkBox_common">
+              <property name="text">
+               <string>Перевод предметов</string>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QCheckBox" name="checkBox_2_common">
+              <property name="text">
+               <string>Перевод эмоций</string>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_5" native="true">
+        <property name="styleSheet">
+         <string notr="true">QWidget#widget_5{
+	border-radius: 20px;
+	background-color: rgba(30, 0, 0, 100);
+}</string>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_2" rowstretch="0,0,0,0,0,0,0,0">
+         <property name="leftMargin">
+          <number>20</number>
+         </property>
+         <property name="topMargin">
+          <number>11</number>
+         </property>
+         <property name="rightMargin">
+          <number>20</number>
+         </property>
+         <property name="bottomMargin">
+          <number>11</number>
+         </property>
+         <item row="2" column="0" colspan="4">
+          <widget class="QCheckBox" name="checkBox_2">
+           <property name="font">
+            <font>
+             <family>Trajan Pro 3</family>
+            </font>
+           </property>
+           <property name="text">
+            <string>Включить</string>
            </property>
           </widget>
          </item>
-         <item row="0" column="0" colspan="2">
-          <widget class="QLabel" name="label_2_title">
+         <item row="0" column="0" colspan="4">
+          <widget class="QLabel" name="label_8_common">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
            <property name="font">
             <font>
-             <family>Times New Roman</family>
-             <pointsize>12</pointsize>
+             <family>Aniron</family>
              <weight>75</weight>
              <bold>true</bold>
             </font>
            </property>
-           <property name="styleSheet">
-            <string notr="true">background:none</string>
-           </property>
            <property name="text">
-            <string>Подсказка</string>
+            <string>Изображения</string>
            </property>
            <property name="alignment">
             <set>Qt::AlignCenter</set>
            </property>
           </widget>
          </item>
+         <item row="1" column="3">
+          <spacer name="horizontalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="1" column="0">
+          <spacer name="horizontalSpacer_4">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="1" column="1" colspan="2">
+          <widget class="QLabel" name="label_13">
+           <property name="minimumSize">
+            <size>
+             <width>70</width>
+             <height>70</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>70</width>
+             <height>70</height>
+            </size>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">border-image: url(:/patch_icons/karty-photo-small.png);</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item row="7" column="0" colspan="4">
+          <spacer name="verticalSpacer">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="3" column="0" colspan="4">
+          <widget class="QWidget" name="widget_6" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <layout class="QHBoxLayout" name="horizontalLayout_3">
+            <property name="spacing">
+             <number>7</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="QLabel" name="label_9_common">
+              <property name="text">
+               <string>Статус:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_10_common">
+              <property name="font">
+               <font>
+                <family>a_AlgeriusNr</family>
+               </font>
+              </property>
+              <property name="text">
+               <string>АКТИВЕН</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
+         </item>
+         <item row="5" column="0" colspan="4">
+          <widget class="QWidget" name="widget_8" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_2">
+            <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>
+           </layout>
+          </widget>
+         </item>
+         <item row="6" column="0" colspan="4">
+          <widget class="QWidget" name="widget_13" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_4">
+            <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="QLabel" name="label_20_common">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="font">
+               <font>
+                <family>Trajan Pro 3</family>
+               </font>
+              </property>
+              <property name="text">
+               <string>Дополнительные опции:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignCenter</set>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="Line" name="line_2">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QCheckBox" name="checkBox_4_common">
+              <property name="text">
+               <string>Карты</string>
+              </property>
+              <property name="checkable">
+               <bool>true</bool>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QCheckBox" name="checkBox_5_common">
+              <property name="text">
+               <string>Загрузочные экраны</string>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
+         </item>
         </layout>
        </widget>
       </item>
-      <item row="1" column="1" colspan="2">
-       <spacer name="verticalSpacer_2">
-        <property name="orientation">
-         <enum>Qt::Vertical</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>321</width>
-          <height>18</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item row="2" column="1" colspan="2">
-       <widget class="QWidget" name="widget" native="true">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
+      <item>
+       <widget class="QWidget" name="widget_9" native="true">
+        <property name="styleSheet">
+         <string notr="true">QWidget#widget_9{
+	border-radius: 20px;
+	background-color: rgba(30, 0, 0, 100);
+}</string>
         </property>
-        <layout class="QHBoxLayout" name="horizontalLayout_2">
-         <item>
-          <spacer name="horizontalSpacer">
+        <layout class="QGridLayout" name="gridLayout_3">
+         <property name="leftMargin">
+          <number>20</number>
+         </property>
+         <property name="topMargin">
+          <number>11</number>
+         </property>
+         <property name="rightMargin">
+          <number>20</number>
+         </property>
+         <property name="bottomMargin">
+          <number>11</number>
+         </property>
+         <item row="2" column="0" colspan="4">
+          <widget class="QCheckBox" name="checkBox_3">
+           <property name="font">
+            <font>
+             <family>Trajan Pro 3</family>
+            </font>
+           </property>
+           <property name="text">
+            <string>Включить</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1" colspan="2">
+          <widget class="QLabel" name="label_19">
+           <property name="minimumSize">
+            <size>
+             <width>70</width>
+             <height>70</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>70</width>
+             <height>70</height>
+            </size>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">border-image: url(:/patch_icons/zvuki-photo-small.png);</string>
+           </property>
+           <property name="text">
+            <string/>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <spacer name="horizontalSpacer_6">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="1" column="3">
+          <spacer name="horizontalSpacer_5">
            <property name="orientation">
             <enum>Qt::Horizontal</enum>
            </property>
            <property name="sizeHint" stdset="0">
             <size>
-             <width>132</width>
-             <height>57</height>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="6" column="0" colspan="4">
+          <spacer name="verticalSpacer_2">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>40</height>
             </size>
            </property>
           </spacer>
          </item>
-         <item>
-          <widget class="QPushButton" name="pushButton">
+         <item row="0" column="0" colspan="4">
+          <widget class="QLabel" name="label_14_common">
            <property name="sizePolicy">
-            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
-           <property name="minimumSize">
-            <size>
-             <width>160</width>
-             <height>60</height>
-            </size>
+           <property name="font">
+            <font>
+             <family>Aniron</family>
+             <weight>75</weight>
+             <bold>true</bold>
+            </font>
            </property>
            <property name="text">
-            <string>ПРИМЕНИТЬ</string>
+            <string>Озвучка</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
            </property>
           </widget>
          </item>
+         <item row="3" column="0" colspan="4">
+          <widget class="QWidget" name="widget_10" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <layout class="QHBoxLayout" name="horizontalLayout_5">
+            <property name="spacing">
+             <number>7</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="QLabel" name="label_15_common">
+              <property name="text">
+               <string>Статус:</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="label_16_common">
+              <property name="font">
+               <font>
+                <family>a_AlgeriusNr</family>
+               </font>
+              </property>
+              <property name="text">
+               <string>АКТИВЕН</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
+         </item>
+         <item row="5" column="0" colspan="4">
+          <widget class="QWidget" name="widget_14" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_5">
+            <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="QLabel" name="label_21">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="font">
+               <font>
+                <family>Trajan Pro 3</family>
+               </font>
+              </property>
+              <property name="text">
+               <string>Дополнительные опции:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignCenter</set>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="Line" name="line_3">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QCheckBox" name="checkBox_6_common">
+              <property name="text">
+               <string>Озвучка персонажей</string>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QCheckBox" name="checkBox_7_common">
+              <property name="text">
+               <string>Озвучка видеороликов</string>
+              </property>
+              <property name="checked">
+               <bool>true</bool>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
+         </item>
+         <item row="4" column="0" colspan="4">
+          <widget class="QWidget" name="widget_12" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <layout class="QVBoxLayout" name="verticalLayout_3">
+            <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>
+           </layout>
+          </widget>
+         </item>
         </layout>
        </widget>
       </item>
      </layout>
     </widget>
    </item>
+   <item row="2" column="0" colspan="4">
+    <widget class="QWidget" name="bottom_widget" native="true">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_4">
+      <property name="topMargin">
+       <number>0</number>
+      </property>
+      <property name="bottomMargin">
+       <number>0</number>
+      </property>
+      <property name="verticalSpacing">
+       <number>0</number>
+      </property>
+      <item row="1" column="0">
+       <widget class="QProgressBar" name="progressBar">
+        <property name="minimumSize">
+         <size>
+          <width>0</width>
+          <height>42</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>39</height>
+         </size>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">QProgressBar {
+    border: 0px solid grey;
+	border-image: url(:/per.png);
+}
+
+QProgressBar::chunk {
+background-image: url(:/letters.png);
+margin-left:8px;
+margin-right:8px;
+margin-top:7px;
+margin-bottom:7px;
+}
+</string>
+        </property>
+        <property name="maximum">
+         <number>100</number>
+        </property>
+        <property name="value">
+         <number>50</number>
+        </property>
+        <property name="textVisible">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0">
+       <widget class="QLabel" name="process_label">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Установка чего-то - 50%</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
+        </property>
+        <property name="wordWrap">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="QPushButton" name="cancelButton">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>42</width>
+          <height>42</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>42</width>
+          <height>42</height>
+         </size>
+        </property>
+        <property name="cursor">
+         <cursorShape>PointingHandCursor</cursorShape>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">
+QPushButton#cancelButton { 
+	border-image: url(:/buttons/cancel_btn.png) 0 0 0 0 stretch stretch; 
+	border:1px;
+}
+
+QPushButton#cancelButton:hover { 
+	border-image: url(:/buttons/cancel_btn.png) 0 0 0 0 stretch stretch; 
+	border:0px;
+}</string>
+        </property>
+        <property name="text">
+         <string/>
+        </property>
+        <property name="flat">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="0" column="0">
+    <spacer name="horizontalSpacer_7">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="3">
+    <spacer name="horizontalSpacer_8">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="0" colspan="4">
+    <spacer name="verticalSpacer_3">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
   </layout>
  </widget>
  <resources/>

+ 26 - 5
src/Legacy/widgets/serverstatuswidget.ui

@@ -6,10 +6,16 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>418</width>
-    <height>188</height>
+    <width>364</width>
+    <height>154</height>
    </rect>
   </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
@@ -26,12 +32,21 @@
    <property name="bottomMargin">
     <number>0</number>
    </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
    <item row="0" column="0">
     <widget class="QWidget" name="us_cluster" native="true">
      <property name="styleSheet">
       <string notr="true">color:white;</string>
      </property>
      <layout class="QVBoxLayout" name="verticalLayout_7">
+      <property name="spacing">
+       <number>5</number>
+      </property>
+      <property name="bottomMargin">
+       <number>0</number>
+      </property>
       <item>
        <widget class="QLabel" name="us_label_common">
         <property name="font">
@@ -60,7 +75,7 @@
          <string notr="true">color: rgb(255, 255, 127);</string>
         </property>
         <property name="text">
-         <string>Arkenstone [US]</string>
+         <string>Arkenstone</string>
         </property>
        </widget>
       </item>
@@ -70,7 +85,7 @@
          <string notr="true">color: rgb(255, 255, 127);</string>
         </property>
         <property name="text">
-         <string>Brandywine [US]</string>
+         <string>Brandywine</string>
         </property>
        </widget>
       </item>
@@ -80,7 +95,7 @@
          <string notr="true">color: rgb(255, 255, 127);</string>
         </property>
         <property name="text">
-         <string>Crickhollow [US]</string>
+         <string>Crickhollow</string>
         </property>
        </widget>
       </item>
@@ -113,6 +128,9 @@
       <string notr="true">color:white;</string>
      </property>
      <layout class="QVBoxLayout" name="verticalLayout_8">
+      <property name="spacing">
+       <number>5</number>
+      </property>
       <item>
        <widget class="QLabel" name="eu_label_common">
         <property name="font">
@@ -194,6 +212,9 @@
       <string notr="true">color:white;</string>
      </property>
      <layout class="QVBoxLayout" name="verticalLayout_9">
+      <property name="spacing">
+       <number>5</number>
+      </property>
       <item>
        <widget class="QLabel" name="legendary_servers_label_common">
         <property name="font">

+ 15 - 8
src/Legacy/widgets/settingswidget.cpp

@@ -1,14 +1,14 @@
 #include "widgets/settingswidget.h"
 #include "ui_settingswidget.h"
 #include "models/filesystem.h"
+#include "widgets/mainwindow.h"
 
 #include <QDebug>
 #include <QFileDialog>
 #include <QMessageBox>
 
-
-SettingsWidget::SettingsWidget(QWidget *parent) :
-    QWidget(parent),
+SettingsWidget::SettingsWidget(QSettings *settings, QWidget *parent) :
+    QWidget(parent), app_settings(settings),
     ui(new Ui::SettingsWidget)
 {
     ui->setupUi(this);
@@ -75,11 +75,18 @@ void SettingsWidget::on_download_restrict_slider_valueChanged(int value)
 
 void SettingsWidget::on_interface_scale_combobox_common_currentIndexChanged(const QString &arg1)
 {
-//    int value = arg1.left(arg1.length() - 1).toInt();
-//    app->window.changeFontSizeRecursive(value, &app->window);
-//    app->window.resize(900 * value / 100, 650 * value / 100);
-//    app->properties.setValue("settings/ui_scale", value);
-//    app->properties.sync();
+    MainWindow* window = qobject_cast<MainWindow*>(qApp->activeWindow());
+
+    if (!window) {
+        ui->interface_scale_combobox_common->setCurrentText(app_settings->value("general/ui_scale", 100).toString() + "%");
+        qDebug() << "CANNOT FIND MAIN WINDOW!!!";
+        return;
+    }
+
+    int value = arg1.left(arg1.length() - 1).toInt();
+    window->changeFontSizeRecursive(value, window);
+    window->resize(900 * value / 100, 650 * value / 100);
+    app_settings->setValue("general/ui_scale", value);
 }
 
 void SettingsWidget::on_change_folder_button_clicked()

+ 3 - 1
src/Legacy/widgets/settingswidget.h

@@ -3,6 +3,7 @@
 
 #include <QWidget>
 #include <QTimer>
+#include <QSettings>
 
 namespace Ui {
 class SettingsWidget;
@@ -13,7 +14,7 @@ class SettingsWidget : public QWidget
     Q_OBJECT
 
 public:
-    explicit SettingsWidget(QWidget *parent = 0);
+    explicit SettingsWidget(QSettings *settings, QWidget *parent = 0);
     ~SettingsWidget();
 
 private slots:
@@ -38,6 +39,7 @@ private slots:
     void on_lotro_patch_language_combobox_common_activated(int index);
 
 private:
+    QSettings* app_settings;
     Ui::SettingsWidget *ui;
     QTimer ui_update_timer;
 };

+ 499 - 339
src/Legacy/widgets/settingswidget.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>860</width>
-    <height>491</height>
+    <width>630</width>
+    <height>540</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -21,7 +21,7 @@
     <number>0</number>
    </property>
    <property name="topMargin">
-    <number>0</number>
+    <number>20</number>
    </property>
    <property name="rightMargin">
     <number>0</number>
@@ -35,8 +35,53 @@
    <property name="verticalSpacing">
     <number>10</number>
    </property>
-   <item row="3" column="1">
-    <widget class="QWidget" name="standart_settings_widget" native="true">
+   <item row="1" column="0" rowspan="4">
+    <spacer name="horizontalSpacer">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Preferred</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>50</width>
+       <height>436</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="4" column="1">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="2" rowspan="4">
+    <spacer name="horizontalSpacer_2">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Preferred</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>50</width>
+       <height>436</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="1">
+    <widget class="QWidget" name="game_folder_widget" native="true">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
        <horstretch>0</horstretch>
@@ -44,80 +89,98 @@
       </sizepolicy>
      </property>
      <property name="styleSheet">
-      <string notr="true">border-radius: 20px;
-background-color: rgba(30, 0, 0, 100);</string>
+      <string notr="true">QWidget#game_folder_widget{
+	border-radius: 20px;
+	background-color: rgba(30, 0, 0, 100);
+}</string>
      </property>
-     <layout class="QVBoxLayout" name="verticalLayout">
-      <property name="spacing">
-       <number>11</number>
+     <layout class="QGridLayout" name="gridLayout_2">
+      <property name="verticalSpacing">
+       <number>3</number>
       </property>
-      <item>
-       <widget class="QLabel" name="main_settings_title">
+      <item row="1" column="2">
+       <widget class="QPushButton" name="change_folder_button">
         <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <property name="styleSheet">
-         <string notr="true">background-color: none;</string>
-        </property>
-        <property name="text">
-         <string>Основные</string>
+        <property name="minimumSize">
+         <size>
+          <width>36</width>
+          <height>32</height>
+         </size>
         </property>
-        <property name="alignment">
-         <set>Qt::AlignCenter</set>
+        <property name="cursor">
+         <cursorShape>PointingHandCursor</cursorShape>
         </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="data_protection_checkbox_common">
         <property name="styleSheet">
-         <string notr="true">
+         <string notr="true">border-image: url(:/buttons/folder.png);
 background-color: none;</string>
         </property>
         <property name="text">
-         <string>Включить защиту данных русификации при обновлении игры</string>
+         <string/>
         </property>
        </widget>
       </item>
-      <item>
-       <widget class="QCheckBox" name="restore_checkbox_common">
-        <property name="styleSheet">
-         <string notr="true">
-background-color: none;</string>
-        </property>
-        <property name="text">
-         <string>Включить авто-восстановление из резервной копии в случае поломки</string>
+      <item row="5" column="0" colspan="3">
+       <widget class="QPushButton" name="patch_all_button_common">
+        <property name="minimumSize">
+         <size>
+          <width>84</width>
+          <height>25</height>
+         </size>
         </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="download_updates_checkbox_common">
         <property name="styleSheet">
-         <string notr="true">
-background-color: none;</string>
+         <string notr="true">QPushButton {
+	color: black;
+    border: 2px solid #8f8f91;
+    border-radius: 6px;
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
+    min-width: 80px;
+}
+ 
+QPushButton:pressed {
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #caccd3, stop: 1 #f6f7fa);
+}
+ 
+QPushButton:flat {
+    border: none; /* no border for a flat push button */
+}
+ 
+QPushButton:default {
+    border-color: navy; /* make the default button prominent */
+}</string>
         </property>
         <property name="text">
-         <string>Включить авто-скачивание обновлений русификации</string>
+         <string>Переустановить русификацию</string>
         </property>
        </widget>
       </item>
-      <item>
-       <widget class="QCheckBox" name="expert_tabs_checkbox_common">
+      <item row="3" column="0" colspan="3">
+       <widget class="QCheckBox" name="restrict_download_speed_checkbox_common_2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
         <property name="styleSheet">
          <string notr="true">
 background-color: none;</string>
         </property>
         <property name="text">
-         <string>Показывать дополнительные опции</string>
+         <string>Показывать всплывающие подсказки при наведении</string>
         </property>
        </widget>
       </item>
-      <item>
-       <widget class="QWidget" name="widget_3" native="true">
+      <item row="2" column="0" colspan="3">
+       <widget class="QWidget" name="widget_5" native="true">
         <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
@@ -125,14 +188,10 @@ background-color: none;</string>
         <property name="minimumSize">
          <size>
           <width>0</width>
-          <height>33</height>
+          <height>30</height>
          </size>
         </property>
-        <property name="styleSheet">
-         <string notr="true">
-background-color: none;</string>
-        </property>
-        <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <layout class="QHBoxLayout" name="horizontalLayout">
          <property name="leftMargin">
           <number>0</number>
          </property>
@@ -146,85 +205,110 @@ background-color: none;</string>
           <number>0</number>
          </property>
          <item>
-          <widget class="QCheckBox" name="restrict_download_speed_checkbox_common">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">
-background-color: none;</string>
-           </property>
+          <widget class="QLabel" name="label_common">
            <property name="text">
-            <string>Ограничивать скорость скачивания</string>
+            <string>Какую версию игры локализовать?</string>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QSlider" name="download_restrict_slider">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="minimumSize">
-            <size>
-             <width>200</width>
-             <height>0</height>
-            </size>
-           </property>
+          <widget class="QComboBox" name="lotro_patch_language_combobox_common">
            <property name="styleSheet">
-            <string notr="true">
-background-color: none;</string>
-           </property>
-           <property name="minimum">
-            <number>64</number>
-           </property>
-           <property name="maximum">
-            <number>4096</number>
-           </property>
-           <property name="singleStep">
-            <number>64</number>
-           </property>
-           <property name="pageStep">
-            <number>64</number>
-           </property>
-           <property name="value">
-            <number>64</number>
-           </property>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
+            <string notr="true">color: black;</string>
            </property>
+           <item>
+            <property name="text">
+             <string>Английскую</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Немецкую</string>
+            </property>
+           </item>
+           <item>
+            <property name="text">
+             <string>Французскую</string>
+            </property>
+           </item>
           </widget>
          </item>
          <item>
-          <widget class="QLabel" name="download_speed_label_common">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">
-background-color: none;</string>
+          <spacer name="horizontalSpacer_4">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
            </property>
-           <property name="text">
-            <string>64 Кб/с</string>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
            </property>
-          </widget>
+          </spacer>
          </item>
         </layout>
        </widget>
       </item>
+      <item row="1" column="1">
+       <widget class="QLabel" name="folder_value_common">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">
+background-color: none;</string>
+        </property>
+        <property name="text">
+         <string>(не выбрана)</string>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="0" colspan="3">
+       <widget class="QLabel" name="management_common_2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="font">
+         <font>
+          <family>Aniron</family>
+          <weight>75</weight>
+          <bold>true</bold>
+         </font>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">
+background-color: none;</string>
+        </property>
+        <property name="text">
+         <string>Управление:</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="folder_label_common">
+        <property name="styleSheet">
+         <string notr="true">
+background-color: none;</string>
+        </property>
+        <property name="text">
+         <string>Папка с данными игры:</string>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
-   <item row="2" column="1">
-    <widget class="QWidget" name="management_widget" native="true">
+   <item row="3" column="1">
+    <widget class="QWidget" name="widget_2" native="true">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
        <horstretch>0</horstretch>
@@ -235,24 +319,25 @@ background-color: none;</string>
       <string notr="true">border-radius: 20px;
 background-color: rgba(30, 0, 0, 100);</string>
      </property>
-     <layout class="QVBoxLayout" name="verticalLayout_3">
+     <layout class="QVBoxLayout" name="verticalLayout_2">
       <property name="spacing">
-       <number>11</number>
+       <number>0</number>
       </property>
       <item>
-       <widget class="QLabel" name="management_title">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
+       <widget class="QLabel" name="label_common_5">
+        <property name="font">
+         <font>
+          <family>Aniron</family>
+          <weight>75</weight>
+          <bold>true</bold>
+         </font>
         </property>
         <property name="styleSheet">
          <string notr="true">
 background-color: none;</string>
         </property>
         <property name="text">
-         <string>Управление</string>
+         <string>Внешний вид:</string>
         </property>
         <property name="alignment">
          <set>Qt::AlignCenter</set>
@@ -260,103 +345,7 @@ background-color: none;</string>
        </widget>
       </item>
       <item>
-       <widget class="QPushButton" name="patch_all_button_common">
-        <property name="styleSheet">
-         <string notr="true">QPushButton {
-	color: black;
-    border: 2px solid #8f8f91;
-    border-radius: 6px;
-    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
-                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
-    min-width: 80px;
-}
- 
-QPushButton:pressed {
-    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
-                                      stop: 0 #caccd3, stop: 1 #f6f7fa);
-}
- 
-QPushButton:flat {
-    border: none; /* no border for a flat push button */
-}
- 
-QPushButton:default {
-    border-color: navy; /* make the default button prominent */
-}</string>
-        </property>
-        <property name="text">
-         <string>Установить все патчи заново</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QPushButton" name="restore_button_common">
-        <property name="autoFillBackground">
-         <bool>false</bool>
-        </property>
-        <property name="styleSheet">
-         <string notr="true">QPushButton {
-	color: black;
-    border: 2px solid #8f8f91;
-    border-radius: 6px;
-    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
-                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
-    min-width: 80px;
-}
- 
-QPushButton:pressed {
-    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
-                                      stop: 0 #caccd3, stop: 1 #f6f7fa);
-}
- 
-QPushButton:flat {
-    border: none; /* no border for a flat push button */
-}
- 
-QPushButton:default {
-    border-color: navy; /* make the default button prominent */
-}</string>
-        </property>
-        <property name="text">
-         <string>Восстановить данные из резервной копии</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="4" column="1">
-    <widget class="QWidget" name="widget_2" native="true">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="styleSheet">
-      <string notr="true">border-radius: 20px;
-background-color: rgba(30, 0, 0, 100);</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_2">
-      <property name="spacing">
-       <number>0</number>
-      </property>
-      <item>
-       <widget class="QLabel" name="interface_label_title">
-        <property name="styleSheet">
-         <string notr="true">
-background-color: none;</string>
-        </property>
-        <property name="text">
-         <string>Внешний вид:</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignCenter</set>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QWidget" name="widget_4" native="true">
+       <widget class="QWidget" name="widget_4" native="true">
         <property name="styleSheet">
          <string notr="true">
 background-color: none;</string>
@@ -463,8 +452,8 @@ background-color: none;</string>
      </layout>
     </widget>
    </item>
-   <item row="1" column="1">
-    <widget class="QWidget" name="game_folder_widget" native="true">
+   <item row="2" column="1">
+    <widget class="QWidget" name="management_widget_2" native="true">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
        <horstretch>0</horstretch>
@@ -472,69 +461,225 @@ background-color: none;</string>
       </sizepolicy>
      </property>
      <property name="styleSheet">
-      <string notr="true">QWidget#game_folder_widget{
-	border-radius: 20px;
-	background-color: rgba(30, 0, 0, 100);
-}</string>
+      <string notr="true">border-radius: 20px;
+background-color: rgba(30, 0, 0, 100);</string>
      </property>
-     <layout class="QGridLayout" name="gridLayout_2">
-      <item row="0" column="0">
-       <widget class="QLabel" name="folder_label_common">
-        <property name="styleSheet">
-         <string notr="true">
-background-color: none;</string>
-        </property>
-        <property name="text">
-         <string>Папка с данными игры:</string>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="2">
-       <widget class="QPushButton" name="change_folder_button">
+     <layout class="QVBoxLayout" name="verticalLayout_4">
+      <property name="spacing">
+       <number>11</number>
+      </property>
+      <item>
+       <widget class="QLabel" name="management_common">
         <property name="sizePolicy">
-         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <property name="minimumSize">
-         <size>
-          <width>36</width>
-          <height>32</height>
-         </size>
-        </property>
-        <property name="cursor">
-         <cursorShape>PointingHandCursor</cursorShape>
+        <property name="font">
+         <font>
+          <family>Aniron</family>
+          <weight>75</weight>
+          <bold>true</bold>
+         </font>
         </property>
         <property name="styleSheet">
-         <string notr="true">border-image: url(:/assets/buttons/folder.png);
-
+         <string notr="true">
 background-color: none;</string>
         </property>
         <property name="text">
-         <string/>
+         <string>Резервная копия:</string>
+        </property>
+        <property name="alignment">
+         <set>Qt::AlignCenter</set>
         </property>
        </widget>
       </item>
-      <item row="0" column="1">
-       <widget class="QLabel" name="folder_value_common">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
+      <item>
+       <widget class="QWidget" name="widget" native="true">
         <property name="styleSheet">
-         <string notr="true">
+         <string notr="true">background:transparent;</string>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_3">
+         <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 row="0" column="0">
+          <widget class="QLabel" name="label_common_2">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">
+background-color: none;</string>
+           </property>
+           <property name="text">
+            <string>Статус копии:</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="QLabel" name="copy_status_common">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">
 background-color: none;</string>
+           </property>
+           <property name="text">
+            <string>Активна</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_6" native="true">
+        <property name="styleSheet">
+         <string notr="true">background:transparent;</string>
         </property>
-        <property name="text">
-         <string>(не выбрана)</string>
+        <layout class="QGridLayout" name="gridLayout_5">
+         <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 row="1" column="0">
+          <widget class="QLabel" name="label_common_3">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">
+background-color: none;</string>
+           </property>
+           <property name="text">
+            <string>Время создания:</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLabel" name="copy_time_creation_common">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">
+background-color: none;</string>
+           </property>
+           <property name="text">
+            <string>Активна</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </item>
+      <item>
+       <widget class="QWidget" name="widget_7" native="true">
+        <property name="styleSheet">
+         <string notr="true">background:transparent;</string>
         </property>
+        <layout class="QGridLayout" name="gridLayout_6">
+         <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 row="1" column="0">
+          <widget class="QLabel" name="label_common_4">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">
+background-color: none;</string>
+           </property>
+           <property name="text">
+            <string>Путь до файла:</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="QLabel" name="copy_path_common">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">
+background-color: none;</string>
+           </property>
+           <property name="text">
+            <string>Активна</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </widget>
       </item>
-      <item row="1" column="0" colspan="3">
-       <widget class="QWidget" name="widget_5" native="true">
+      <item>
+       <widget class="QWidget" name="widget_8" native="true">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
           <horstretch>0</horstretch>
@@ -544,10 +689,13 @@ background-color: none;</string>
         <property name="minimumSize">
          <size>
           <width>0</width>
-          <height>30</height>
+          <height>0</height>
          </size>
         </property>
-        <layout class="QHBoxLayout" name="horizontalLayout">
+        <property name="styleSheet">
+         <string notr="true">background:transparent;</string>
+        </property>
+        <layout class="QHBoxLayout" name="horizontalLayout_4">
          <property name="leftMargin">
           <number>0</number>
          </property>
@@ -561,46 +709,103 @@ background-color: none;</string>
           <number>0</number>
          </property>
          <item>
-          <widget class="QLabel" name="label_common">
+          <widget class="QPushButton" name="restore_button_common_3">
+           <property name="autoFillBackground">
+            <bool>false</bool>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QPushButton {
+	color: black;
+    border: 2px solid #8f8f91;
+    border-radius: 6px;
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
+    min-width: 80px;
+}
+ 
+QPushButton:pressed {
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #caccd3, stop: 1 #f6f7fa);
+}
+ 
+QPushButton:flat {
+    border: none; /* no border for a flat push button */
+}
+ 
+QPushButton:default {
+    border-color: navy; /* make the default button prominent */
+}</string>
+           </property>
            <property name="text">
-            <string>Какую версию игры локализовать?</string>
+            <string>Создать копию</string>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QComboBox" name="lotro_patch_language_combobox_common">
+          <widget class="QPushButton" name="restore_button_common_2">
+           <property name="autoFillBackground">
+            <bool>false</bool>
+           </property>
            <property name="styleSheet">
-            <string notr="true">color: black;</string>
+            <string notr="true">QPushButton {
+	color: black;
+    border: 2px solid #8f8f91;
+    border-radius: 6px;
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
+    min-width: 80px;
+}
+ 
+QPushButton:pressed {
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #caccd3, stop: 1 #f6f7fa);
+}
+ 
+QPushButton:flat {
+    border: none; /* no border for a flat push button */
+}
+ 
+QPushButton:default {
+    border-color: navy; /* make the default button prominent */
+}</string>
+           </property>
+           <property name="text">
+            <string> Восстановить данные из копии </string>
            </property>
-           <item>
-            <property name="text">
-             <string>Английскую</string>
-            </property>
-           </item>
-           <item>
-            <property name="text">
-             <string>Немецкую</string>
-            </property>
-           </item>
-           <item>
-            <property name="text">
-             <string>Французскую</string>
-            </property>
-           </item>
           </widget>
          </item>
          <item>
-          <spacer name="horizontalSpacer_4">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
+          <widget class="QPushButton" name="restore_button_common_4">
+           <property name="autoFillBackground">
+            <bool>false</bool>
            </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
+           <property name="styleSheet">
+            <string notr="true">QPushButton {
+	color: black;
+    border: 2px solid #8f8f91;
+    border-radius: 6px;
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #f6f7fa, stop: 1 #dadbde);
+    min-width: 80px;
+}
+ 
+QPushButton:pressed {
+    background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
+                                      stop: 0 #caccd3, stop: 1 #f6f7fa);
+}
+ 
+QPushButton:flat {
+    border: none; /* no border for a flat push button */
+}
+ 
+QPushButton:default {
+    border-color: navy; /* make the default button prominent */
+}</string>
            </property>
-          </spacer>
+           <property name="text">
+            <string>Удалить копию</string>
+           </property>
+          </widget>
          </item>
         </layout>
        </widget>
@@ -608,51 +813,6 @@ background-color: none;</string>
      </layout>
     </widget>
    </item>
-   <item row="5" column="1">
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="1" column="0" rowspan="5">
-    <spacer name="horizontalSpacer">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Preferred</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>100</width>
-       <height>436</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="1" column="2" rowspan="5">
-    <spacer name="horizontalSpacer_2">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Preferred</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>100</width>
-       <height>436</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
   </layout>
  </widget>
  <resources/>

+ 10 - 5
src/Legacy/widgets/statuswidget.cpp

@@ -22,6 +22,7 @@ StatusWidget::StatusWidget(PatchDownloader* patch_downloader, QWidget *parent) :
     connect(patch_updater, &PatchDownloader::downloadStarted, this, &StatusWidget::onPatchDownloaderStarted, Qt::QueuedConnection);
     connect(patch_updater, &PatchDownloader::progressChanged, this, &StatusWidget::onPatchDownloaderProgressChanged, Qt::QueuedConnection);
     connect(patch_updater, &PatchDownloader::downloadCompleted, this, &StatusWidget::onPatchDownloaderFinished, Qt::QueuedConnection);
+    ui->bottom_widget->hide();
 }
 
 StatusWidget::~StatusWidget()
@@ -31,6 +32,8 @@ StatusWidget::~StatusWidget()
 
 void StatusWidget::onPatchDownloaderStarted()
 {
+    qDebug() << "Status widget received DownloadStarted signal!";
+    ui->bottom_widget->show();
     ui->process_label->setText("Загрузка обновлений патчей...");
     ui->progressBar->setValue(0);
 }
@@ -39,16 +42,18 @@ void StatusWidget::onPatchDownloaderFinished()
 {
     ui->process_label->setText("Загрузка обновлений патчей завершена...");
     ui->progressBar->setValue(100);
+    ui->bottom_widget->hide();
 }
 
 void StatusWidget::onPatchDownloaderProgressChanged(quint64 bytesDownloaded, quint64 bytesTotal, QString download_speed_formatted, QString elapsed_time_formatted)
 {
+    ui->bottom_widget->show();
     ui->process_label->setText("Загрузка " + download_speed_formatted + ". Загружено "
-                               + QString::number(bytesDownloaded) + " из " + QString::number(bytesTotal)
-                               + " (" + QString::number(bytesDownloaded * 100 / bytesTotal) + "%) "
-                               + "\nОставшееся время: " + elapsed_time_formatted);
+                               + Downloader::getSizeFormatted(bytesDownloaded) + " из " + Downloader::getSizeFormatted(bytesTotal)
+                               + " (" + QString::number(bytesDownloaded * 100 / bytesTotal) + "%) ");
+                               //+ "\nОставшееся время: " + elapsed_time_formatted);
 
-    ui->progressBar->setValue(bytesDownloaded * 100 / bytesTotal);
+    ui->progressBar->setValue(bytesDownloaded * 100 / bytesTotal + 5);
 }
 
 void StatusWidget::changeCentralWidget()
@@ -95,5 +100,5 @@ void StatusWidget::on_bugreport_link_button_clicked()
 
 void StatusWidget::on_donate_link_button_clicked()
 {
-    QDesktopServices::openUrl(QUrl(" http://translate.lotros.ru/donate"));
+    QDesktopServices::openUrl(QUrl("http://translate.lotros.ru/donate"));
 }

+ 228 - 251
src/Legacy/widgets/statuswidget.ui

@@ -56,22 +56,6 @@ color: white;
      </property>
     </spacer>
    </item>
-   <item row="0" column="3">
-    <spacer name="verticalSpacer_3">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType">
-      <enum>QSizePolicy::Fixed</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>30</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
    <item row="1" column="0">
     <widget class="WeeklyCodeWidget" name="weekly_code">
      <property name="minimumSize">
@@ -101,14 +85,49 @@ color: white;
       <string notr="true">color: rgb(255, 180, 0);</string>
      </property>
      <property name="text">
-      <string/>
+      <string>Загрузка...</string>
      </property>
      <property name="alignment">
       <set>Qt::AlignCenter</set>
      </property>
     </widget>
    </item>
-   <item row="1" column="3" rowspan="2">
+   <item row="0" column="3">
+    <spacer name="verticalSpacer_3">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::Fixed</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>30</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="0" rowspan="2">
+    <widget class="StatusFlagWidget" name="server_status_flag" native="true">
+     <property name="minimumSize">
+      <size>
+       <width>124</width>
+       <height>276</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>124</width>
+       <height>276</height>
+      </size>
+     </property>
+     <property name="cursor">
+      <cursorShape>PointingHandCursor</cursorShape>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="3" rowspan="3">
     <widget class="QWidget" name="button_list" native="true">
      <property name="sizePolicy">
       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
@@ -496,11 +515,77 @@ color: white;
         </property>
        </spacer>
       </item>
+      <item>
+       <widget class="QPushButton" name="game_button">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>150</width>
+          <height>60</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>150</width>
+          <height>60</height>
+         </size>
+        </property>
+        <property name="autoFillBackground">
+         <bool>false</bool>
+        </property>
+        <property name="styleSheet">
+         <string notr="true">QPushButton#game_button { 
+	color: white;
+	font: 14px &quot;TRAJAN PRO 3&quot;;
+	font-weight: bold;
+	border-image: url(:/buttons/button_big_normal.png);
+}
+
+QPushButton#game_button:hover {
+	color: white;
+	border-image: url(:/buttons/button_big_over.png);
+}
+
+QPushButton#game_button:pressed {
+	color: white;
+	border-image: url(:/buttons/button_big_pressed.png);
+}
+
+</string>
+        </property>
+        <property name="text">
+         <string notr="true">    ИГРАТЬ    </string>
+        </property>
+        <property name="iconSize">
+         <size>
+          <width>0</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="default">
+         <bool>false</bool>
+        </property>
+        <property name="flat">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
      </layout>
     </widget>
    </item>
-   <item row="0" column="1" rowspan="3" colspan="2">
+   <item row="0" column="1" rowspan="4" colspan="2">
     <widget class="QWidget" name="central_widget" native="true">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
      <layout class="QVBoxLayout" name="verticalLayout">
       <property name="leftMargin">
        <number>0</number>
@@ -512,7 +597,7 @@ color: white;
        <number>0</number>
       </property>
       <property name="bottomMargin">
-       <number>0</number>
+       <number>11</number>
       </property>
       <item>
        <widget class="QWidget" name="announcements_widget" native="true">
@@ -630,7 +715,7 @@ QScrollBar:vertical {
               <x>0</x>
               <y>0</y>
               <width>590</width>
-              <height>460</height>
+              <height>462</height>
              </rect>
             </property>
             <property name="sizePolicy">
@@ -660,34 +745,18 @@ QScrollBar:vertical {
          </size>
         </property>
         <layout class="QVBoxLayout" name="verticalLayout_4">
-         <item>
-          <widget class="QLabel" name="status_title_common">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="font">
-            <font>
-             <family>Aniron</family>
-             <pointsize>10</pointsize>
-             <weight>75</weight>
-             <bold>true</bold>
-             <kerning>true</kerning>
-            </font>
-           </property>
-           <property name="styleSheet">
-            <string notr="true">color:white;</string>
-           </property>
-           <property name="text">
-            <string>Игровые новости и события</string>
-           </property>
-           <property name="alignment">
-            <set>Qt::AlignCenter</set>
-           </property>
-          </widget>
-         </item>
+         <property name="leftMargin">
+          <number>11</number>
+         </property>
+         <property name="topMargin">
+          <number>11</number>
+         </property>
+         <property name="rightMargin">
+          <number>11</number>
+         </property>
+         <property name="bottomMargin">
+          <number>11</number>
+         </property>
          <item>
           <widget class="QScrollArea" name="status_scroll_list">
            <property name="sizePolicy">
@@ -752,13 +821,13 @@ QScrollBar:vertical {
            <property name="alignment">
             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
            </property>
-           <widget class="QWidget" name="announcements_list_2">
+           <widget class="QWidget" name="status_scroll_contents">
             <property name="geometry">
              <rect>
               <x>0</x>
               <y>0</y>
               <width>590</width>
-              <height>460</height>
+              <height>503</height>
              </rect>
             </property>
             <property name="sizePolicy">
@@ -781,65 +850,44 @@ QScrollBar:vertical {
               <number>0</number>
              </property>
              <item>
-              <widget class="QWidget" name="current_event_widget" native="true">
-               <layout class="QVBoxLayout" name="verticalLayout_6">
-                <item>
-                 <widget class="QLabel" name="label">
-                  <property name="sizePolicy">
-                   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-                    <horstretch>0</horstretch>
-                    <verstretch>0</verstretch>
-                   </sizepolicy>
-                  </property>
-                  <property name="font">
-                   <font>
-                    <family>Aniron</family>
-                    <weight>75</weight>
-                    <bold>true</bold>
-                   </font>
-                  </property>
-                  <property name="text">
-                   <string>Рекомендуемый инстанс</string>
-                  </property>
-                  <property name="alignment">
-                   <set>Qt::AlignCenter</set>
-                  </property>
-                 </widget>
-                </item>
-                <item>
-                 <widget class="QLabel" name="label_3">
-                  <property name="sizePolicy">
-                   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-                    <horstretch>0</horstretch>
-                    <verstretch>0</verstretch>
-                   </sizepolicy>
-                  </property>
-                  <property name="text">
-                   <string>TextLabel</string>
-                  </property>
-                  <property name="alignment">
-                   <set>Qt::AlignCenter</set>
-                  </property>
-                 </widget>
-                </item>
-                <item>
-                 <widget class="QLabel" name="label_4">
-                  <property name="text">
-                   <string>TextLabel</string>
-                  </property>
-                 </widget>
-                </item>
-               </layout>
+              <widget class="QLabel" name="status_title_common">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="font">
+                <font>
+                 <family>Aniron</family>
+                 <pointsize>10</pointsize>
+                 <weight>75</weight>
+                 <bold>true</bold>
+                 <kerning>true</kerning>
+                </font>
+               </property>
+               <property name="styleSheet">
+                <string notr="true">color:white;</string>
+               </property>
+               <property name="text">
+                <string>Ближайшее событие</string>
+               </property>
+               <property name="alignment">
+                <set>Qt::AlignCenter</set>
+               </property>
               </widget>
              </item>
              <item>
-              <widget class="QWidget" name="recommended_instance_widget" native="true"/>
+              <widget class="EventsListWidget" name="events_widget" native="true"/>
              </item>
              <item>
               <widget class="QWidget" name="recommended_instance_widget_2" native="true">
                <layout class="QGridLayout" name="gridLayout">
+                <item row="1" column="0" colspan="2">
+                 <widget class="ServerStatusWidget" name="server_status_widget" native="true"/>
+                </item>
                 <item row="0" column="0" colspan="2">
-                 <widget class="QLabel" name="label_5">
+                 <widget class="QLabel" name="status_title_common_2">
                   <property name="sizePolicy">
                    <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
                     <horstretch>0</horstretch>
@@ -849,10 +897,15 @@ QScrollBar:vertical {
                   <property name="font">
                    <font>
                     <family>Aniron</family>
+                    <pointsize>10</pointsize>
                     <weight>75</weight>
                     <bold>true</bold>
+                    <kerning>true</kerning>
                    </font>
                   </property>
+                  <property name="styleSheet">
+                   <string notr="true">color:white;</string>
+                  </property>
                   <property name="text">
                    <string>Статус серверов</string>
                   </property>
@@ -861,9 +914,6 @@ QScrollBar:vertical {
                   </property>
                  </widget>
                 </item>
-                <item row="1" column="0" colspan="2">
-                 <widget class="ServerStatusWidget" name="server_status_widget" native="true"/>
-                </item>
                </layout>
               </widget>
              </item>
@@ -874,43 +924,43 @@ QScrollBar:vertical {
         </layout>
        </widget>
       </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="3" column="1" colspan="3">
-    <widget class="QWidget" name="bottom_widget" native="true">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <layout class="QGridLayout" name="gridLayout_3">
-      <property name="topMargin">
-       <number>0</number>
-      </property>
-      <property name="bottomMargin">
-       <number>0</number>
-      </property>
-      <property name="verticalSpacing">
-       <number>0</number>
-      </property>
-      <item row="1" column="0">
-       <widget class="QProgressBar" name="progressBar">
-        <property name="minimumSize">
-         <size>
-          <width>0</width>
-          <height>25</height>
-         </size>
+      <item>
+       <widget class="QWidget" name="bottom_widget" native="true">
+        <property name="enabled">
+         <bool>false</bool>
         </property>
-        <property name="maximumSize">
-         <size>
-          <width>16777215</width>
-          <height>39</height>
-         </size>
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
         </property>
-        <property name="styleSheet">
-         <string notr="true">QProgressBar {
+        <layout class="QGridLayout" name="gridLayout_3">
+         <property name="topMargin">
+          <number>0</number>
+         </property>
+         <property name="bottomMargin">
+          <number>0</number>
+         </property>
+         <property name="verticalSpacing">
+          <number>0</number>
+         </property>
+         <item row="1" column="0">
+          <widget class="QProgressBar" name="progressBar">
+           <property name="minimumSize">
+            <size>
+             <width>0</width>
+             <height>40</height>
+            </size>
+           </property>
+           <property name="maximumSize">
+            <size>
+             <width>16777215</width>
+             <height>39</height>
+            </size>
+           </property>
+           <property name="styleSheet">
+            <string notr="true">QProgressBar {
     border: 0px solid grey;
 	border-image: url(:/per.png);
 }
@@ -923,122 +973,43 @@ margin-top:7px;
 margin-bottom:7px;
 }
 </string>
-        </property>
-        <property name="maximum">
-         <number>100</number>
-        </property>
-        <property name="value">
-         <number>50</number>
-        </property>
-        <property name="textVisible">
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1">
-       <widget class="QPushButton" name="game_button">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize">
-         <size>
-          <width>120</width>
-          <height>45</height>
-         </size>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>120</width>
-          <height>45</height>
-         </size>
-        </property>
-        <property name="font">
-         <font>
-          <family>TRAJAN PRO 3</family>
-          <pointsize>-1</pointsize>
-          <weight>75</weight>
-          <italic>false</italic>
-          <bold>true</bold>
-         </font>
-        </property>
-        <property name="autoFillBackground">
-         <bool>false</bool>
-        </property>
-        <property name="styleSheet">
-         <string notr="true">QPushButton#game_button { 
-	color: white;
-	font: 14px &quot;TRAJAN PRO 3&quot;;
-	font-weight: bold;
-	border-image: url(:/buttons/large-button-active.png) 0 0 0 0 stretch stretch; 
-}
-
-QPushButton#game_button:hover {
-	color: white;
-	border-image: url(:/buttons/large-button-active-pressed.png) 0 0 0 0 stretch stretch; 
-}
-
-QPushButton#game_button:pressed {
-	color: white;
-	border-image: url(:/buttons/large-button-pressed.png) 0 0 0 0 stretch stretch; 
-}
-
-</string>
-        </property>
-        <property name="text">
-         <string notr="true">    ИГРАТЬ    </string>
-        </property>
-        <property name="iconSize">
-         <size>
-          <width>0</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="default">
-         <bool>false</bool>
-        </property>
-        <property name="flat">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="0" column="0">
-       <widget class="QLabel" name="process_label">
-        <property name="text">
-         <string>Установка чего-то - 50%</string>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignCenter</set>
-        </property>
-        <property name="wordWrap">
-         <bool>true</bool>
-        </property>
+           </property>
+           <property name="maximum">
+            <number>100</number>
+           </property>
+           <property name="value">
+            <number>50</number>
+           </property>
+           <property name="textVisible">
+            <bool>false</bool>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="0">
+          <widget class="QLabel" name="process_label">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="text">
+            <string>Установка чего-то - 50%</string>
+           </property>
+           <property name="alignment">
+            <set>Qt::AlignCenter</set>
+           </property>
+           <property name="wordWrap">
+            <bool>true</bool>
+           </property>
+          </widget>
+         </item>
+        </layout>
        </widget>
       </item>
      </layout>
     </widget>
    </item>
-   <item row="2" column="0" rowspan="2">
-    <widget class="StatusFlagWidget" name="server_status_flag" native="true">
-     <property name="minimumSize">
-      <size>
-       <width>124</width>
-       <height>276</height>
-      </size>
-     </property>
-     <property name="maximumSize">
-      <size>
-       <width>124</width>
-       <height>276</height>
-      </size>
-     </property>
-     <property name="cursor">
-      <cursorShape>PointingHandCursor</cursorShape>
-     </property>
-    </widget>
-   </item>
   </layout>
  </widget>
  <customwidgets>
@@ -1065,6 +1036,12 @@ QPushButton#game_button:pressed {
    <header>widgets/serverstatuswidget.h</header>
    <container>1</container>
   </customwidget>
+  <customwidget>
+   <class>EventsListWidget</class>
+   <extends>QWidget</extends>
+   <header>widgets/eventslistwidget.h</header>
+   <container>1</container>
+  </customwidget>
  </customwidgets>
  <resources/>
  <connections/>

+ 3 - 0
src/Legacy/widgets/weeklycodewidget.cpp

@@ -91,6 +91,9 @@ void WeeklyCodeWidget::mouseReleaseEvent(QMouseEvent *ev)
 void WeeklyCodeWidget::updateCode()
 {
     qDebug() << "New code: " << code_data;
+    if (code_data.isEmpty())
+        return;
+
     setText(code_data);
     repaint();
     code_data = "";