mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-02 10:18:30 +00:00
Old sprites removed completely. Only #rrggbb and #rrggbbaa in styles.
Also moved Checkbox and Radiobutton to Ui namespace. Also child widgets in many boxes were wrapped in ChildWidget<>.
This commit is contained in:
@@ -25,7 +25,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||
#include "codegen/common/cpp_file.h"
|
||||
#include "codegen/style/parsed_file.h"
|
||||
#include "codegen/style/generator.h"
|
||||
#include "codegen/style/sprite_generator.h"
|
||||
|
||||
namespace codegen {
|
||||
namespace style {
|
||||
@@ -66,38 +65,28 @@ int Processor::launch() {
|
||||
|
||||
bool Processor::write(const structure::Module &module) const {
|
||||
bool forceReGenerate = false;
|
||||
bool onlyStyles = options_.skipSprites;
|
||||
bool onlySprites = options_.skipStyles;
|
||||
if (!onlyStyles) {
|
||||
SpriteGenerator spriteGenerator(module, forceReGenerate);
|
||||
if (!spriteGenerator.writeSprites()) {
|
||||
return false;
|
||||
}
|
||||
QDir dir(options_.outputPath);
|
||||
if (!dir.mkpath(".")) {
|
||||
common::logError(kErrorCantWritePath, "Command Line") << "can not open path for writing: " << dir.absolutePath().toStdString();
|
||||
return false;
|
||||
}
|
||||
if (!onlySprites) {
|
||||
QDir dir(options_.outputPath);
|
||||
if (!dir.mkpath(".")) {
|
||||
common::logError(kErrorCantWritePath, "Command Line") << "can not open path for writing: " << dir.absolutePath().toStdString();
|
||||
return false;
|
||||
}
|
||||
|
||||
QFileInfo srcFile(module.filepath());
|
||||
QString dstFilePath = dir.absolutePath() + '/' + destFileBaseName(module);
|
||||
QFileInfo srcFile(module.filepath());
|
||||
QString dstFilePath = dir.absolutePath() + '/' + destFileBaseName(module);
|
||||
|
||||
common::ProjectInfo project = {
|
||||
"codegen_style",
|
||||
srcFile.fileName(),
|
||||
"stdafx.h",
|
||||
forceReGenerate
|
||||
};
|
||||
common::ProjectInfo project = {
|
||||
"codegen_style",
|
||||
srcFile.fileName(),
|
||||
"stdafx.h",
|
||||
forceReGenerate
|
||||
};
|
||||
|
||||
Generator generator(module, dstFilePath, project);
|
||||
if (!generator.writeHeader()) {
|
||||
return false;
|
||||
}
|
||||
if (!generator.writeSource()) {
|
||||
return false;
|
||||
}
|
||||
Generator generator(module, dstFilePath, project);
|
||||
if (!generator.writeHeader()) {
|
||||
return false;
|
||||
}
|
||||
if (!generator.writeSource()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user