mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-11 09:19:35 +00:00
Stable version 0.10.1: various bugfixes.
Minimal height of the message text fixed to prevent bubble collapsing. FileDialog filter is (*) instead of (*.*) for Linux and macOS. Explicitly setting text color in Settings user name painting.
This commit is contained in:
parent
7cd3bc0c26
commit
140522c196
@ -1049,6 +1049,7 @@ msgServiceNameFont: semiboldFont;
|
||||
msgServicePhotoWidth: 100px;
|
||||
msgDateFont: font(13px);
|
||||
msgMinWidth: 190px;
|
||||
msgMinTextHeight: 18px;
|
||||
msgPhotoSize: 33px;
|
||||
msgPhotoSkip: 40px;
|
||||
msgPadding: margins(13px, 7px, 13px, 8px);
|
||||
|
@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,10,0,0
|
||||
PRODUCTVERSION 0,10,0,0
|
||||
FILEVERSION 0,10,1,0
|
||||
PRODUCTVERSION 0,10,1,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -51,10 +51,10 @@ BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||
VALUE "FileVersion", "0.10.0.0"
|
||||
VALUE "FileVersion", "0.10.1.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "0.10.0.0"
|
||||
VALUE "ProductVersion", "0.10.1.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,10,0,0
|
||||
PRODUCTVERSION 0,10,0,0
|
||||
FILEVERSION 0,10,1,0
|
||||
PRODUCTVERSION 0,10,1,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -43,10 +43,10 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||
VALUE "FileDescription", "Telegram Updater"
|
||||
VALUE "FileVersion", "0.10.0.0"
|
||||
VALUE "FileVersion", "0.10.1.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
||||
VALUE "ProductName", "Telegram Desktop"
|
||||
VALUE "ProductVersion", "0.10.0.0"
|
||||
VALUE "ProductVersion", "0.10.1.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -568,7 +568,7 @@ void GroupInfoBox::updateMaxHeight() {
|
||||
|
||||
void GroupInfoBox::onPhoto() {
|
||||
QStringList imgExtensions(cImgExtensions());
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;All files (*.*)"));
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;") + filedialogAllFilesFilter());
|
||||
|
||||
QImage img;
|
||||
QString file;
|
||||
|
@ -24,7 +24,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||
|
||||
#define BETA_VERSION_MACRO (0ULL)
|
||||
|
||||
constexpr int AppVersion = 10000;
|
||||
constexpr str_const AppVersionStr = "0.10";
|
||||
constexpr int AppVersion = 10001;
|
||||
constexpr str_const AppVersionStr = "0.10.1";
|
||||
constexpr bool AppAlphaVersion = false;
|
||||
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
|
||||
|
@ -6940,7 +6940,7 @@ void HistoryMessage::initDimensions() {
|
||||
if (_text.isEmpty()) {
|
||||
_minh = 0;
|
||||
} else {
|
||||
_minh = st::msgPadding.top() + _text.minHeight() + st::msgPadding.bottom();
|
||||
_minh = st::msgPadding.top() + qMax(_text.minHeight(), st::msgMinTextHeight) + st::msgPadding.bottom();
|
||||
}
|
||||
if (_media && _media->isDisplayed()) {
|
||||
int32 maxw = _media->maxWidth();
|
||||
@ -7600,7 +7600,7 @@ int HistoryMessage::performResizeGetHeight(int width) {
|
||||
if (textWidth != _textWidth) {
|
||||
textstyleSet(&((out() && !isPost()) ? st::outTextStyle : st::inTextStyle));
|
||||
_textWidth = textWidth;
|
||||
_textHeight = _text.countHeight(textWidth);
|
||||
_textHeight = qMax(_text.countHeight(textWidth), st::msgMinTextHeight);
|
||||
textstyleRestore();
|
||||
}
|
||||
_height = st::msgPadding.top() + _textHeight + st::msgPadding.bottom();
|
||||
|
@ -1334,7 +1334,8 @@ void HistoryInner::saveContextImage() {
|
||||
if (!photo || !photo->date || !photo->loaded()) return;
|
||||
|
||||
QString file;
|
||||
if (filedialogGetSaveFile(file, lang(lng_save_photo), qsl("JPEG Image (*.jpg);;All files (*.*)"), filedialogDefaultName(qsl("photo"), qsl(".jpg")))) {
|
||||
auto filter = qsl("JPEG Image (*.jpg);;") + filedialogAllFilesFilter();
|
||||
if (filedialogGetSaveFile(file, lang(lng_save_photo), filter, filedialogDefaultName(qsl("photo"), qsl(".jpg")))) {
|
||||
if (!file.isEmpty()) {
|
||||
photo->full->pix().toImage().save(file, "JPG");
|
||||
}
|
||||
@ -5574,7 +5575,7 @@ void HistoryWidget::onPhotoSelect() {
|
||||
|
||||
QStringList photoExtensions(cPhotoExtensions());
|
||||
QStringList imgExtensions(cImgExtensions());
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;Photo files (*") + photoExtensions.join(qsl(" *")) + qsl(");;All files (*.*)"));
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;Photo files (*") + photoExtensions.join(qsl(" *")) + qsl(");;") + filedialogAllFilesFilter());
|
||||
|
||||
QStringList files;
|
||||
QByteArray content;
|
||||
@ -5602,7 +5603,7 @@ void HistoryWidget::onDocumentSelect() {
|
||||
|
||||
QStringList photoExtensions(cPhotoExtensions());
|
||||
QStringList imgExtensions(cImgExtensions());
|
||||
QString filter(qsl("All files (*.*);;Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;Photo files (*") + photoExtensions.join(qsl(" *")) + qsl(")"));
|
||||
QString filter(filedialogAllFilesFilter() + qsl(";;Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;Photo files (*") + photoExtensions.join(qsl(" *")) + qsl(")"));
|
||||
|
||||
QStringList files;
|
||||
QByteArray content;
|
||||
|
@ -66,7 +66,7 @@ void IntroSignup::mousePressEvent(QMouseEvent *e) {
|
||||
mouseMoveEvent(e);
|
||||
if (QRect(_phLeft, _phTop, st::introPhotoSize, st::introPhotoSize).contains(e->pos())) {
|
||||
QStringList imgExtensions(cImgExtensions());
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;All files (*.*)"));
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;") + filedialogAllFilesFilter());
|
||||
|
||||
QImage img;
|
||||
QString file;
|
||||
|
@ -667,7 +667,7 @@ void MediaView::onSaveAs() {
|
||||
if (pattern.isEmpty()) {
|
||||
filter = QString();
|
||||
} else {
|
||||
filter = mimeType.filterString() + qsl(";;All files (*.*)");
|
||||
filter = mimeType.filterString() + qsl(";;") + filedialogAllFilesFilter();
|
||||
}
|
||||
|
||||
psBringToBack(this);
|
||||
@ -698,7 +698,8 @@ void MediaView::onSaveAs() {
|
||||
if (!_photo || !_photo->loaded()) return;
|
||||
|
||||
psBringToBack(this);
|
||||
bool gotName = filedialogGetSaveFile(file, lang(lng_save_photo), qsl("JPEG Image (*.jpg);;All files (*.*)"), filedialogDefaultName(qsl("photo"), qsl(".jpg")));
|
||||
auto filter = qsl("JPEG Image (*.jpg);;") + filedialogAllFilesFilter();
|
||||
bool gotName = filedialogGetSaveFile(file, lang(lng_save_photo), filter, filedialogDefaultName(qsl("photo"), qsl(".jpg")));
|
||||
psShowOverAll(this);
|
||||
if (gotName) {
|
||||
if (!file.isEmpty()) {
|
||||
|
@ -476,7 +476,7 @@ void CoverWidget::onShareContact() {
|
||||
|
||||
void CoverWidget::onSetPhoto() {
|
||||
QStringList imgExtensions(cImgExtensions());
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;All files (*.*)"));
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;") + filedialogAllFilesFilter());
|
||||
|
||||
_setPhotoFileQueryId = FileDialog::queryReadFile(lang(lng_choose_images), filter);
|
||||
}
|
||||
|
@ -399,6 +399,7 @@ void SettingsInner::paintEvent(QPaintEvent *e) {
|
||||
// profile
|
||||
top += st::setTop;
|
||||
|
||||
p.setPen(st::windowTextFg);
|
||||
_nameText.drawElided(p, _uploadPhoto.x() + st::setNameLeft, top + st::setNameTop, _uploadPhoto.width() - st::setNameLeft);
|
||||
if (!_cancelPhoto.isHidden()) {
|
||||
p.setFont(st::linkFont->f);
|
||||
@ -1230,7 +1231,7 @@ void SettingsInner::onUpdatePhoto() {
|
||||
saveError();
|
||||
|
||||
QStringList imgExtensions(cImgExtensions());
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;All files (*.*)"));
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;") + filedialogAllFilesFilter());
|
||||
|
||||
QImage img;
|
||||
QString file;
|
||||
@ -1641,7 +1642,7 @@ void SettingsInner::onBackFromGallery() {
|
||||
|
||||
void SettingsInner::onBackFromFile() {
|
||||
QStringList imgExtensions(cImgExtensions());
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;All files (*.*)"));
|
||||
QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;") + filedialogAllFilesFilter());
|
||||
|
||||
QImage img;
|
||||
QString file;
|
||||
|
@ -911,12 +911,13 @@ QString documentSaveFilename(const DocumentData *data, bool forceSavingAs = fals
|
||||
if (data->voice()) {
|
||||
bool mp3 = (data->mime == qstr("audio/mp3"));
|
||||
name = already.isEmpty() ? (mp3 ? qsl(".mp3") : qsl(".ogg")) : already;
|
||||
filter = mp3 ? qsl("MP3 Audio (*.mp3);;All files (*.*)") : qsl("OGG Opus Audio (*.ogg);;All files (*.*)");
|
||||
filter = mp3 ? qsl("MP3 Audio (*.mp3);;") : qsl("OGG Opus Audio (*.ogg);;");
|
||||
filter += filedialogAllFilesFilter();
|
||||
caption = lang(lng_save_audio);
|
||||
prefix = qsl("audio");
|
||||
} else if (data->isVideo()) {
|
||||
name = already.isEmpty() ? qsl(".mov") : already;
|
||||
filter = qsl("MOV Video (*.mov);;All files (*.*)");
|
||||
filter = qsl("MOV Video (*.mov);;") + filedialogAllFilesFilter();
|
||||
caption = lang(lng_save_video);
|
||||
prefix = qsl("video");
|
||||
} else {
|
||||
@ -927,7 +928,7 @@ QString documentSaveFilename(const DocumentData *data, bool forceSavingAs = fals
|
||||
if (pattern.isEmpty()) {
|
||||
filter = QString();
|
||||
} else {
|
||||
filter = mimeType.filterString() + qsl(";;All files (*.*)");
|
||||
filter = mimeType.filterString() + qsl(";;") + filedialogAllFilesFilter();
|
||||
}
|
||||
caption = lang(data->song() ? lng_save_audio_file : lng_save_file);
|
||||
prefix = qsl("doc");
|
||||
|
@ -244,6 +244,14 @@ QString filedialogNextFilename(const QString &name, const QString &cur, const QS
|
||||
return result;
|
||||
}
|
||||
|
||||
QString filedialogAllFilesFilter() {
|
||||
#ifdef Q_OS_WIN
|
||||
return qsl("All files (*.*)");
|
||||
#else // Q_OS_WIN
|
||||
return qsl("All files (*)");
|
||||
#endif // Q_OS_WIN
|
||||
}
|
||||
|
||||
namespace FileDialog {
|
||||
namespace {
|
||||
|
||||
|
@ -31,6 +31,8 @@ bool filedialogGetDir(QString &dir, const QString &caption);
|
||||
QString filedialogDefaultName(const QString &prefix, const QString &extension, const QString &path = QString(), bool skipExistance = false);
|
||||
QString filedialogNextFilename(const QString &name, const QString &cur, const QString &path = QString());
|
||||
|
||||
QString filedialogAllFilesFilter();
|
||||
|
||||
namespace FileDialog {
|
||||
namespace internal {
|
||||
|
||||
|
@ -2559,7 +2559,7 @@
|
||||
SDKROOT = macosx;
|
||||
SYMROOT = ./../Mac;
|
||||
TDESKTOP_MAJOR_VERSION = 0.10;
|
||||
TDESKTOP_VERSION = 0.10;
|
||||
TDESKTOP_VERSION = 0.10.1;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@ -2700,7 +2700,7 @@
|
||||
SDKROOT = macosx;
|
||||
SYMROOT = ./../Mac;
|
||||
TDESKTOP_MAJOR_VERSION = 0.10;
|
||||
TDESKTOP_VERSION = 0.10;
|
||||
TDESKTOP_VERSION = 0.10.1;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
AppVersion 10000
|
||||
AppVersion 10001
|
||||
AppVersionStrMajor 0.10
|
||||
AppVersionStrSmall 0.10
|
||||
AppVersionStr 0.10.0
|
||||
AppVersionStrSmall 0.10.1
|
||||
AppVersionStr 0.10.1
|
||||
AlphaChannel 0
|
||||
BetaVersion 0
|
||||
|
Loading…
Reference in New Issue
Block a user