mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Alpha 1.0.34: Fix tabbed section widget render.
Also fix error message layout in EditCaptionBox.
This commit is contained in:
parent
8f719f8c06
commit
33ffa0715d
9 changed files with 44 additions and 18 deletions
|
@ -9,7 +9,7 @@
|
||||||
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
||||||
ProcessorArchitecture="ARCHITECTURE"
|
ProcessorArchitecture="ARCHITECTURE"
|
||||||
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
||||||
Version="1.0.33.0" />
|
Version="1.0.34.0" />
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>Telegram Desktop</DisplayName>
|
<DisplayName>Telegram Desktop</DisplayName>
|
||||||
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
||||||
|
|
|
@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,33,0
|
FILEVERSION 1,0,34,0
|
||||||
PRODUCTVERSION 1,0,33,0
|
PRODUCTVERSION 1,0,34,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -52,10 +52,10 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileDescription", "Telegram Desktop"
|
VALUE "FileDescription", "Telegram Desktop"
|
||||||
VALUE "FileVersion", "1.0.33.0"
|
VALUE "FileVersion", "1.0.34.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "1.0.33.0"
|
VALUE "ProductVersion", "1.0.34.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 1,0,33,0
|
FILEVERSION 1,0,34,0
|
||||||
PRODUCTVERSION 1,0,33,0
|
PRODUCTVERSION 1,0,34,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -43,10 +43,10 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileDescription", "Telegram Desktop Updater"
|
VALUE "FileDescription", "Telegram Desktop Updater"
|
||||||
VALUE "FileVersion", "1.0.33.0"
|
VALUE "FileVersion", "1.0.34.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "1.0.33.0"
|
VALUE "ProductVersion", "1.0.34.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -628,7 +628,7 @@ void EditCaptionBox::onCaptionResized() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditCaptionBox::updateBoxSize() {
|
void EditCaptionBox::updateBoxSize() {
|
||||||
auto newHeight = st::boxPhotoPadding.top() + st::boxPhotoCaptionSkip + _field->height() + st::normalFont->height;
|
auto newHeight = st::boxPhotoPadding.top() + st::boxPhotoCaptionSkip + _field->height() + errorTopSkip() + st::normalFont->height;
|
||||||
if (_photo || _animated) {
|
if (_photo || _animated) {
|
||||||
newHeight += _thumbh;
|
newHeight += _thumbh;
|
||||||
} else if (_thumbw) {
|
} else if (_thumbw) {
|
||||||
|
@ -641,6 +641,10 @@ void EditCaptionBox::updateBoxSize() {
|
||||||
setDimensions(st::boxWideWidth, newHeight);
|
setDimensions(st::boxWideWidth, newHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int EditCaptionBox::errorTopSkip() const {
|
||||||
|
return (st::boxButtonPadding.top() / 2);
|
||||||
|
}
|
||||||
|
|
||||||
void EditCaptionBox::paintEvent(QPaintEvent *e) {
|
void EditCaptionBox::paintEvent(QPaintEvent *e) {
|
||||||
BoxContent::paintEvent(e);
|
BoxContent::paintEvent(e);
|
||||||
|
|
||||||
|
@ -731,14 +735,14 @@ void EditCaptionBox::paintEvent(QPaintEvent *e) {
|
||||||
if (!_error.isEmpty()) {
|
if (!_error.isEmpty()) {
|
||||||
p.setFont(st::normalFont);
|
p.setFont(st::normalFont);
|
||||||
p.setPen(st::boxTextFgError);
|
p.setPen(st::boxTextFgError);
|
||||||
p.drawTextLeft(_field->x(), _field->y() + _field->height() + (st::boxButtonPadding.top() / 2), width(), _error);
|
p.drawTextLeft(_field->x(), _field->y() + _field->height() + errorTopSkip(), width(), _error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditCaptionBox::resizeEvent(QResizeEvent *e) {
|
void EditCaptionBox::resizeEvent(QResizeEvent *e) {
|
||||||
BoxContent::resizeEvent(e);
|
BoxContent::resizeEvent(e);
|
||||||
_field->resize(st::boxWideWidth - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(), _field->height());
|
_field->resize(st::boxWideWidth - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(), _field->height());
|
||||||
_field->moveToLeft(st::boxPhotoPadding.left(), height() - st::normalFont->height - _field->height());
|
_field->moveToLeft(st::boxPhotoPadding.left(), height() - st::normalFont->height - errorTopSkip() - _field->height());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditCaptionBox::setInnerFocus() {
|
void EditCaptionBox::setInnerFocus() {
|
||||||
|
@ -748,7 +752,7 @@ void EditCaptionBox::setInnerFocus() {
|
||||||
void EditCaptionBox::onSave(bool ctrlShiftEnter) {
|
void EditCaptionBox::onSave(bool ctrlShiftEnter) {
|
||||||
if (_saveRequestId) return;
|
if (_saveRequestId) return;
|
||||||
|
|
||||||
HistoryItem *item = App::histItemById(_msgId);
|
auto item = App::histItemById(_msgId);
|
||||||
if (!item) {
|
if (!item) {
|
||||||
_error = lang(lng_edit_deleted);
|
_error = lang(lng_edit_deleted);
|
||||||
update();
|
update();
|
||||||
|
|
|
@ -139,6 +139,8 @@ private:
|
||||||
void saveDone(const MTPUpdates &updates);
|
void saveDone(const MTPUpdates &updates);
|
||||||
bool saveFail(const RPCError &error);
|
bool saveFail(const RPCError &error);
|
||||||
|
|
||||||
|
int errorTopSkip() const;
|
||||||
|
|
||||||
FullMsgId _msgId;
|
FullMsgId _msgId;
|
||||||
bool _animated = false;
|
bool _animated = false;
|
||||||
bool _photo = false;
|
bool _photo = false;
|
||||||
|
|
|
@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
#define BETA_VERSION_MACRO (0ULL)
|
#define BETA_VERSION_MACRO (0ULL)
|
||||||
|
|
||||||
constexpr int AppVersion = 1000033;
|
constexpr int AppVersion = 1000034;
|
||||||
constexpr str_const AppVersionStr = "1.0.33";
|
constexpr str_const AppVersionStr = "1.0.34";
|
||||||
constexpr bool AppAlphaVersion = true;
|
constexpr bool AppAlphaVersion = true;
|
||||||
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
|
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
|
||||||
|
|
|
@ -2212,6 +2212,22 @@ void MainWidget::ui_showPeerHistory(quint64 peerId, qint32 showAtMsgId, Ui::Show
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Qt bug workaround: QWidget::render() for an arbitrary widget calls
|
||||||
|
// sendPendingMoveAndResizeEvents(true, true) for the whole window,
|
||||||
|
// which does something like:
|
||||||
|
//
|
||||||
|
// setAttribute(Qt::WA_UpdatesDisabled);
|
||||||
|
// sendEvent(QResizeEvent);
|
||||||
|
// setAttribute(Qt::WA_UpdatesDisabled, false);
|
||||||
|
//
|
||||||
|
// So if we create TabbedSection widget in HistoryWidget::resizeEvent()
|
||||||
|
// it will get an enabled Qt::WA_UpdatesDisabled from its parent and it
|
||||||
|
// will never be rendered, because no one will ever remove that attribute.
|
||||||
|
//
|
||||||
|
// So we force HistoryWidget::resizeEvent() here, without WA_UpdatesDisabled.
|
||||||
|
myEnsureResized(_history);
|
||||||
|
|
||||||
auto animationParams = animatedShow() ? prepareHistoryAnimation(peerId) : Window::SectionSlideParams();
|
auto animationParams = animatedShow() ? prepareHistoryAnimation(peerId) : Window::SectionSlideParams();
|
||||||
|
|
||||||
if (_history->peer() && _history->peer()->id != peerId && way != Ui::ShowWay::Forward) {
|
if (_history->peer() && _history->peer()->id != peerId && way != Ui::ShowWay::Forward) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
AppVersion 1000033
|
AppVersion 1000034
|
||||||
AppVersionStrMajor 1.0
|
AppVersionStrMajor 1.0
|
||||||
AppVersionStrSmall 1.0.33
|
AppVersionStrSmall 1.0.34
|
||||||
AppVersionStr 1.0.33
|
AppVersionStr 1.0.34
|
||||||
AlphaChannel 1
|
AlphaChannel 1
|
||||||
BetaVersion 0
|
BetaVersion 0
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
1.0.34 alpha (21.04.17)
|
||||||
|
|
||||||
|
- Bug fixes and other minor improvements.
|
||||||
|
|
||||||
1.0.33 alpha (16.04.17)
|
1.0.33 alpha (16.04.17)
|
||||||
|
|
||||||
- Bug fixes and other minor improvements.
|
- Bug fixes and other minor improvements.
|
||||||
|
|
Loading…
Add table
Reference in a new issue