Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of dashes in the style directory path #53

Merged
merged 1 commit into from
Dec 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Telegram/SourceFiles/codegen/style/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1186,9 +1186,11 @@ QByteArray iconMaskValueSize(int width, int height) {
QByteArray iconMaskValuePng(QString filepath) {
QByteArray result;

auto pathAndModifiers = filepath.split('-');
filepath = pathAndModifiers[0];
auto modifiers = pathAndModifiers.mid(1);
QFileInfo fileInfo(filepath);
auto directory = fileInfo.dir();
auto nameAndModifiers = fileInfo.fileName().split('-');
filepath = directory.filePath(nameAndModifiers[0]);
auto modifiers = nameAndModifiers.mid(1);

QImage png100x(filepath + ".png");
QImage png200x(filepath + "@2x.png");
Expand Down