Skip to content

Commit

Permalink
fixed media overview scroll init, version 0.5.16
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Aug 15, 2014
1 parent 5ebe005 commit be93920
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Telegram/PrepareLinux.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AppVersionStr=0.5.15
AppVersion=5015
AppVersionStr=0.5.16
AppVersion=5016

if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"
Expand Down
4 changes: 2 additions & 2 deletions Telegram/PrepareLinux32.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AppVersionStr=0.5.15
AppVersion=5015
AppVersionStr=0.5.16
AppVersion=5016

if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"
Expand Down
4 changes: 2 additions & 2 deletions Telegram/PrepareMac.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AppVersionStr=0.5.15
AppVersion=5015
AppVersionStr=0.5.16
AppVersion=5016

if [ -d "./../Mac/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"
Expand Down
6 changes: 3 additions & 3 deletions Telegram/Setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#define MyAppShortName "Telegram"
#define MyAppName "Telegram Win (Unofficial)"
#define MyAppVersion "0.5.15"
#define MyAppVersionZero "0.5.15"
#define MyAppFullVersion "0.5.15.0"
#define MyAppVersion "0.5.16"
#define MyAppVersionZero "0.5.16"
#define MyAppFullVersion "0.5.16.0"
#define MyAppPublisher "Telegram (Unofficial)"
#define MyAppURL "https://tdesktop.com"
#define MyAppExeName "Telegram.exe"
Expand Down
4 changes: 2 additions & 2 deletions Telegram/SourceFiles/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
*/
#pragma once

static const int32 AppVersion = 5015;
static const wchar_t *AppVersionStr = L"0.5.15";
static const int32 AppVersion = 5016;
static const wchar_t *AppVersionStr = L"0.5.16";
#ifdef Q_OS_WIN
static const wchar_t *AppName = L"Telegram Win (Unofficial)";
#else
Expand Down
12 changes: 8 additions & 4 deletions Telegram/SourceFiles/overviewwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ OverviewWidget::OverviewWidget(QWidget *parent, const PeerData *peer, MediaOverv
, _noDropResizeIndex(false)
, _bg(st::msgBG)
, _showing(false)
, _scrollSetAfterShow(0)
{
_scroll.setWidget(&_inner);
_scroll.move(0, 0);
Expand Down Expand Up @@ -677,10 +678,11 @@ void OverviewWidget::paintEvent(QPaintEvent *e) {
}

void OverviewWidget::scrollBy(int32 add) {
bool wasHidden = _scroll.isHidden();
if (wasHidden) _scroll.show();
_scroll.scrollToY(_scroll.scrollTop() + add);
if (wasHidden) _scroll.hide();
if (_scroll.isHidden()) {
_scrollSetAfterShow += add;
} else {
_scroll.scrollToY(_scroll.scrollTop() + add);
}
}

void OverviewWidget::paintTopBar(QPainter &p, float64 over, int32 decreaseWidth) {
Expand Down Expand Up @@ -736,6 +738,7 @@ void OverviewWidget::animShow(const QPixmap &bgAnimCache, const QPixmap &bgAnimT
App::main()->topBar()->stopAnim();
_animTopBarCache = myGrab(App::main()->topBar(), QRect(0, 0, width(), st::topBarHeight));
App::main()->topBar()->startAnim();
_scrollSetAfterShow = _scroll.scrollTop();
_scroll.hide();
a_coord = back ? anim::ivalue(-st::introSlideShift, 0) : anim::ivalue(st::introSlideShift, 0);
a_alpha = anim::fvalue(0, 1);
Expand All @@ -761,6 +764,7 @@ bool OverviewWidget::animStep(float64 ms) {
_bgAnimCache = _animCache = _animTopBarCache = _bgAnimTopBarCache = QPixmap();
App::main()->topBar()->stopAnim();
_scroll.show();
_scroll.scrollToY(_scrollSetAfterShow);
activate();
onScroll();
} else {
Expand Down
2 changes: 2 additions & 0 deletions Telegram/SourceFiles/overviewwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,7 @@ public slots:
anim::ivalue a_coord, a_bgCoord;
anim::fvalue a_alpha, a_bgAlpha;

int32 _scrollSetAfterShow;

};

2 changes: 1 addition & 1 deletion Telegram/Telegram.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.5.15</string>
<string>0.5.16</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>NOTE</key>
Expand Down
Binary file modified Telegram/Telegram.rc
Binary file not shown.
12 changes: 6 additions & 6 deletions Telegram/Telegram.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.5.15;
CURRENT_PROJECT_VERSION = 0.5.16;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
Expand All @@ -1496,7 +1496,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 0.5.15;
CURRENT_PROJECT_VERSION = 0.5.16;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
Expand All @@ -1521,10 +1521,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.5.15;
CURRENT_PROJECT_VERSION = 0.5.16;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.5;
DYLIB_CURRENT_VERSION = 0.5.15;
DYLIB_CURRENT_VERSION = 0.5.16;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
Expand Down Expand Up @@ -1650,10 +1650,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.5.15;
CURRENT_PROJECT_VERSION = 0.5.16;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.5;
DYLIB_CURRENT_VERSION = 0.5.15;
DYLIB_CURRENT_VERSION = 0.5.16;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
Expand Down

0 comments on commit be93920

Please sign in to comment.