Compare commits

...

192 Commits

Author SHA1 Message Date
John Preston
6d9173bca8 Version 0.10.17 alpha: new cute control for adding members to groups. 2016-10-22 23:29:25 +03:00
John Preston
c1d862d8de Some icons moved from sprite to separate files. 2016-10-22 21:58:36 +03:00
John Preston
e1478359e6 Fixed build in Xcode. 2016-10-22 20:05:19 +03:00
John Preston
8bc4e3816b ShareBox and CountrySelect use Ui::MultiSelect as a search field. 2016-10-22 18:59:36 +03:00
John Preston
48332c0c6b Ui::MultiSelect control ready. 2016-10-22 18:59:36 +03:00
John Preston
3455344c62 Ui::MultiSelect control started: now it's just search field + cancel. 2016-10-22 18:59:34 +03:00
John Preston
e5a5273b3a Scrollable boxes reorganized: _scroll always owns _inner.
Also some boxes moved to separate modules: MembersBox, StickersBox.
2016-10-22 18:59:33 +03:00
John Preston
2bd561821a Using cute userpic checkbox Ui::RoundImageCheckbox in ContactsBox. 2016-10-22 18:59:32 +03:00
John Preston
763b347a8f Moved a cute userpic checkbox from ShareBox to a separate class. 2016-10-22 18:59:32 +03:00
John Preston
c514c62d61 Attempt to fix a crash in getUserFull() without a loaded peer. 2016-10-22 18:58:14 +03:00
John Preston
130c41d711 Take control over macOS media keys only when using music player. #2549 2016-10-22 17:35:37 +03:00
John Preston
77df38b4fd Fixed html encoding in native linux notifications. #2532
Also use case-insensitive filters in GTK file chooser.
2016-10-22 16:57:13 +03:00
John Preston
c773bffec6 Applying the ReplyMarkup returned in updateNewMessage. #2543
Also InputField now can be forced to hide placeholder.
2016-10-20 18:29:18 +03:00
John Preston
20d04a065e Fixed Windows tray icon (Qt 5.6.2 broke it). 2016-10-20 17:46:16 +03:00
John Preston
951d93832c Fix wrong clearing of a bot start token when returning to chat. #2417 2016-10-20 12:46:16 +03:00
John Preston
143cfe0d0f Disabled SPMediaKeyTap in MacAppStore build: it crashes. 2016-10-20 01:02:21 +03:00
John Preston
3b843f3d0f Removing Info.plist file before build to force it regeneration. 2016-10-19 21:56:56 +03:00
John Preston
5ad2fc12d9 Version 0.10.16 stable: langs updated. 2016-10-19 21:54:11 +03:00
John Preston
9752224449 Version 0.10.16 stable: new media player + notifications update. 2016-10-19 21:47:45 +03:00
John Preston
f1307f70ce Fixed history scroll state clearing in case bot info was shown. 2016-10-19 17:33:28 +03:00
John Preston
2ffc0196dd Fix reply from notifications (Qt 5.6.2 broke it).
Now the mouse press on Qt::BypassWindowManagerHint window
doesn't activate it. So if you want a working input field
in a Qt::BypassWindowManagerHint window, you should
activate it yourself from any mouse press event.
2016-10-19 16:46:45 +03:00
John Preston
3503be03c9 Fix tray icon menu display in Fedora (Qt 5.6.2 broke it).
When activeChanged() is emitted we call updateTrayMenu(), that
always called trayIcon->setContextMenu(), which was hiding the
just-shown tray icon menu in case of right click with main
window being active. Now we call trayIcon->setContextMenu()
only if the contextMenu value has really changed for trayIcon.
2016-10-19 15:24:39 +03:00
John Preston
40fc7379bc Fixed several bugs appearing on logout-login in player and messages. 2016-10-19 11:59:19 +03:00
John Preston
48a20f0e71 Version 0.10.15 alpha: crash fix in new player, close button added.
Also some grammar improvements and pinned message bar hiding fixed.
2016-10-18 18:19:13 +03:00
John Preston
b33b59b8b9 Version 0.10.14 alpha: fixed retina icon userpics, langs updated. 2016-10-18 15:00:25 +03:00
John Preston
2f4b2d0a33 Version 0.10.14 alpha: userpic images are now generated as icons.
Also fixed Windows build by adding breakpad include path back to gyp.
2016-10-18 14:48:03 +03:00
John Preston
ba4dcc42dc Version 0.10.14 alpha: using $XDG_DATA_HOME in Linux.
If there is no app data in ~/.TelegramDesktop (like in
fresh installs) we use $XDG_DATA_HOME/TelegramDesktop.
2016-10-18 13:32:33 +03:00
John Preston
fc7c5d0ab3 Fixed travis build for TDESKTOP_DISABLE_AUTOUPDATE case. 2016-10-18 10:56:38 +03:00
John Preston
086f754a96 Changed docs to work with Qt 5.6.2, hopefully fixed travis build. 2016-10-18 00:33:24 +03:00
John Preston
7345408568 Merge branch 'master' into dev 2016-10-18 00:27:16 +03:00
John Preston
e536d5ad59 Linux build with Qt 5.6.2 done. 2016-10-17 23:55:31 +03:00
worm202
72b26861a9 Fixed Markdown parsing issues in build documentation for Windows (#2527)
The issue is that Markdown parser doesn't handle code blocks after lists right. Instead of putting code into a block, it is shown as regular unformatted text. To resolve this issue, the empty HTML comments were added between lists and code blocks.

Signed-off-by: Sergey Filatov <raxp.worm202@gmail.com> (github: worm202)
2016-10-17 23:20:30 +03:00
John Preston
eb6b2c7d2e Merge branch 'master' into dev
Conflicts:
	Telegram/gyp/qt.gypi
2016-10-17 23:00:34 +03:00
John Preston
48fde28484 Moving to Qt 5.6.2, Xcode build tested. 2016-10-17 22:24:03 +03:00
John Preston
fd6a312abc SPMediaKeyTap solution for macOS media keys added. 2016-10-17 17:57:14 +03:00
John Preston
eb939fa4b0 Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop into dev 2016-10-17 13:56:29 +03:00
John Preston
0902741b85 Respecting Quite Hours in Windows.
Also closing current chat on window close or passcode lock.
2016-10-17 13:55:17 +03:00
John Preston
cf247384d3 Added an external virtual method / multimethod implementation. 2016-10-17 11:46:43 +03:00
John Preston
fa0e255183 Fixed tooltip display when hiding media player panel. 2016-10-14 21:44:15 +03:00
John Preston
5d6dafeeda New media player build fixed for Xcode. 2016-10-14 21:27:42 +03:00
John Preston
31a847fb9d Playlist appearance added to the new media player.
Also itemRemoved() now is fired as a global observable.
2016-10-14 20:10:15 +03:00
John Preston
4f0cff5467 Playlist added in the new media player panel. 2016-10-13 18:04:40 +03:00
John Preston
d543073632 Display download progress in the media player playback widget. 2016-10-13 12:12:12 +03:00
John Preston
956d048d56 Changing volume in media player by mouse wheel events. 2016-10-13 11:36:02 +03:00
John Preston
9eb8a93719 Media::Player::Widget added instead of PlayerWidget.
New media player bar widget added. Switching between floating
media player panel and media player widget. New volume controller.
2016-10-12 22:36:48 +03:00
John Preston
d919f3e705 Fixed error display in qrc dependencies update. 2016-10-11 19:56:58 +03:00
John Preston
9950629e4e Removed some download-in-ZIP from build docs. 2016-10-11 12:56:51 +03:00
John Preston
8f135d7e00 Cancel state added for PlayButtonLayout in the new media player. 2016-10-09 20:08:16 +03:00
John Preston
8d13014613 Travis other jobs fixed. 2016-10-09 11:30:56 +03:00
John Preston
1a67b31ee9 Travis build fixed.
Caching libxkbcommon, Qt, breakpad, GYP, libva, ffmpeg, openal-soft.
2016-10-09 10:43:56 +03:00
John Preston
2d9ccbc428 Fixed PhotoCropBox for Retina displays. 2016-10-09 01:06:21 +03:00
John Preston
3c8fb5f1f6 Media player vector button added to new audio player cover. 2016-10-08 21:28:43 +03:00
John Preston
e616c39608 Merge branch 'dev' into player
Conflicts:
	Telegram/SourceFiles/application.cpp
	Telegram/SourceFiles/core/utils.h
	Telegram/SourceFiles/localstorage.cpp
	Telegram/SourceFiles/pspecific_mac_p.mm
2016-10-08 12:10:33 +03:00
John Preston
377d333f1c Using same notification options for all notification managers. 2016-10-08 11:38:53 +03:00
John Preston
6798b86655 Version 0.10.13.alpha: removed Reply button for hidden text notifies. 2016-10-07 20:02:13 +03:00
John Preston
b298c72b52 Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop into dev 2016-10-07 19:47:16 +03:00
John Preston
f1d52c12ae Version 0.10.13.alpha: crash fix in custom notifications.
Not sending inline bot request drafts to server by timeout.
2016-10-07 19:45:45 +03:00
John Preston
4a9821117b Version 0.10.12.alpha: no new settings link for macOS 10.8+ version. 2016-10-07 17:28:37 +03:00
John Preston
3c84899edf Version 0.10.12.alpha: returned native macOS notifications for 10.8+ 2016-10-07 16:37:31 +03:00
John Preston
4369c23314 Version 0.10.12.alpha: major notifications update. 2016-10-07 16:24:19 +03:00
John Preston
15ee4b40dc Retina handling fixed in the new notifications. 2016-10-07 16:14:02 +03:00
John Preston
eb47b9468c Various fixes.
Copy inline keyboard when forwarding messages with a game.
Don't show "Deleted Message" in service message with scores.
Improved tiny web page previews. Ignore right button in emoji panel.
2016-10-07 10:58:34 +03:00
John Preston
16ce28f4d2 Notifications settings done: screen corner selection + max count. 2016-10-06 19:41:09 +03:00
John Preston
e7b6d7b498 Advanced notifications settings box layout done. 2016-10-05 21:37:48 +03:00
John Preston
41dc0f4e98 Hide all button added to default notifications. 2016-10-05 19:56:27 +03:00
John Preston
043cba0a64 Custom notifications inline reply added, positioning broken. 2016-10-04 21:18:08 +03:00
John Preston
c8aa7672e9 Notifications by libnotify support improved. 2016-10-04 16:36:50 +03:00
John Preston
a9929a5d51 Merge branch 'master' into notifications 2016-10-04 12:19:00 +03:00
John Preston
79a90956f7 Merge branch 'games_branch' 2016-10-03 18:46:01 +03:00
John Preston
9fdd75113f Bump version to 0.10.11. 2016-10-03 18:45:52 +03:00
John Preston
b600050057 Version 0.10.11: two more crash fixes. 2016-10-03 18:09:01 +03:00
John Preston
c9288f2d0a Native notifications switched off by default. Libnotify supported. 2016-10-03 18:07:50 +03:00
John Preston
f710fe2dd3 0.10.10: Crashfix: Removed infinite recursion in Ui::FadeAnimation(). 2016-10-03 13:30:14 +03:00
John Preston
aa17702c01 0.10.10: Crashfix: Removed infinite recursion in Ui::FadeAnimation(). 2016-10-03 13:09:49 +03:00
John Preston
9d6fb22d11 Merge branch 'master' of https://github.com/telegramdesktop/tdesktop 2016-10-03 12:58:54 +03:00
John Preston
4875060e8f Merge branch 'master' into dev 2016-10-03 12:44:22 +03:00
John Preston
6db52f7fa9 LibNotify Linux notifications support added, testing. 2016-10-03 11:56:03 +03:00
John Preston
1cc1aab823 Version 0.10.9: don't handle cStartUrl() while passcoded. 2016-10-03 11:25:11 +03:00
John Preston
1a645a8496 Merge branch 'master' of https://bitbucket.org/johnprestonmail/telegram-desktop 2016-10-03 11:22:43 +03:00
John Preston
e1a8c89ff1 Version 0.10.9: don't handle cStartUrl() while passcoded. 2016-10-03 11:20:02 +03:00
John Preston
2d1d62a953 Code for replying from notifications, macOS uses notificationActivated(). 2016-10-02 20:06:34 +03:00
John Preston
7f950d2de2 Unified code for notification activation events in Windows version. 2016-10-02 19:32:46 +03:00
John Preston
c2aa8d3c77 NB Broken! Build in Xcode fixed, macOS notifications done by Manager. 2016-10-02 18:44:54 +03:00
John Preston
0bf55835f5 NB Broken! Notifications refactored to Manager, only Windows working. 2016-10-02 16:54:27 +03:00
John Preston
a41e0c4aa7 NB Broken! Started notification manager abstraction. 2016-10-02 12:30:28 +03:00
John Preston
1d6aba86ba Removed channel name from first message. Fixed channel members count. 2016-10-02 10:16:33 +03:00
John Preston
45dabbf9ab Replaced some exceptions in MTProto code with t_assert()s. 2016-10-02 00:09:44 +03:00
John Preston
4bdb2c48c7 Replaced some exceptions in MTProto code with t_assert()s. 2016-10-01 23:29:32 +03:00
John Preston
4a5f467560 Version 0.10.9: fixed interface scaling and Windows build. 2016-10-01 16:15:27 +03:00
John Preston
ef2faf676e Version 0.10.9: langs updated, moved shadow icons to separate files. 2016-10-01 15:35:52 +03:00
John Preston
3d2f025e10 Version 0.10.9: games. 2016-09-30 21:18:00 +03:00
John Preston
acbaf83442 Disabling playback seeking in new media player when loading audio. 2016-09-30 21:10:54 +03:00
John Preston
1b54ccb59c Merge branch 'game_media' into player
Conflicts:
	Telegram/Resources/basic.style
	Telegram/SourceFiles/media/player/media_player_list.cpp
	Telegram/SourceFiles/title.cpp
2016-09-30 20:07:56 +03:00
John Preston
886327a1d0 Playing game state is set for 10 seconds instead of 30.
Also moved some icons from sprite to separate b&w files.
2016-09-30 19:40:00 +03:00
John Preston
2ebab6a13c Beta 10008005: langs updated, new playing game status added. 2016-09-30 16:43:38 +03:00
John Preston
a18e3e5616 Game play send message action is supported. 2016-09-30 16:40:22 +03:00
John Preston
376941dd5e Mixed channel access hash to the game score encrypted data.
Added new lang strings for playing game send actions (not done yet).
Also moved alot of icons from sprite to separate b&w files.
2016-09-30 15:52:03 +03:00
John Preston
828b42e4f1 Version 10008004: fixed Xcode build. 2016-09-29 22:48:34 +03:00
John Preston
a5eee9bd3e Beta 10008004: games / webpages work fine if media autoload disabled.
Also moved alot of file icons from sprite to separate b&w files.
2016-09-29 22:42:14 +03:00
John Preston
fee1cec3d9 Merge branch 'game_media' into player 2016-09-29 20:01:56 +03:00
John Preston
1247bd19b6 No confirmations for verified game bots. Disabled Game media edition.
Also inline bot requests are sent after "@...bot" even without space.
2016-09-29 19:15:44 +03:00
John Preston
325e28f3a8 Fixed bad time displaying when seeking in the new media player. 2016-09-29 18:25:17 +03:00
John Preston
5d37517eac Fixed build. 2016-09-29 17:04:43 +03:00
John Preston
5b3ac58578 Merge branch 'game_media' into player
Conflicts:
	Telegram/SourceFiles/core/basic_types.h
	Telegram/SourceFiles/sysbuttons.h
	Telegram/SourceFiles/title.cpp
2016-09-29 16:48:43 +03:00
John Preston
01a5aa30df Beta 10008003: langs updated. 2016-09-29 15:59:30 +03:00
John Preston
6b8d3aa48c Some layout fixes, std_::align() fixed to work in OS X 10.6-7 build. 2016-09-29 15:57:20 +03:00
John Preston
f1f7333c7a Removed some old styles. Divided basic_types module to several. 2016-09-29 14:37:16 +03:00
John Preston
73a8d27bfd You scored phrase for game service messages. Game layout bug fix. 2016-09-29 12:10:32 +03:00
John Preston
139882113d Closed beta 10008002: games support and some testing. 2016-09-29 00:33:51 +03:00
John Preston
5b7d936140 Some langs updated. Build fixed for Xcode. 2016-09-29 00:33:05 +03:00
John Preston
903795d0e5 Merge branch 'game_media' into player
Conflicts:
	Telegram/SourceFiles/application.cpp
	Telegram/SourceFiles/inline_bots/inline_bot_layout_internal.cpp
	Telegram/SourceFiles/mainwidget.cpp
	Telegram/SourceFiles/mainwidget.h
	Telegram/SourceFiles/structs.h
2016-09-29 00:31:43 +03:00
John Preston
0562024444 Merge branch 'master' into player
Conflicts:
	Telegram/SourceFiles/core/observer.h
	Telegram/SourceFiles/mainwindow.h
	Telegram/SourceFiles/media/view/media_clip_playback.cpp
	Telegram/SourceFiles/media/view/media_clip_playback.h
2016-09-29 00:16:02 +03:00
John Preston
78815800d0 Media::Clip::Reader owners use Media::Clip::ReaderPointer smartptr. 2016-09-28 23:28:53 +03:00
John Preston
344890c533 Game sharing and inline results supported. Qt patch updated.
Qt patch now disables QT_SCALE_FACTOR and other HighDpi
environment variables reading because tdesktop doesn't support them.
2016-09-28 19:23:25 +03:00
John Preston
5529e24000 Displaying of games finished. 2016-09-28 14:38:35 +03:00
John Preston
538ffb9727 Moved History[Media] classes to history_media_types module. 2016-09-28 13:15:03 +03:00
John Preston
d277b0d4bb Some parts from history module moved to history_[item,media,message]. 2016-09-27 17:20:49 +03:00
John Preston
90a4b66366 New media type Game added. Display of Game partially supported. 2016-09-27 16:37:18 +03:00
John Preston
da49d8440a Beta 10008001: moved all Notify::Observer-s to base::Subscriber-s. 2016-09-26 21:33:34 +03:00
John Preston
18f3e45657 NB Broken! New lambda approaches Xcode compilation fixed. 2016-09-26 21:17:36 +03:00
John Preston
c91bdf3fef NB Broken! Moving from registerPeerObserver() to base::Subscriber. 2016-09-26 17:50:24 +03:00
John Preston
8546814a25 imageLoaded() notifications done through base::Subscriber.
Also FileDialog query completion notifications use base::Subscriber.
Strict lambda alignment check. Disable large lambdas in lambda_wrap.
2016-09-26 16:57:08 +03:00
John Preston
453661d611 Removed Function<> and SharedCallback<>, using base::lambda_unique<>.
Also removed macro START_ANIMATION(anim,) using anim.start() instead.
2016-09-26 15:09:59 +03:00
John Preston
866bc4ff8a Rotation from metadata supported in FFmpeg video stream reader.
Also small glitch fix in settings rebuild after self() has changed.
2016-09-26 10:58:04 +03:00
John Preston
ff3e6c429d Emoji display in Sticker preview fixed for Retina displays. 2016-09-25 22:52:11 +03:00
John Preston
52731a737a Fixed Settings avatar display after restart-to-settings. 2016-09-25 22:30:47 +03:00
John Preston
3d8dadc2e7 Fixed reading issue in channels after getChannelDifference().
In App::history() readInboxBefore property was reset each time.
2016-09-25 22:04:02 +03:00
John Preston
042c9fc23d Using plain mutex for Clip readers access serialize, not read-write.
This is an attempt to fix some strange crash reports in write-access
to a mutable QAtomicInt through a const_iterator in ReaderPointers.
2016-09-25 21:05:47 +03:00
John Preston
38114d3297 Merge branch 'master' into player 2016-09-23 22:22:40 +03:00
John Preston
947963d5d1 Version 0.10.8: editing of service message added. 2016-09-23 21:26:53 +03:00
John Preston
efbf67a8ff Merge branch 'master' of https://bitbucket.org/johnprestonmail/telegram-desktop 2016-09-23 19:42:55 +03:00
John Preston
3e4088b413 Merge branch 'master' of https://github.com/telegramdesktop/tdesktop 2016-09-23 19:42:03 +03:00
John Preston
0479b214da Version 0.10.8: fixed Linux and old Xcode builds.
No conversion to bool in ?: operator with Flags::explicit operator bool().
Qt 5.3 QStringList::mid() returns QList<QString> with no join() method.
2016-09-23 19:40:25 +03:00
John Preston
3d9e0030c5 Version 0.10.8. 2016-09-23 19:20:04 +03:00
John Preston
780fe61ff2 Merge branch 'games' of https://bitbucket.org/johnprestonmail/telegram-desktop into games 2016-09-23 19:07:02 +03:00
John Preston
f970ac3163 New audio player done (without playlist). 2016-09-23 19:04:26 +03:00
John Preston
a8f3582cb1 Title controls reordering done right. Title song play button created. 2016-09-21 14:44:20 +03:00
John Preston
47eead17b1 Version 0.10.7 Mac App Store build ready. 2016-09-20 18:14:00 +03:00
John Preston
5c20ae0411 Merge branch 'games' into player 2016-09-20 18:12:55 +03:00
John Preston
c563280b76 Merge branch 'master' into games 2016-09-20 18:12:49 +03:00
John Preston
c4a4e99f6b Version 0.10.7: fixed entities moving when replacing emoji. 2016-09-20 17:02:50 +03:00
John Preston
75c12dda31 Version 0.10.7: fix of settings saving, fix of OpenSSL in Linux build. 2016-09-20 16:29:34 +03:00
John Preston
2ea4c87d78 Merge branch 'master' of https://github.com/telegramdesktop/tdesktop 2016-09-20 16:24:51 +03:00
John Preston
1da2a7c10c Fixed Linux build (double OpenSSL init with libgost). #2427 2016-09-20 16:21:57 +03:00
John Preston
f7999bc993 Languages updated. Build in Xcode fixed. 2016-09-20 16:03:42 +03:00
John Preston
227aa36627 Trending sticker sets install improved, masks sets install disallowed.
Also rpcDone() and rpcFail() now accept lambdas.
2016-09-19 13:18:21 +03:00
John Preston
ce1973fd30 New media player layout started. 2016-09-17 22:28:33 +03:00
John Preston
50fa8b63c9 Software animated play/pause title button ready, icons for it removed. 2016-09-16 15:49:36 +03:00
John Preston
37b5329af3 Merge branch 'games' into player 2016-09-16 13:44:00 +03:00
John Preston
6d2fc5c642 Game bot confirmations added. 2016-09-15 22:15:49 +03:00
John Preston
578cf4ed61 Merge branch 'master' into games 2016-09-15 21:56:57 +03:00
John Preston
298bd2a476 New player icons and sources created. 2016-09-15 19:32:49 +03:00
John Preston
c00456e12e Fixed build for OS X 10.6 and 10.7 on Qt 5.3 and libstdc++. 2016-09-15 14:08:45 +03:00
John Preston
708bf688ea Xcode 8 supported. Fixed quit by Cmd+Q in case of macOS fullscreen window. 2016-09-15 13:50:43 +03:00
John Preston
96202f775c Fixed settings reset in case of tiled background. 2016-09-15 13:26:31 +03:00
John Preston
26ca5fafbb Scheme updated. Dialogs list layout bug fixed. 2016-09-15 12:44:02 +03:00
John Preston
3423bd69dc Merge branch 'master' of https://github.com/telegramdesktop/tdesktop 2016-09-14 19:08:27 +03:00
John Preston
a7b692e8ed PR #1954 improvements.
Inverted the direction of move-by-wheel, so that scrolling down will
move you forward through the photos or documents overview.

Added an accumulation of the scroll amount so that you don't zoom or
skip photos each time a (possibly very frequent) wheel event fires.
2016-09-14 19:05:40 +03:00
John Preston
e623d05e37 Merge branch 'EXL-wheel_mouse_zooming' 2016-09-14 19:05:27 +03:00
John Preston
cb798ab3c5 Merge pull request #2326 from IMAN4K/patch-1
Update building-msvc.md
2016-09-14 18:36:20 +03:00
John Preston
f83610778a Merge branch 'wheel_mouse_zooming' of https://github.com/EXL/tdesktop into EXL-wheel_mouse_zooming 2016-09-14 18:34:27 +03:00
John Preston
8660ab555b Stable 0.10.6 for Linux: dynamic xcb link, cmake dependencies fixed. 2016-09-13 17:07:30 +03:00
John Preston
ffe75444d1 Stable 0.10.6 (only for OS X): fixing Updater erasing. 2016-09-12 18:48:01 +03:00
John Preston
86982da5f7 Merge branch 'master' into games
Conflicts:
	Telegram/Telegram.pro
2016-09-12 16:35:17 +03:00
John Preston
a62a47098e Version 0.10.5: new settings. First stable version on GYP. 2016-09-12 15:02:52 +03:00
John Preston
1629793ace Merge remote-tracking branch 'origin/dev' 2016-09-12 14:51:47 +03:00
John Preston
273637f9ac Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop into dev 2016-09-12 14:51:24 +03:00
John Preston
e90468f67b Languages updated. 2016-09-12 14:51:00 +03:00
John Preston
a41912cdf3 Moved all builds to GYP. 2016-09-12 14:45:41 +03:00
John Preston
07e2eb4c57 Deploy script for Linux ready for GYP build. 2016-09-12 13:17:20 +03:00
John Preston
f517494c91 Closed beta 0.10.4.1: testing linux GYP build. 2016-09-11 12:35:23 +03:00
John Preston
c7e8b153bb Enabled sending stickers from the sticker set preview box. 2016-09-11 11:38:14 +03:00
John Preston
8419a56e10 Emoji display added to sticker preview. Reading featured sticker sets.
Reading featured sticker sets one by one while scrolling through them,
only when the row was fully visible and the image was already loaded.
2016-09-10 23:54:59 +03:00
John Preston
ff657347b8 Featured stickers section done in StickersPanel.
EmojiPan moved to a separate module stickers/emoji_pan.
FFmpeg linked by msvs linker flags in GYP to use ".a" extension.
2016-09-09 18:52:46 +03:00
John Preston
b5640fdb0a GYP build for Linux done: GYP -> CMake -> make. Testing. 2016-09-09 09:15:11 +03:00
John Preston
58933df54b Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop into dev 2016-09-07 14:14:45 +03:00
John Preston
96a0e1c237 Resending requests even if received FLOOD_WAIT_N, N >= 60.
This will fix the infinite large files downloading, because sometimes
server replies with FLOOD_WAIT_N with N > 300, up to 900.
2016-09-07 14:14:24 +03:00
John Preston
82d92d21f6 ShareBox used to share game score using tg:// link. Scheme updated. 2016-09-07 12:04:57 +03:00
John Preston
34331f558f ShareBox: keyboard handle, animated scroll, chosen items jump to top. 2016-09-06 17:45:10 +03:00
John Preston
52a7ed77ba First version of ShareBox done, cute animations.
Temporarily ShareBox is opened instead of ContactsBox, for testing.
2016-09-06 15:28:37 +03:00
John Preston
589b7310c1 Improved service messages about game scores: some links added. 2016-09-03 17:27:22 -04:00
John Preston
326d22565d Merge branch 'dev' into games 2016-09-03 16:35:29 -04:00
John Preston
2f206bf6bc Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop into dev 2016-09-03 12:45:08 -04:00
John Preston
d8444cb5d0 Build scripts made ready for OS X old version. 2016-09-03 12:44:45 -04:00
John Preston
ab18fc6478 0.10.4: Same chat msg links fixed. Crash fix attempt in ScrollArea.
If the message link is opened in the same chat the ShowWay::Forward
should be ignored.

There was a possible crash in ~ScrollArea() when one of the bars
was already destroyed and the second called ScrollArea::leaveEvent.
Now both bars are ChildWidget<>s and will be destroyed in ~QWidget().
2016-09-03 12:35:12 -04:00
John Preston
610d42fd8d Merge branch 'dev' into games 2016-09-03 11:51:29 -04:00
John Preston
3d3fc33253 Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop into dev 2016-09-03 10:19:15 -04:00
John Preston
b772e42ca1 Fixed crash in RevokePublicLinkBox. 2016-09-03 10:18:46 -04:00
John Preston
160895f6e3 Support for game keyboard buttons and score service messages added. 2016-09-02 12:11:23 -04:00
EXL
43a40c3b9a Add zooming in media viewer on Ctrl + mouse wheel
Mouse wheel without Ctrl key is used for switch to the prev/next image;
Clicking on mouse wheel is used to reset zoom;
To switch images are taken only a physical mouse wheel events.

Signed-off-by: Serg Koles <exlmotodev@gmail.com> (github: EXL)
2016-08-18 11:36:36 +03:00
Iman
71cfc83c1d Update building-msvc.md 2016-08-07 13:39:27 +04:30
Iman
10f3d2049a Update building-msvc.md
Signed-off-by: Iman <iman72411@yahoo.com> (github: IMAN4K)
2016-08-07 13:06:14 +04:30
554 changed files with 49906 additions and 33561 deletions

View File

@@ -9,316 +9,567 @@ UPSTREAM="$REPO/upstream"
EXTERNAL="$REPO/external"
CACHE="$HOME/travisCacheDir"
QT_PATH="$BUILD/qt"
BREAKPAD_PATH="$EXTERNAL/breakpad"
QT_VERSION=5.6.2
[[ ! $MAKE_ARGS ]] && MAKE_ARGS="--quiet -j4"
QT_VERSION=5.6.0
XKB_PATH="$BUILD/libxkbcommon"
XKB_CACHE_VERSION="2"
QT_PATH="$BUILD/qt"
QT_CACHE_VERSION="2"
QT_PATCH="$UPSTREAM/Telegram/Patches/qtbase_${QT_VERSION//\./_}.diff"
BREAKPAD_PATH="$BUILD/breakpad"
BREAKPAD_CACHE_VERSION="2"
GYP_PATH="$BUILD/gyp"
GYP_CACHE_VERSION="2"
GYP_PATCH="$UPSTREAM/Telegram/Patches/gyp.diff"
VA_PATH="$BUILD/libva"
VA_CACHE_VERSION="2"
FFMPEG_PATH="$BUILD/ffmpeg"
FFMPEG_CACHE_VERSION="2"
OPENAL_PATH="$BUILD/openal-soft"
OPENAL_CACHE_VERSION="2"
GYP_DEFINES=""
[[ ! $MAKE_ARGS ]] && MAKE_ARGS="--silent -j4"
run() {
# Move files to subdir
cd ..
mv tdesktop tdesktop2
mkdir tdesktop
mv tdesktop2 "$UPSTREAM"
# Move files to subdir
cd ..
mv tdesktop tdesktop2
mkdir tdesktop
mv tdesktop2 "$UPSTREAM"
mkdir "$BUILD"
mkdir "$BUILD"
downloadLibs
build
check
}
# install
downloadLibs() {
travisStartFold "Download libraries"
cd "$REPO"
mkdir external && cd external
git clone https://chromium.googlesource.com/linux-syscall-support
git clone https://git.ffmpeg.org/ffmpeg.git
git clone https://github.com/xkbcommon/libxkbcommon.git
git clone https://github.com/kcat/openal-soft.git
build
check
}
build() {
travisStartFold "Build libraries"
mkdir -p "$EXTERNAL"
# libxkbcommon
cd "$EXTERNAL/libxkbcommon"
./autogen.sh \
--prefix='/usr/local'
make $MAKE_ARGS
sudo make install
sudo ldconfig
# libxkbcommon
getXkbCommon
# ffmpeg
cd "$EXTERNAL/ffmpeg"
./configure \
--prefix='/usr/local' \
--disable-debug \
--disable-programs \
--disable-doc \
--disable-everything \
--enable-gpl \
--enable-version3 \
--enable-libopus \
--enable-decoder=aac \
--enable-decoder=aac_latm \
--enable-decoder=aasc \
--enable-decoder=flac \
--enable-decoder=gif \
--enable-decoder=h264 \
--enable-decoder=h264_vdpau \
--enable-decoder=mp1 \
--enable-decoder=mp1float \
--enable-decoder=mp2 \
--enable-decoder=mp2float \
--enable-decoder=mp3 \
--enable-decoder=mp3adu \
--enable-decoder=mp3adufloat \
--enable-decoder=mp3float \
--enable-decoder=mp3on4 \
--enable-decoder=mp3on4float \
--enable-decoder=mpeg4 \
--enable-decoder=mpeg4_vdpau \
--enable-decoder=msmpeg4v2 \
--enable-decoder=msmpeg4v3 \
--enable-decoder=opus \
--enable-decoder=vorbis \
--enable-decoder=wavpack \
--enable-decoder=wmalossless \
--enable-decoder=wmapro \
--enable-decoder=wmav1 \
--enable-decoder=wmav2 \
--enable-decoder=wmavoice \
--enable-encoder=libopus \
--enable-hwaccel=h264_vaapi \
--enable-hwaccel=h264_vdpau \
--enable-hwaccel=mpeg4_vaapi \
--enable-hwaccel=mpeg4_vdpau \
--enable-parser=aac \
--enable-parser=aac_latm \
--enable-parser=flac \
--enable-parser=h264 \
--enable-parser=mpeg4video \
--enable-parser=mpegaudio \
--enable-parser=opus \
--enable-parser=vorbis \
--enable-demuxer=aac \
--enable-demuxer=flac \
--enable-demuxer=gif \
--enable-demuxer=h264 \
--enable-demuxer=mov \
--enable-demuxer=mp3 \
--enable-demuxer=ogg \
--enable-demuxer=wav \
--enable-muxer=ogg \
--enable-muxer=opus
make $MAKE_ARGS
sudo make install
sudo ldconfig
# libva
getVa
# openal_soft
cd "$EXTERNAL/openal-soft/build"
cmake \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D CMAKE_BUILD_TYPE=Release \
-D LIBTYPE=STATIC \
..
make $MAKE_ARGS
sudo make install
sudo ldconfig
# ffmpeg
getFFmpeg
# Qt
getCustomQt
# openal_soft
getOpenAL
# Breakpad
getBreakpad
# Patched Qt
getCustomQt
travisStartFold "Patch tdesktop"
# Breakpad
getBreakpad
# Patch tdesktop
sed -i 's/CUSTOM_API_ID//g' "$UPSTREAM/Telegram/Telegram.pro"
sed -i 's,LIBS += /usr/local/lib/libxkbcommon.a,,g' "$UPSTREAM/Telegram/Telegram.pro"
sed -i 's,#xkbcommon,xkbcommon,g' "$UPSTREAM/Telegram/Telegram.pro"
sed -i "s,\..*/Libraries/breakpad/,$BREAKPAD_PATH/,g" "$UPSTREAM/Telegram/Telegram.pro"
# Patched GYP (supports cmake precompiled headers)
getGYP
local options=""
# Configure the build
if [[ $BUILD_VERSION == *"disable_autoupdate"* ]]; then
GYP_DEFINES+=",TDESKTOP_DISABLE_AUTOUPDATE"
fi
if [[ $BUILD_VERSION == *"disable_autoupdate"* ]]; then
options+="\nDEFINES += TDESKTOP_DISABLE_AUTOUPDATE"
fi
if [[ $BUILD_VERSION == *"disable_register_custom_scheme"* ]]; then
GYP_DEFINES+=",TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME"
fi
if [[ $BUILD_VERSION == *"disable_register_custom_scheme"* ]]; then
options+="\nDEFINES += TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME"
fi
if [[ $BUILD_VERSION == *"disable_crash_reports"* ]]; then
GYP_DEFINES+=",TDESKTOP_DISABLE_CRASH_REPORTS"
fi
if [[ $BUILD_VERSION == *"disable_crash_reports"* ]]; then
options+="\nDEFINES += TDESKTOP_DISABLE_CRASH_REPORTS"
fi
if [[ $BUILD_VERSION == *"disable_network_proxy"* ]]; then
GYP_DEFINES+=",TDESKTOP_DISABLE_NETWORK_PROXY"
fi
if [[ $BUILD_VERSION == *"disable_network_proxy"* ]]; then
options+="\nDEFINES += TDESKTOP_DISABLE_NETWORK_PROXY"
fi
if [[ $BUILD_VERSION == *"disable_desktop_file_generation"* ]]; then
GYP_DEFINES+=",TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION"
fi
if [[ $BUILD_VERSION == *"disable_desktop_file_generation"* ]]; then
options+="\nDEFINES += TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION"
fi
if [[ $BUILD_VERSION == *"disable_unity_integration"* ]]; then
GYP_DEFINES+=",TDESKTOP_DISABLE_UNITY_INTEGRATION"
fi
if [[ $BUILD_VERSION == *"disable_unity_integration"* ]]; then
options+="\nDEFINES += TDESKTOP_DISABLE_UNITY_INTEGRATION"
fi
info_msg "Build defines: ${GYP_DEFINES}"
info_msg "Build options: ${options}"
buildTelegram
echo -e "${options}" >> "$UPSTREAM/Telegram/Telegram.pro"
travisEndFold
}
travisStartFold "Build tdesktop"
getXkbCommon() {
travisStartFold "Getting xkbcommon"
buildTelegram
travisEndFold
local XKB_CACHE="$CACHE/libxkbcommon"
local XKB_CACHE_FILE="$XKB_CACHE/.cache.txt"
local XKB_CACHE_KEY="${XKB_CACHE_VERSION}"
local XKB_CACHE_OUTDATED="1"
if [ ! -d "$XKB_CACHE" ]; then
mkdir -p "$XKB_CACHE"
fi
ln -sf "$XKB_CACHE" "$XKB_PATH"
if [ -f "$XKB_CACHE_FILE" ]; then
local XKB_CACHE_KEY_FOUND=`tail -n 1 $XKB_CACHE_FILE`
if [ "$XKB_CACHE_KEY" == "$XKB_CACHE_KEY_FOUND" ]; then
XKB_CACHE_OUTDATED="0"
else
info_msg "Cache key '$XKB_CACHE_KEY_FOUND' does not match '$XKB_CACHE_KEY', rebuilding libxkbcommon"
fi
fi
if [ "$XKB_CACHE_OUTDATED" == "1" ]; then
buildXkbCommon
sudo echo $XKB_CACHE_KEY > "$XKB_CACHE_FILE"
else
info_msg "Using cached libxkbcommon"
fi
}
buildXkbCommon() {
info_msg "Downloading and building libxkbcommon"
if [ -d "$EXTERNAL/libxkbcommon" ]; then
rm -rf "$EXTERNAL/libxkbcommon"
fi
cd $XKB_PATH
rm -rf *
cd "$EXTERNAL"
git clone https://github.com/xkbcommon/libxkbcommon.git
cd "$EXTERNAL/libxkbcommon"
./autogen.sh --prefix=$XKB_PATH
make $MAKE_ARGS
sudo make install
sudo ldconfig
}
getVa() {
travisStartFold "Getting libva"
local VA_CACHE="$CACHE/libva"
local VA_CACHE_FILE="$VA_CACHE/.cache.txt"
local VA_CACHE_KEY="${VA_CACHE_VERSION}"
local VA_CACHE_OUTDATED="1"
if [ ! -d "$VA_CACHE" ]; then
mkdir -p "$VA_CACHE"
fi
ln -sf "$VA_CACHE" "$VA_PATH"
if [ -f "$VA_CACHE_FILE" ]; then
local VA_CACHE_KEY_FOUND=`tail -n 1 $VA_CACHE_FILE`
if [ "$VA_CACHE_KEY" == "$VA_CACHE_KEY_FOUND" ]; then
VA_CACHE_OUTDATED="0"
else
info_msg "Cache key '$VA_CACHE_KEY_FOUND' does not match '$VA_CACHE_KEY', rebuilding libva"
fi
fi
if [ "$VA_CACHE_OUTDATED" == "1" ]; then
buildVa
sudo echo $VA_CACHE_KEY > "$VA_CACHE_FILE"
else
info_msg "Using cached libva"
fi
}
buildVa() {
info_msg "Downloading and building libva"
if [ -d "$EXTERNAL/libva" ]; then
rm -rf "$EXTERNAL/libva"
fi
cd $VA_PATH
rm -rf *
cd "$EXTERNAL"
git clone git://anongit.freedesktop.org/git/libva
cd "$EXTERNAL/libva"
./autogen.sh --prefix=$VA_PATH --enable-static
make $MAKE_ARGS
sudo make install
sudo ldconfig
}
getFFmpeg() {
travisStartFold "Getting ffmpeg"
local FFMPEG_CACHE="$CACHE/ffmpeg"
local FFMPEG_CACHE_FILE="$FFMPEG_CACHE/.cache.txt"
local FFMPEG_CACHE_KEY="${FFMPEG_CACHE_VERSION}"
local FFMPEG_CACHE_OUTDATED="1"
if [ ! -d "$FFMPEG_CACHE" ]; then
mkdir -p "$FFMPEG_CACHE"
fi
ln -sf "$FFMPEG_CACHE" "$FFMPEG_PATH"
if [ -f "$FFMPEG_CACHE_FILE" ]; then
local FFMPEG_CACHE_KEY_FOUND=`tail -n 1 $FFMPEG_CACHE_FILE`
if [ "$FFMPEG_CACHE_KEY" == "$FFMPEG_CACHE_KEY_FOUND" ]; then
FFMPEG_CACHE_OUTDATED="0"
else
info_msg "Cache key '$FFMPEG_CACHE_KEY_FOUND' does not match '$FFMPEG_CACHE_KEY', rebuilding ffmpeg"
fi
fi
if [ "$FFMPEG_CACHE_OUTDATED" == "1" ]; then
buildFFmpeg
sudo echo $FFMPEG_CACHE_KEY > "$FFMPEG_CACHE_FILE"
else
info_msg "Using cached ffmpeg"
fi
}
buildFFmpeg() {
info_msg "Downloading and building ffmpeg"
if [ -d "$EXTERNAL/ffmpeg" ]; then
rm -rf "$EXTERNAL/ffmpeg"
fi
cd $FFMPEG_PATH
rm -rf *
cd "$EXTERNAL"
git clone https://git.ffmpeg.org/ffmpeg.git
cd "$EXTERNAL/ffmpeg"
./configure \
--prefix=$FFMPEG_PATH \
--disable-debug \
--disable-programs \
--disable-doc \
--disable-everything \
--enable-gpl \
--enable-version3 \
--enable-libopus \
--enable-decoder=aac \
--enable-decoder=aac_latm \
--enable-decoder=aasc \
--enable-decoder=flac \
--enable-decoder=gif \
--enable-decoder=h264 \
--enable-decoder=h264_vdpau \
--enable-decoder=mp1 \
--enable-decoder=mp1float \
--enable-decoder=mp2 \
--enable-decoder=mp2float \
--enable-decoder=mp3 \
--enable-decoder=mp3adu \
--enable-decoder=mp3adufloat \
--enable-decoder=mp3float \
--enable-decoder=mp3on4 \
--enable-decoder=mp3on4float \
--enable-decoder=mpeg4 \
--enable-decoder=mpeg4_vdpau \
--enable-decoder=msmpeg4v2 \
--enable-decoder=msmpeg4v3 \
--enable-decoder=opus \
--enable-decoder=vorbis \
--enable-decoder=wavpack \
--enable-decoder=wmalossless \
--enable-decoder=wmapro \
--enable-decoder=wmav1 \
--enable-decoder=wmav2 \
--enable-decoder=wmavoice \
--enable-encoder=libopus \
--enable-hwaccel=h264_vaapi \
--enable-hwaccel=h264_vdpau \
--enable-hwaccel=mpeg4_vaapi \
--enable-hwaccel=mpeg4_vdpau \
--enable-parser=aac \
--enable-parser=aac_latm \
--enable-parser=flac \
--enable-parser=h264 \
--enable-parser=mpeg4video \
--enable-parser=mpegaudio \
--enable-parser=opus \
--enable-parser=vorbis \
--enable-demuxer=aac \
--enable-demuxer=flac \
--enable-demuxer=gif \
--enable-demuxer=h264 \
--enable-demuxer=mov \
--enable-demuxer=mp3 \
--enable-demuxer=ogg \
--enable-demuxer=wav \
--enable-muxer=ogg \
--enable-muxer=opus
make $MAKE_ARGS
sudo make install
sudo ldconfig
}
getOpenAL() {
travisStartFold "Getting openal-soft"
local OPENAL_CACHE="$CACHE/openal-soft"
local OPENAL_CACHE_FILE="$OPENAL_CACHE/.cache.txt"
local OPENAL_CACHE_KEY="${OPENAL_CACHE_VERSION}"
local OPENAL_CACHE_OUTDATED="1"
if [ ! -d "$OPENAL_CACHE" ]; then
mkdir -p "$OPENAL_CACHE"
fi
ln -sf "$OPENAL_CACHE" "$OPENAL_PATH"
if [ -f "$OPENAL_CACHE_FILE" ]; then
local OPENAL_CACHE_KEY_FOUND=`tail -n 1 $OPENAL_CACHE_FILE`
if [ "$OPENAL_CACHE_KEY" == "$OPENAL_CACHE_KEY_FOUND" ]; then
OPENAL_CACHE_OUTDATED="0"
else
info_msg "Cache key '$OPENAL_CACHE_KEY_FOUND' does not match '$OPENAL_CACHE_KEY', rebuilding openal-soft"
fi
fi
if [ "$OPENAL_CACHE_OUTDATED" == "1" ]; then
buildOpenAL
sudo echo $OPENAL_CACHE_KEY > "$OPENAL_CACHE_FILE"
else
info_msg "Using cached openal-soft"
fi
}
buildOpenAL() {
info_msg "Downloading and building openal-soft"
if [ -d "$EXTERNAL/openal-soft" ]; then
rm -rf "$EXTERNAL/openal-soft"
fi
cd $OPENAL_PATH
rm -rf *
cd "$EXTERNAL"
git clone https://github.com/kcat/openal-soft.git
cd "$EXTERNAL/openal-soft/build"
cmake \
-D CMAKE_INSTALL_PREFIX=$OPENAL_PATH \
-D CMAKE_BUILD_TYPE=Release \
-D LIBTYPE=STATIC \
..
make $MAKE_ARGS
sudo make install
sudo ldconfig
}
getBreakpad() {
travisStartFold "Getting breakpad"
travisStartFold "Getting breakpad"
local BREAKPAD_CACHE="$CACHE/breakpad"
local BREAKPAD_CACHE_FILE="$BREAKPAD_CACHE/.cache.txt"
if [ ! -d "$BREAKPAD_CACHE" ]; then
mkdir -p "$BREAKPAD_CACHE"
fi
local BREAKPAD_CACHE="$CACHE/breakpad"
local BREAKPAD_CACHE_FILE="$BREAKPAD_CACHE/.cache.txt"
local BREAKPAD_CACHE_KEY="${BREAKPAD_CACHE_VERSION}"
local BREAKPAD_CACHE_OUTDATED="1"
ln -sf "$BREAKPAD_CACHE" "$BREAKPAD_PATH"
if [ ! -d "$BREAKPAD_CACHE" ]; then
mkdir -p "$BREAKPAD_CACHE"
fi
if [ -f "$BREAKPAD_CACHE_FILE" ]; then
info_msg "Using cached breakpad"
makeBreakpadLink
ln -sf "$BREAKPAD_CACHE" "$BREAKPAD_PATH"
if [ -f "$BREAKPAD_CACHE_FILE" ]; then
local BREAKPAD_CACHE_KEY_FOUND=`tail -n 1 $BREAKPAD_CACHE_FILE`
if [ "$BREAKPAD_CACHE_KEY" == "$BREAKPAD_CACHE_KEY_FOUND" ]; then
BREAKPAD_CACHE_OUTDATED="0"
else
buildBreakpad
sudo touch "$BREAKPAD_CACHE_FILE"
info_msg "Cache key '$BREAKPAD_CACHE_KEY_FOUND' does not match '$BREAKPAD_CACHE_KEY', rebuilding breakpad"
fi
fi
if [ "$BREAKPAD_CACHE_OUTDATED" == "1" ]; then
buildBreakpad
sudo echo $BREAKPAD_CACHE_KEY > "$BREAKPAD_CACHE_FILE"
else
info_msg "Using cached breakpad"
fi
}
buildBreakpad() {
info_msg "Downloading and building breakpad"
info_msg "Downloading and building breakpad"
cd "$EXTERNAL"
git clone https://chromium.googlesource.com/breakpad/breakpad
if [ -d "$EXTERNAL/breakpad" ]; then
rm -rf "$EXTERNAL/breakpad"
fi
cd $BREAKPAD_PATH
rm -rf *
makeBreakpadLink
cd "$BREAKPAD_PATH"
./configure
make $MAKE_ARGS
}
cd "$EXTERNAL"
git clone https://chromium.googlesource.com/breakpad/breakpad
makeBreakpadLink() {
local LSS_PATH="$BREAKPAD_PATH/src/third_party/lss"
ln -s -f "$EXTERNAL/linux-syscall-support" "$LSS_PATH"
local LSS_GIT_PATH="$LSS_PATH/.git"
if [ -d "$LSS_GIT_PATH" ]; then # Remove git dir to prevent cache changes
rm -rf "$LSS_GIT_PATH"
fi
cd "$EXTERNAL/breakpad/src/third_party"
git clone https://chromium.googlesource.com/linux-syscall-support lss
cd "$EXTERNAL/breakpad"
./configure --prefix=$BREAKPAD_PATH
make $MAKE_ARGS
sudo make install
sudo ldconfig
}
getCustomQt() {
travisStartFold "Getting patched QT"
travisStartFold "Getting patched Qt"
local QT_CACHE="$CACHE/qtPatched"
local QT_CACHE_FILE="$QT_CACHE/.cache.txt"
local QT_CACHE="$CACHE/qtPatched"
local QT_CACHE_FILE="$QT_CACHE/.cache.txt"
local QT_PATCH_CHECKSUM=`sha1sum $QT_PATCH`
local QT_CACHE_KEY="${QT_VERSION}_${QT_CACHE_VERSION}_${QT_PATCH_CHECKSUM:0:32}"
local QT_CACHE_OUTDATED="1"
if [ ! -d "$QT_CACHE" ]; then
mkdir -p "$QT_CACHE"
fi
if [ ! -d "$QT_CACHE" ]; then
mkdir -p "$QT_CACHE"
fi
ln -sf "$QT_CACHE" "$QT_PATH"
ln -sf "$QT_CACHE" "$QT_PATH"
if [ -f "$QT_CACHE_FILE" ]; then
info_msg "Using cached patched qt"
if [ -f "$QT_CACHE_FILE" ]; then
local QT_CACHE_KEY_FOUND=`tail -n 1 $QT_CACHE_FILE`
if [ "$QT_CACHE_KEY" == "$QT_CACHE_KEY_FOUND" ]; then
QT_CACHE_OUTDATED="0"
else
buildCustomQt
sudo touch "$QT_CACHE_FILE"
info_msg "Cache key '$QT_CACHE_KEY_FOUND' does not match '$QT_CACHE_KEY', rebuilding patched Qt"
fi
fi
if [ "$QT_CACHE_OUTDATED" == "1" ]; then
buildCustomQt
sudo echo $QT_CACHE_KEY > "$QT_CACHE_FILE"
else
info_msg "Using cached patched Qt"
fi
export PATH="$QT_PATH/bin:$PATH"
export PATH="$QT_PATH/bin:$PATH"
}
buildCustomQt() {
info_msg "Downloading and building patched qt"
info_msg "Downloading and building patched qt"
cd "$EXTERNAL"
echo -e "Clone Qt ${QT_VERSION}\n"
git clone git://code.qt.io/qt/qt5.git qt${QT_VERSION}
cd qt${QT_VERSION}
git checkout "$(echo ${QT_VERSION} | sed -e s/\..$//)"
perl init-repository --module-subset=qtbase,qtimageformats
git checkout v${QT_VERSION}
cd qtbase && git checkout v${QT_VERSION} && cd ..
cd qtimageformats && git checkout v${QT_VERSION} && cd ..
cd ..
if [ -d "$EXTERNAL/qt${QT_VERSION}" ]; then
rm -rf "$EXTERNAL/qt${QT_VERSION}"
fi
cd $QT_PATH
rm -rf *
cd "$EXTERNAL/qt${QT_VERSION}/qtbase"
git apply "$UPSTREAM/Telegram/Patches/qtbase_${QT_VERSION//\./_}.diff"
cd ..
./configure -prefix "$QT_PATH" -release -opensource -confirm-license -qt-zlib \
-qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb \
-qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests \
-dbus-runtime -openssl-linked -no-gstreamer -no-mtdev # <- Not sure about these
make $MAKE_ARGS
sudo make install
cd "$EXTERNAL"
git clone git://code.qt.io/qt/qt5.git qt${QT_VERSION}
cd "$EXTERNAL/qt${QT_VERSION}"
git checkout "$(echo ${QT_VERSION} | sed -e s/\..$//)"
perl init-repository --module-subset=qtbase,qtimageformats
git checkout v${QT_VERSION}
cd qtbase && git checkout v${QT_VERSION} && cd ..
cd qtimageformats && git checkout v${QT_VERSION} && cd ..
cd "$EXTERNAL/qt${QT_VERSION}/qtbase"
git apply "$QT_PATCH"
cd ..
./configure -prefix $QT_PATH -release -opensource -confirm-license -qt-zlib \
-qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb \
-qt-xkbcommon-x11 -no-opengl -no-gtkstyle -static \
-nomake examples -nomake tests \
-dbus-runtime -no-gstreamer -no-mtdev # <- Not sure about these
make $MAKE_ARGS
sudo make install
}
getGYP() {
travisStartFold "Getting patched GYP"
local GYP_CACHE="$CACHE/gyp"
local GYP_CACHE_FILE="$GYP_CACHE/.cache.txt"
local GYP_PATCH_CHECKSUM=`sha1sum $GYP_PATCH`
local GYP_CACHE_KEY="${GYP_CACHE_VERSION}_${GYP_PATCH_CHECKSUM:0:32}"
local GYP_CACHE_OUTDATED="1"
if [ ! -d "$GYP_CACHE" ]; then
mkdir -p "$GYP_CACHE"
fi
ln -sf "$GYP_CACHE" "$GYP_PATH"
if [ -f "$GYP_CACHE_FILE" ]; then
local GYP_CACHE_KEY_FOUND=`tail -n 1 $GYP_CACHE_FILE`
if [ "$GYP_CACHE_KEY" == "$GYP_CACHE_KEY_FOUND" ]; then
GYP_CACHE_OUTDATED="0"
else
info_msg "Cache key '$GYP_CACHE_KEY_FOUND' does not match '$GYP_CACHE_KEY', rebuilding patched GYP"
fi
fi
if [ "$GYP_CACHE_OUTDATED" == "1" ]; then
buildGYP
sudo echo $GYP_CACHE_KEY > "$GYP_CACHE_FILE"
else
info_msg "Using cached patched GYP"
fi
}
buildGYP() {
info_msg "Downloading and building patched GYP"
if [ -d "$EXTERNAL/gyp" ]; then
rm -rf "$EXTERNAL/gyp"
fi
cd $GYP_PATH
rm -rf *
cd "$EXTERNAL"
git clone https://chromium.googlesource.com/external/gyp
cd "$EXTERNAL/gyp"
git checkout 702ac58e4772
git apply "$GYP_PATCH"
cp -r * "$GYP_PATH/"
}
buildTelegram() {
info_msg "Build codegen_style"
# Build codegen_style
mkdir -p "$UPSTREAM/Linux/obj/codegen_style/Debug"
cd "$UPSTREAM/Linux/obj/codegen_style/Debug"
qmake QT_TDESKTOP_PATH="${QT_PATH}" QT_TDESKTOP_VERSION=${QT_VERSION} CONFIG+=debug "../../../../Telegram/build/qmake/codegen_style/codegen_style.pro"
make $MAKE_ARGS
travisStartFold "Build tdesktop"
info_msg "Build codegen_numbers"
# Build codegen_numbers
mkdir -p "$UPSTREAM/Linux/obj/codegen_numbers/Debug"
cd "$UPSTREAM/Linux/obj/codegen_numbers/Debug"
qmake QT_TDESKTOP_PATH="${QT_PATH}" QT_TDESKTOP_VERSION=${QT_VERSION} CONFIG+=debug "../../../../Telegram/build/qmake/codegen_numbers/codegen_numbers.pro"
make $MAKE_ARGS
cd "$UPSTREAM/Telegram/gyp"
"$GYP_PATH/gyp" \
-Dtravis_defines=${GYP_DEFINES:1} \
-Dlinux_path_xkbcommon=$XKB_PATH \
-Dlinux_path_va=$VA_PATH \
-Dlinux_path_ffmpeg=$FFMPEG_PATH \
-Dlinux_path_openal=$OPENAL_PATH \
-Dlinux_path_qt=$QT_PATH \
-Dlinux_path_breakpad=$BREAKPAD_PATH \
-Dlinux_path_libexif_lib=/usr/local/lib \
-Dlinux_lib_ssl=-lssl \
-Dlinux_lib_crypto=-lcrypto \
-Dlinux_lib_icu=-licuuc\ -licutu\ -licui18n \
--depth=. --generator-output=../.. --format=cmake -Goutput_dir=out \
Telegram.gyp
cd "$UPSTREAM/out/Debug"
info_msg "Build MetaLang"
# Build MetaLang
mkdir -p "$UPSTREAM/Linux/DebugIntermediateLang"
cd "$UPSTREAM/Linux/DebugIntermediateLang"
qmake QT_TDESKTOP_PATH="${QT_PATH}" QT_TDESKTOP_VERSION=${QT_VERSION} CONFIG+=debug "../../Telegram/MetaLang.pro"
make $MAKE_ARGS
info_msg "Build Telegram Desktop"
# Build Telegram Desktop
mkdir -p "$UPSTREAM/Linux/DebugIntermediate"
cd "$UPSTREAM/Linux/DebugIntermediate"
./../codegen/Debug/codegen_style "-I./../../Telegram/Resources" "-I./../../Telegram/SourceFiles" "-o./GeneratedFiles/styles" all_files.style --rebuild
./../codegen/Debug/codegen_numbers "-o./GeneratedFiles" "./../../Telegram/Resources/numbers.txt"
./../DebugLang/MetaLang -lang_in ./../../Telegram/Resources/langs/lang.strings -lang_out ./GeneratedFiles/lang_auto
qmake QT_TDESKTOP_PATH="${QT_PATH}" QT_TDESKTOP_VERSION=${QT_VERSION} CONFIG+=debug "../../Telegram/Telegram.pro"
make $MAKE_ARGS
export ASM="gcc"
cmake .
make $MAKE_ARGS
}
check() {
local filePath="$UPSTREAM/Linux/Debug/Telegram"
if test -f "$filePath"; then
success_msg "Build successful done! :)"
local filePath="$UPSTREAM/out/Debug/Telegram"
if test -f "$filePath"; then
success_msg "Build successful done! :)"
local size;
size=$(stat -c %s "$filePath")
success_msg "File size of ${filePath}: ${size} Bytes"
else
error_msg "Build error, output file does not exist"
exit 1
fi
local size;
size=$(stat -c %s "$filePath")
success_msg "File size of ${filePath}: ${size} Bytes"
else
error_msg "Build error, output file does not exist"
exit 1
fi
}
source ./.travis/common.sh

View File

@@ -16,7 +16,7 @@ The source code is published under GPLv3 with OpenSSL exception, the license is
## Third-party
* Qt 5.3.2 and 5.6.0, slightly patched ([LGPL](http://doc.qt.io/qt-5/lgpl.html))
* Qt 5.3.2 and 5.6.2, slightly patched ([LGPL](http://doc.qt.io/qt-5/lgpl.html))
* OpenSSL 1.0.1g ([OpenSSL License](https://www.openssl.org/source/license.html))
* zlib 1.2.8 ([zlib License](http://www.zlib.net/zlib_license.html))
* libexif 0.6.20 ([LGPL](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html))
@@ -34,10 +34,8 @@ The source code is published under GPLv3 with OpenSSL exception, the license is
## Build instructions
* [Visual Studio 2015][msvc]
* [Xcode 7][xcode]
* [Xcode 7 for OS X 10.6 and 10.7][xcode_old]
* [Qt Creator 3.5.1 Ubuntu][qtcreator]
* [Using qmake on GNU/Linux][qmake]
* [Xcode 8][xcode]
* [GYP/CMake on GNU/Linux][cmake]
## Projects in Telegram solution
@@ -83,5 +81,4 @@ The source code is published under GPLv3 with OpenSSL exception, the license is
[msvc]: doc/building-msvc.md
[xcode]: doc/building-xcode.md
[xcode_old]: doc/building-xcode-old.md
[qtcreator]: doc/building-qtcreator.md
[qmake]: doc/building-qmake.md
[cmake]: doc/building-cmake.md

View File

@@ -1,30 +0,0 @@
QT += core
CONFIG(debug, debug|release) {
DEFINES += _DEBUG
OBJECTS_DIR = ./../DebugIntermediateEmoji
MOC_DIR = ./GeneratedFiles/Debug
DESTDIR = ./../DebugEmoji
}
CONFIG(release, debug|release) {
OBJECTS_DIR = ./../ReleaseIntermediateEmoji
MOC_DIR = ./GeneratedFiles/Release
DESTDIR = ./../ReleaseEmoji
}
CONFIG += plugin static
macx {
QMAKE_INFO_PLIST = ./SourceFiles/_other/Emoji.plist
QMAKE_LFLAGS += -framework Cocoa
}
SOURCES += \
./SourceFiles/_other/memain.cpp \
./SourceFiles/_other/genemoji.cpp \
HEADERS += \
./SourceFiles/_other/memain.h \
./SourceFiles/_other/genemoji.h \
include(qt_static.pri)

View File

@@ -1,30 +0,0 @@
QT += core
CONFIG(debug, debug|release) {
DEFINES += _DEBUG
OBJECTS_DIR = ./../DebugIntermediateLang
MOC_DIR = ./GeneratedFiles/Debug
DESTDIR = ./../DebugLang
}
CONFIG(release, debug|release) {
OBJECTS_DIR = ./../ReleaseIntermediateLang
MOC_DIR = ./GeneratedFiles/Release
DESTDIR = ./../ReleaseLang
}
CONFIG += plugin static c++14
macx {
QMAKE_INFO_PLIST = ./SourceFiles/_other/Lang.plist
QMAKE_LFLAGS += -framework Cocoa
}
SOURCES += \
./SourceFiles/_other/mlmain.cpp \
./SourceFiles/_other/genlang.cpp \
HEADERS += \
./SourceFiles/_other/mlmain.h \
./SourceFiles/_other/genlang.h \
include(qt_static.pri)

View File

@@ -1,40 +0,0 @@
QT += core
CONFIG(debug, debug|release) {
DEFINES += _DEBUG
OBJECTS_DIR = ./../DebugIntermediatePacker
MOC_DIR = ./GeneratedFiles/Debug
DESTDIR = ./../Debug
}
CONFIG(release, debug|release) {
OBJECTS_DIR = ./../ReleaseIntermediatePacker
MOC_DIR = ./GeneratedFiles/Release
DESTDIR = ./../Release
}
macx {
QMAKE_INFO_PLIST = ./SourceFiles/_other/Packer.plist
QMAKE_LFLAGS += -framework Cocoa
}
SOURCES += \
./SourceFiles/_other/packer.cpp \
HEADERS += \
./SourceFiles/_other/packer.h \
unix {
linux-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch
linux-g++-32:QMAKE_TARGET.arch = x86
linux-g++-64:QMAKE_TARGET.arch = x86_64
contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += Q_OS_LINUX64
} else {
DEFINES += Q_OS_LINUX32
}
}
include(qt_static.pri)
LIBS += -lcrypto -lssl -lz -llzma

View File

@@ -1,5 +1,33 @@
diff --git a/pylib/gyp/generator/cmake.py b/pylib/gyp/generator/cmake.py
index a2b9629..68d7020 100644
--- a/pylib/gyp/generator/cmake.py
+++ b/pylib/gyp/generator/cmake.py
@@ -1070,6 +1070,23 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
output.write(')\n')
+ # Precompile header
+ precompiled_header = config.get('cmake_precompiled_header', '')
+ if precompiled_header:
+ precompiled_header_script = config.get('cmake_precompiled_header_script', '')
+ if not precompiled_header_script:
+ print ('ERROR: cmake_precompiled_header requires cmake_precompiled_header_script')
+ cmake_precompiled_header = NormjoinPath(path_from_cmakelists_to_gyp, precompiled_header)
+ cmake_precompiled_header_script = NormjoinPathForceCMakeSource(path_from_cmakelists_to_gyp, precompiled_header_script)
+ output.write('include(')
+ output.write(cmake_precompiled_header_script)
+ output.write(')\n')
+ output.write('add_precompiled_header(')
+ output.write(cmake_target_name)
+ output.write(' ')
+ output.write(cmake_precompiled_header)
+ output.write(')\n')
+
UnsetVariable(output, 'TOOLSET')
UnsetVariable(output, 'TARGET')
diff --git a/pylib/gyp/generator/xcode.py b/pylib/gyp/generator/xcode.py
index 0e3fb93..0679660 100644
index db99d6a..f8398cc 100644
--- a/pylib/gyp/generator/xcode.py
+++ b/pylib/gyp/generator/xcode.py
@@ -72,6 +72,10 @@ generator_additional_non_configuration_keys = [
@@ -13,7 +41,7 @@ index 0e3fb93..0679660 100644
'mac_bundle',
'mac_bundle_resources',
'mac_framework_headers',
@@ -761,6 +765,26 @@ def GenerateOutput(target_list, target_dicts, data, params):
@@ -772,6 +776,26 @@ def GenerateOutput(target_list, target_dicts, data, params):
xcode_targets[qualified_target] = xct
xcode_target_to_target_dict[xct] = spec

View File

@@ -0,0 +1,705 @@
diff --git a/configure b/configure
index cb8d78f..cadb3f0 100755
--- a/configure
+++ b/configure
@@ -511,7 +511,8 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then
exit 2
fi
- if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
+ # Patch: Fix Qt for working with Xcode 8.
+ if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
echo >&2
echo " Xcode not set up properly. You may need to confirm the license" >&2
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
diff --git a/mkspecs/common/g++-macx.conf b/mkspecs/common/g++-macx.conf
index 086510d..ae4f81a 100644
--- a/mkspecs/common/g++-macx.conf
+++ b/mkspecs/common/g++-macx.conf
@@ -14,7 +14,8 @@ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -gdwarf-2
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -gdwarf-2
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g -gdwarf-2
-QMAKE_LFLAGS_STATIC_LIB += -all_load
+# Patch: Don't remember :(
+#QMAKE_LFLAGS_STATIC_LIB += -all_load
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvmgcc42
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index 0cc8cd6..ca9725b 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -12,7 +12,9 @@ isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
# Make sure Xcode is set up properly
- isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
+
+ # Patch: Fix Qt for working with Xcode 8.
+ isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
}
diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index bb79a13..5d595bc 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -220,6 +220,10 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
int blue_scale = 0;
int alpha_scale = 0;
+ // Patch: Backport a fix for bmp reader.
+ if (!d->isSequential())
+ d->seek(startpos + BMP_FILEHDR_SIZE + (bi.biSize >= BMP_WIN4? BMP_WIN : bi.biSize)); // goto start of colormap
+
if (bi.biSize >= BMP_WIN4 || (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32))) {
if (d->read((char *)&red_mask, sizeof(red_mask)) != sizeof(red_mask))
return false;
@@ -307,8 +311,9 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
image.setDotsPerMeterX(bi.biXPelsPerMeter);
image.setDotsPerMeterY(bi.biYPelsPerMeter);
- if (!d->isSequential())
- d->seek(startpos + BMP_FILEHDR_SIZE + (bi.biSize >= BMP_WIN4? BMP_WIN : bi.biSize)); // goto start of colormap
+ // Patch: Backport a fix for bmp reader.
+ //if (!d->isSequential())
+ // d->seek(startpos + BMP_FILEHDR_SIZE + (bi.biSize >= BMP_WIN4? BMP_WIN : bi.biSize)); // goto start of colormap
if (ncols > 0) { // read color table
uchar rgb[4];
diff --git a/src/gui/painting/qpaintengine_p.h b/src/gui/painting/qpaintengine_p.h
index ebff950..4300ca4 100644
--- a/src/gui/painting/qpaintengine_p.h
+++ b/src/gui/painting/qpaintengine_p.h
@@ -87,8 +87,18 @@ public:
if (hasSystemTransform) {
if (systemTransform.type() <= QTransform::TxTranslate)
systemClip.translate(qRound(systemTransform.dx()), qRound(systemTransform.dy()));
- else
+ // Patch: Transform the system clip region back from device pixels to device-independent pixels before
+ // applying systemTransform, which already has transform from device-independent pixels to device pixels.
+ else {
+#ifdef Q_OS_MAC
+ QTransform scaleTransform;
+ const qreal invDevicePixelRatio = 1. / pdev->devicePixelRatio();
+ scaleTransform.scale(invDevicePixelRatio, invDevicePixelRatio);
+ systemClip = systemTransform.map(scaleTransform.map(systemClip));
+#else
systemClip = systemTransform.map(systemClip);
+#endif
+ }
}
// Make sure we're inside the viewport.
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index 4879ae5..56cdcba 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -654,6 +654,9 @@ int QTextLayout::nextCursorPosition(int oldPos, CursorMode mode) const
while (oldPos < len && !attributes[oldPos].graphemeBoundary)
oldPos++;
} else {
+ // Patch: Skip to the end of the current word, not to the start of the next one.
+ while (oldPos < len && attributes[oldPos].whiteSpace)
+ oldPos++;
if (oldPos < len && d->atWordSeparator(oldPos)) {
oldPos++;
while (oldPos < len && d->atWordSeparator(oldPos))
@@ -662,8 +665,9 @@ int QTextLayout::nextCursorPosition(int oldPos, CursorMode mode) const
while (oldPos < len && !d->atSpace(oldPos) && !d->atWordSeparator(oldPos))
oldPos++;
}
- while (oldPos < len && d->atSpace(oldPos))
- oldPos++;
+ // Patch: Skip to the end of the current word, not to the start of the next one.
+ //while (oldPos < len && d->atSpace(oldPos))
+ // oldPos++;
}
return oldPos;
@@ -1602,6 +1606,9 @@ namespace {
int currentPosition;
glyph_t previousGlyph;
+ // Patch: Backport a crash fix.
+ QFontEngine *previousGlyphFontEngine;
+
QFixed minw;
QFixed softHyphenWidth;
QFixed rightBearing;
@@ -1634,13 +1641,19 @@ namespace {
if (currentPosition > 0 &&
logClusters[currentPosition - 1] < glyphs.numGlyphs) {
previousGlyph = currentGlyph(); // needed to calculate right bearing later
+
+ // Patch: Backport a crash fix.
+ previousGlyphFontEngine = fontEngine;
}
}
- inline void adjustRightBearing(glyph_t glyph)
+ // Patch: Backport a crash fix.
+ inline void adjustRightBearing(QFontEngine *engine, glyph_t glyph)
{
qreal rb;
- fontEngine->getGlyphBearings(glyph, 0, &rb);
+
+ // Patch: Backport a crash fix.
+ engine->getGlyphBearings(glyph, 0, &rb);
rightBearing = qMin(QFixed(), QFixed::fromReal(rb));
}
@@ -1648,13 +1661,16 @@ namespace {
{
if (currentPosition <= 0)
return;
- adjustRightBearing(currentGlyph());
+
+ // Patch: Backport a crash fix.
+ adjustRightBearing(fontEngine, currentGlyph());
}
inline void adjustPreviousRightBearing()
{
if (previousGlyph > 0)
- adjustRightBearing(previousGlyph);
+ // Patch: Backport a crash fix.
+ adjustRightBearing(previousGlyphFontEngine, previousGlyph);
}
inline void resetRightBearing()
diff --git a/src/gui/text/qtextlayout.h b/src/gui/text/qtextlayout.h
index cbe42c3..b273db7 100644
--- a/src/gui/text/qtextlayout.h
+++ b/src/gui/text/qtextlayout.h
@@ -194,6 +194,9 @@ private:
QRectF *brect, int tabstops, int* tabarray, int tabarraylen,
QPainter *painter);
QTextEngine *d;
+
+ // Patch: Give access to the internal api.
+ friend class TextBlock;
};
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index ca7afb7..25ae500 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -256,6 +256,13 @@ static void getFontDescription(CTFontDescriptorRef font, FontDescription *fd)
fd->foundryName = QStringLiteral("CoreText");
fd->familyName = (CFStringRef) CTFontDescriptorCopyAttribute(font, kCTFontFamilyNameAttribute);
+
+ // Patch: Fix open sans semibold loading.
+ QCFString _displayName = (CFStringRef) CTFontDescriptorCopyAttribute(font, kCTFontDisplayNameAttribute);
+ if (_displayName == QStringLiteral("Open Sans Semibold")) {
+ fd->familyName = _displayName;
+ }
+
fd->styleName = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontStyleNameAttribute);
fd->weight = QFont::Normal;
fd->style = QFont::StyleNormal;
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 92358ec..694fee7 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -213,7 +213,8 @@ static void cleanupCocoaApplicationDelegate()
if (reflectionDelegate) {
if ([reflectionDelegate respondsToSelector:@selector(applicationShouldTerminate:)])
return [reflectionDelegate applicationShouldTerminate:sender];
- return NSTerminateNow;
+ // Patch: Don't terminate if reflectionDelegate does not respond to that selector, just use the default.
+ //return NSTerminateNow;
}
if ([self canQuit]) {
@@ -289,6 +290,11 @@ static void cleanupCocoaApplicationDelegate()
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
+ // Patch: We need to receive this notification in the delegate as well.
+ if (reflectionDelegate
+ && [reflectionDelegate respondsToSelector:@selector(applicationDidFinishLaunching:)])
+ [reflectionDelegate applicationDidFinishLaunching:aNotification];
+
Q_UNUSED(aNotification);
inLaunch = false;
// qt_release_apple_event_handler();
@@ -411,7 +417,9 @@ static void cleanupCocoaApplicationDelegate()
{
Q_UNUSED(replyEvent);
NSString *urlString = [[event paramDescriptorForKeyword:keyDirectObject] stringValue];
- QWindowSystemInterface::handleFileOpenEvent(QUrl(QCFString::toQString(urlString)));
+
+ // Patch: Fix opening of an external url by a protocol handler.
+ QWindowSystemInterface::handleFileOpenEvent(QUrl::fromNSURL([NSURL URLWithString:urlString]));
}
- (void)appleEventQuit:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 9fd05a6..dea6072 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -402,14 +402,24 @@ void QCocoaIntegration::updateScreens()
}
siblings << screen;
}
+
+ // Patch: Backport crash fix from Qt 5.6.1.
+ // Set virtual siblings list. All screens in mScreens are siblings, because we ignored the
+ // mirrors. Note that some of the screens we update the siblings list for here may be deleted
+ // below, but update anyway to keep the to-be-deleted screens out of the siblings list.
+ foreach (QCocoaScreen* screen, mScreens)
+ screen->setVirtualSiblings(siblings);
+
// Now the leftovers in remainingScreens are no longer current, so we can delete them.
foreach (QCocoaScreen* screen, remainingScreens) {
mScreens.removeOne(screen);
delete screen;
}
+
+ // Patch: Backport crash fix from Qt 5.6.1.
// All screens in mScreens are siblings, because we ignored the mirrors.
- foreach (QCocoaScreen* screen, mScreens)
- screen->setVirtualSiblings(siblings);
+ //foreach (QCocoaScreen* screen, mScreens)
+ // screen->setVirtualSiblings(siblings);
}
QCocoaScreen *QCocoaIntegration::screenAtIndex(int index)
diff --git a/src/plugins/platforms/cocoa/qcocoakeymapper.mm b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
index e46eaff..c62db53 100644
--- a/src/plugins/platforms/cocoa/qcocoakeymapper.mm
+++ b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
@@ -382,6 +382,12 @@ bool QCocoaKeyMapper::updateKeyboard()
keyboardInputLocale = QLocale::c();
keyboardInputDirection = Qt::LeftToRight;
}
+
+ // Patch: Backport a fix for layout-independent keyboard shortcuts.
+ const auto newMode = keyboard_mode;
+ deleteLayouts();
+ keyboard_mode = newMode;
+
return true;
}
@@ -464,7 +470,8 @@ QList<int> QCocoaKeyMapper::possibleKeys(const QKeyEvent *event) const
Qt::KeyboardModifiers neededMods = ModsTbl[i];
int key = kbItem->qtKey[i];
if (key && key != baseKey && ((keyMods & neededMods) == neededMods)) {
- ret << int(key + (keyMods & ~neededMods));
+ // Patch: Backport a fix for layout-independent keyboard shortcuts.
+ ret << int(key + neededMods);
}
}
return ret;
diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
index 83c960d..3b9f8d4 100755
--- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
+++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm
@@ -102,7 +102,10 @@ QT_USE_NAMESPACE
QCocoaSystemTrayIcon *systray;
NSStatusItem *item;
QCocoaMenu *menu;
- bool menuVisible;
+
+ // Patch: Nice macOS tray icon support.
+ bool menuVisible, iconSelected;
+
QIcon icon;
QT_MANGLE_NAMESPACE(QNSImageView) *imageCell;
}
@@ -124,6 +127,10 @@ QT_USE_NAMESPACE
QT_MANGLE_NAMESPACE(QNSStatusItem) *parent;
}
-(id)initWithParent:(QT_MANGLE_NAMESPACE(QNSStatusItem)*)myParent;
+
+// Patch: Nice macOS tray icon support.
+-(void)updateIconSelection;
+
-(void)menuTrackingDone:(NSNotification*)notification;
-(void)mousePressed:(NSEvent *)mouseEvent button:(Qt::MouseButton)mouseButton;
@end
@@ -187,6 +194,19 @@ void QCocoaSystemTrayIcon::cleanup()
m_sys = 0;
}
+// Patch: Nice macOS tray icon support.
+namespace {
+
+qreal getDevicePixelRatio() {
+ qreal result = 1.0;
+ foreach (QScreen *screen, QGuiApplication::screens()) {
+ result = qMax(result, screen->devicePixelRatio());
+ }
+ return result;
+}
+
+} // namespace
+
void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon)
{
if (!m_sys)
@@ -194,13 +214,17 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon)
m_sys->item->icon = icon;
- const bool menuVisible = m_sys->item->menu && m_sys->item->menuVisible;
+ // Patch: Nice macOS tray icon support.
+ //const bool menuVisible = m_sys->item->menu && m_sys->item->menuVisible;
CGFloat hgt = [[[NSApplication sharedApplication] mainMenu] menuBarHeight];
- const short scale = hgt - 4;
+
+ // Patch: Nice macOS tray icon support.
+ const short scale = hgt * getDevicePixelRatio();
QPixmap pm = m_sys->item->icon.pixmap(QSize(scale, scale),
- menuVisible ? QIcon::Selected : QIcon::Normal);
+ // Patch: Nice macOS tray icon support.
+ m_sys->item->iconSelected ? QIcon::Selected : QIcon::Normal);
if (pm.isNull()) {
pm = QPixmap(scale, scale);
pm.fill(Qt::transparent);
@@ -322,15 +346,13 @@ QT_END_NAMESPACE
return self;
}
--(void)menuTrackingDone:(NSNotification*)notification
+// Patch: Nice macOS tray icon support.
+-(void)updateIconSelection
{
- Q_UNUSED(notification);
- down = NO;
-
CGFloat hgt = [[[NSApplication sharedApplication] mainMenu] menuBarHeight];
- const short scale = hgt - 4;
-
- QPixmap pm = parent->icon.pixmap(QSize(scale, scale), QIcon::Normal);
+ const short scale = hgt * getDevicePixelRatio();
+ QPixmap pm = parent->icon.pixmap(QSize(scale, scale),
+ parent->iconSelected ? QIcon::Selected : QIcon::Normal);
if (pm.isNull()) {
pm = QPixmap(scale, scale);
pm.fill(Qt::transparent);
@@ -338,9 +360,19 @@ QT_END_NAMESPACE
NSImage *nsaltimage = static_cast<NSImage *>(qt_mac_create_nsimage(pm));
[self setImage: nsaltimage];
[nsaltimage release];
+}
+
+-(void)menuTrackingDone:(NSNotification*)notification
+{
+ Q_UNUSED(notification);
+ down = NO;
parent->menuVisible = false;
+ // Patch: Nice macOS tray icon support.
+ parent->iconSelected = false;
+ [self updateIconSelection];
+
[self setNeedsDisplay:YES];
}
@@ -350,18 +382,9 @@ QT_END_NAMESPACE
int clickCount = [mouseEvent clickCount];
[self setNeedsDisplay:YES];
- CGFloat hgt = [[[NSApplication sharedApplication] mainMenu] menuBarHeight];
- const short scale = hgt - 4;
-
- QPixmap pm = parent->icon.pixmap(QSize(scale, scale),
- parent->menuVisible ? QIcon::Selected : QIcon::Normal);
- if (pm.isNull()) {
- pm = QPixmap(scale, scale);
- pm.fill(Qt::transparent);
- }
- NSImage *nsaltimage = static_cast<NSImage *>(qt_mac_create_nsimage(pm));
- [self setImage: nsaltimage];
- [nsaltimage release];
+ // Patch: Nice macOS tray icon support.
+ parent->iconSelected = (clickCount != 2) && parent->menu;
+ [self updateIconSelection];
if (clickCount == 2) {
[self menuTrackingDone:nil];
@@ -380,6 +403,10 @@ QT_END_NAMESPACE
{
Q_UNUSED(mouseEvent);
[self menuTrackingDone:nil];
+
+ // Patch: Nice macOS tray icon support.
+ parent->iconSelected = false;
+ [self updateIconSelection];
}
- (void)rightMouseDown:(NSEvent *)mouseEvent
@@ -391,6 +418,10 @@ QT_END_NAMESPACE
{
Q_UNUSED(mouseEvent);
[self menuTrackingDone:nil];
+
+ // Patch: Nice macOS tray icon support.
+ parent->iconSelected = false;
+ [self updateIconSelection];
}
- (void)otherMouseDown:(NSEvent *)mouseEvent
@@ -405,7 +436,8 @@ QT_END_NAMESPACE
}
-(void)drawRect:(NSRect)rect {
- [[parent item] drawStatusBarBackgroundInRect:rect withHighlight:down];
+ // Patch: Nice macOS tray icon support.
+ [[parent item] drawStatusBarBackgroundInRect:rect withHighlight:parent->menu ? down : NO];
[super drawRect:rect];
}
@end
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 4d0458a..fde238a 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -167,7 +167,8 @@ static bool isMouseEvent(NSEvent *ev)
if (!self.window.delegate)
return; // Already detached, pending NSAppKitDefined event
- if (pw && pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
+ // Patch: Fix events loss if the window was minimized or hidden.
+ if (pw && pw->frameStrutEventsEnabled() && pw->m_synchedWindowState != Qt::WindowMinimized && pw->m_isExposed && isMouseEvent(theEvent)) {
NSPoint loc = [theEvent locationInWindow];
NSRect windowFrame = [self.window legacyConvertRectFromScreen:[self.window frame]];
NSRect contentFrame = [[self.window contentView] frame];
@@ -914,6 +915,19 @@ void QCocoaWindow::setWindowFilePath(const QString &filePath)
[m_nsWindow setRepresentedFilename: fi.exists() ? QCFString::toNSString(filePath) : @""];
}
+// Patch: Nice macOS window icon.
+namespace {
+
+qreal getDevicePixelRatio() {
+ qreal result = 1.0;
+ foreach (QScreen *screen, QGuiApplication::screens()) {
+ result = qMax(result, screen->devicePixelRatio());
+ }
+ return result;
+}
+
+} // namespace
+
void QCocoaWindow::setWindowIcon(const QIcon &icon)
{
QCocoaAutoReleasePool pool;
@@ -929,7 +943,10 @@ void QCocoaWindow::setWindowIcon(const QIcon &icon)
if (icon.isNull()) {
[iconButton setImage:nil];
} else {
- QPixmap pixmap = icon.pixmap(QSize(22, 22));
+ // Patch: Nice macOS window icon.
+ CGFloat hgt = 16. * getDevicePixelRatio();
+ QPixmap pixmap = icon.pixmap(QSize(hgt, hgt));
+
NSImage *image = static_cast<NSImage *>(qt_mac_create_nsimage(pixmap));
[iconButton setImage:image];
[image release];
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index a18ee7f..1f91feb 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -393,7 +393,9 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
[self notifyWindowStateChanged:newState];
// NSWindowDidOrderOnScreenAndFinishAnimatingNotification is private API, and not
// emitted in 10.6, so we bring back the old behavior for that case alone.
- if (newState == Qt::WindowNoState && QSysInfo::QSysInfo::MacintoshVersion == QSysInfo::MV_10_6)
+
+ // Patch: Fix macOS window show after window was hidden.
+ if (newState == Qt::WindowNoState/* && QSysInfo::QSysInfo::MacintoshVersion == QSysInfo::MV_10_6*/)
m_platformWindow->exposeWindow();
} else if ([notificationName isEqualToString: @"NSWindowDidOrderOffScreenNotification"]) {
m_platformWindow->obscureWindow();
@@ -1300,7 +1302,9 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_8) {
// On 10.8 and above, MayBegin is likely to happen. We treat it the same as an actual begin.
- if (phase == NSEventPhaseMayBegin)
+
+ // Patch: Actual begin should be treated as begin as well.
+ if (phase == NSEventPhaseMayBegin || phase == NSEventPhaseBegan)
ph = Qt::ScrollBegin;
} else
#endif
@@ -1366,14 +1370,22 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
quint32 nativeVirtualKey = [nsevent keyCode];
QChar ch = QChar::ReplacementCharacter;
- int keyCode = Qt::Key_unknown;
- if ([characters length] != 0) {
- if (((modifiers & Qt::MetaModifier) || (modifiers & Qt::AltModifier)) && ([charactersIgnoringModifiers length] != 0))
- ch = QChar([charactersIgnoringModifiers characterAtIndex:0]);
- else
- ch = QChar([characters characterAtIndex:0]);
- keyCode = [self convertKeyCode:ch];
- }
+
+ // Patch: Backport a fix for layout-independent shortcuts.
+ if ([characters length] != 0) // https://bugreports.qt.io/browse/QTBUG-42584
+ ch = QChar([characters characterAtIndex:0]);
+ else if ([charactersIgnoringModifiers length] != 0 && ((modifiers & Qt::MetaModifier) || (modifiers & Qt::AltModifier)))
+ ch = QChar([charactersIgnoringModifiers characterAtIndex:0]);
+
+ int keyCode = [self convertKeyCode:ch];
+ //int keyCode = Qt::Key_unknown;
+ //if ([characters length] != 0) {
+ // if (((modifiers & Qt::MetaModifier) || (modifiers & Qt::AltModifier)) && ([charactersIgnoringModifiers length] != 0))
+ // ch = QChar([charactersIgnoringModifiers characterAtIndex:0]);
+ // else
+ // ch = QChar([characters characterAtIndex:0]);
+ // keyCode = [self convertKeyCode:ch];
+ //}
// we will send a key event unless the input method sets m_sendKeyEvent to false
m_sendKeyEvent = true;
@@ -1437,6 +1449,11 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
&& qtKey == Qt::Key_Period) {
[self handleKeyEvent:nsevent eventType:int(QEvent::KeyPress)];
return YES;
+
+ // Patch: Allow us to handle Ctrl+Tab and Ctrl+Backtab in the app.
+ } else if ([nsevent modifierFlags] & NSControlKeyMask && (qtKey == Qt::Key_Tab || qtKey == Qt::Key_Backtab)) {
+ [self handleKeyEvent:nsevent eventType:int(QEvent::KeyPress)];
+ return YES;
}
}
return [super performKeyEquivalent:nsevent];
diff --git a/src/tools/qlalr/lalr.cpp b/src/tools/qlalr/lalr.cpp
index c680764..e2a7aaf 100644
--- a/src/tools/qlalr/lalr.cpp
+++ b/src/tools/qlalr/lalr.cpp
@@ -246,11 +246,13 @@ void Grammar::buildExtendedGrammar ()
non_terminals.insert (accept_symbol);
}
-struct _Nullable: public std::unary_function<Name, bool>
+// Patch: Fix building with the new SDK.
+struct __Nullable: public std::unary_function<Name, bool>
{
Automaton *_M_automaton;
- _Nullable (Automaton *aut):
+ // Patch: Fix building with the new SDK.
+ __Nullable (Automaton *aut):
_M_automaton (aut) {}
bool operator () (Name name) const
@@ -308,7 +310,8 @@ void Automaton::buildNullables ()
for (RulePointer rule = _M_grammar->rules.begin (); rule != _M_grammar->rules.end (); ++rule)
{
- NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (_Nullable (this)));
+ // Patch: Fix building with the new SDK.
+ NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (__Nullable (this)));
if (nn == rule->rhs.end ())
changed |= nullables.insert (rule->lhs).second;
@@ -643,7 +646,8 @@ void Automaton::buildIncludesDigraph ()
if (! _M_grammar->isNonTerminal (*A))
continue;
- NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (_Nullable (this)));
+ // Patch: Fix building with the new SDK.
+ NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (__Nullable (this)));
if (first_not_nullable != rule->rhs.end ())
continue;
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 7396808..87b4978 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -7983,7 +7983,8 @@ bool QWidget::event(QEvent *event)
case QEvent::KeyPress: {
QKeyEvent *k = (QKeyEvent *)event;
bool res = false;
- if (!(k->modifiers() & (Qt::ControlModifier | Qt::AltModifier))) { //### Add MetaModifier?
+ // Patch: Allow us to handle Ctrl+Tab and Ctrl+Backtab in the app.
+ if (!(k->modifiers() & (Qt::ControlModifier | Qt::AltModifier | Qt::MetaModifier))) { //### Add MetaModifier?
if (k->key() == Qt::Key_Backtab
|| (k->key() == Qt::Key_Tab && (k->modifiers() & Qt::ShiftModifier)))
res = focusNextPrevChild(false);
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 0845a5e..5735cb6 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -3667,9 +3667,11 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
NSBezierPath *pushButtonFocusRingPath;
if (bdi.kind == kThemeBevelButton)
- pushButtonFocusRingPath = [NSBezierPath bezierPathWithRect:focusRect];
+ // Patch: Fix building with the new SDK.
+ pushButtonFocusRingPath = [NSBezierPath bezierPathWithRect:NSRectFromCGRect(focusRect)];
else
- pushButtonFocusRingPath = [NSBezierPath bezierPathWithRoundedRect:focusRect xRadius:4 yRadius:4];
+ // Patch: Fix building with the new SDK.
+ pushButtonFocusRingPath = [NSBezierPath bezierPathWithRoundedRect:NSRectFromCGRect(focusRect) xRadius:4 yRadius:4];
qt_drawFocusRingOnPath(cg, pushButtonFocusRingPath);
}
diff --git a/src/widgets/util/qsystemtrayicon_qpa.cpp b/src/widgets/util/qsystemtrayicon_qpa.cpp
index f98aeaf..00c0734 100644
--- a/src/widgets/util/qsystemtrayicon_qpa.cpp
+++ b/src/widgets/util/qsystemtrayicon_qpa.cpp
@@ -99,13 +99,18 @@ void QSystemTrayIconPrivate::updateIcon_sys()
void QSystemTrayIconPrivate::updateMenu_sys()
{
- if (qpa_sys && menu) {
- if (!menu->platformMenu()) {
- QPlatformMenu *platformMenu = qpa_sys->createMenu();
- if (platformMenu)
- menu->setPlatformMenu(platformMenu);
+ // Patch: Nice macOS tray icon support.
+ if (qpa_sys) {
+ if (menu) {
+ if (!menu->platformMenu()) {
+ QPlatformMenu *platformMenu = qpa_sys->createMenu();
+ if (platformMenu)
+ menu->setPlatformMenu(platformMenu);
+ }
+ qpa_sys->updateMenu(menu->platformMenu());
+ } else {
+ qpa_sys->updateMenu(0);
}
- qpa_sys->updateMenu(menu->platformMenu());
}
}
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index 75f3059..980f2be 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -1867,7 +1867,8 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event)
if (unknown && !isReadOnly()) {
QString t = event->text();
- if (!t.isEmpty() && t.at(0).isPrint()) {
+ // Patch: Enable ZWJ and ZWNJ characters to be in text input.
+ if (!t.isEmpty() && (t.at(0).isPrint() || t.at(0).unicode() == 0x200C || t.at(0).unicode() == 0x200D)) {
insert(t);
#ifndef QT_NO_COMPLETER
complete(event->key());
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index 96438a0..b0b7206 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -1342,7 +1342,8 @@ void QWidgetTextControlPrivate::keyPressEvent(QKeyEvent *e)
process:
{
QString text = e->text();
- if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t'))) {
+ // Patch: Enable ZWJ and ZWNJ characters to be in text input.
+ if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t') || text.at(0).unicode() == 0x200C || text.at(0).unicode() == 0x200D)) {
if (overwriteMode
// no need to call deleteChar() if we have a selection, insertText
// does it already

View File

@@ -1,3 +1,17 @@
diff --git a/configure b/configure
index 7651e29..11e6f90 100755
--- a/configure
+++ b/configure
@@ -527,7 +527,8 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then
exit 2
fi
- if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
+ # Patch: Fix Qt for working with Xcode 8.
+ if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
echo >&2
echo " Xcode not set up properly. You may need to confirm the license" >&2
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index eec9e1f..ec3015e 100644
--- a/mkspecs/common/msvc-desktop.conf
@@ -16,6 +30,21 @@ index eec9e1f..ec3015e 100644
QMAKE_CFLAGS_YACC =
QMAKE_CFLAGS_LTCG = -GL
QMAKE_CFLAGS_SSE2 = -arch:SSE2
diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
index 0cc8cd6..ca9725b 100644
--- a/mkspecs/features/mac/default_pre.prf
+++ b/mkspecs/features/mac/default_pre.prf
@@ -12,7 +12,9 @@ isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
# Make sure Xcode is set up properly
- isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
+
+ # Patch: Fix Qt for working with Xcode 8.
+ isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
}
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index f1a6019..81ff6ef 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
@@ -47,6 +76,20 @@ index 14e4fd1..c31c62b 100644
{ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 14, 9, 11, 11 },
{ 3, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 14, 9, 11, 11 },
{ 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 14, 9, 11, 11 },
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index b0ef2a2..7d5f7bc 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -51,6 +51,9 @@ static const char screenFactorsEnvVar[] = "QT_SCREEN_SCALE_FACTORS";
static inline qreal initialGlobalScaleFactor()
{
+ // Disable environment variable dpi scaling changing.
+ // It is not supported by Telegram Desktop :(
+ return 1.;
qreal result = 1;
if (qEnvironmentVariableIsSet(scaleFactorEnvVar)) {
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h
index 5b2f4ec..346a26f 100644
--- a/src/gui/kernel/qplatformdialoghelper.h
@@ -11236,7 +11279,7 @@ index faea54b..7d85080 100644
contains(QT_CONFIG, xcb-plugin): SUBDIRS += compose
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index caa8884..b083e65 100644
index caa8884..72941e4 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -210,7 +210,8 @@ QT_END_NAMESPACE
@@ -11249,6 +11292,23 @@ index caa8884..b083e65 100644
}
if ([self canQuit]) {
@@ -287,11 +288,15 @@ QT_END_NAMESPACE
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
+ // We need to catch that notification in delegate.
+ if (reflectionDelegate
+ && [reflectionDelegate respondsToSelector:@selector(applicationDidFinishLaunching:)])
+ [reflectionDelegate applicationDidFinishLaunching:aNotification];
+
Q_UNUSED(aNotification);
inLaunch = false;
// qt_release_apple_event_handler();
-
// Insert code here to initialize your application
}
diff --git a/src/plugins/platforms/cocoa/qcocoabackingstore.h b/src/plugins/platforms/cocoa/qcocoabackingstore.h
index 5a199de..5622728 100644
--- a/src/plugins/platforms/cocoa/qcocoabackingstore.h

View File

@@ -0,0 +1,47 @@
diff --git a/src/3rdparty/libwebp/src/dec/vp8l.c b/src/3rdparty/libwebp/src/dec/vp8l.c
index ea0254d..953ff01 100644
--- a/src/3rdparty/libwebp/src/dec/vp8l.c
+++ b/src/3rdparty/libwebp/src/dec/vp8l.c
@@ -12,7 +12,7 @@
// Authors: Vikas Arora (vikaas.arora@gmail.com)
// Jyrki Alakuijala (jyrki@google.com)
-#include <stdio.h>
+// Patch: Backport of a crash fix.
#include <stdlib.h>
#include "./alphai.h"
#include "./vp8li.h"
@@ -740,6 +740,10 @@ static int DecodeAlphaData(VP8LDecoder* const dec, uint8_t* const data,
const int len_code_limit = NUM_LITERAL_CODES + NUM_LENGTH_CODES;
const int mask = hdr->huffman_mask_;
assert(htree_group != NULL);
+
+ // Patch: Backport of a crash fix.
+ assert(pos < end);
+
assert(last_row <= height);
assert(Is8bOptimizable(hdr));
@@ -830,6 +834,10 @@ static int DecodeImageData(VP8LDecoder* const dec, uint32_t* const data,
(hdr->color_cache_size_ > 0) ? &hdr->color_cache_ : NULL;
const int mask = hdr->huffman_mask_;
assert(htree_group != NULL);
+
+ // Patch: Backport of a crash fix.
+ assert(src < src_end);
+
assert(src_last <= src_end);
while (!br->eos_ && src < src_last) {
@@ -1294,6 +1302,11 @@ int VP8LDecodeAlphaImageStream(ALPHDecoder* const alph_dec, int last_row) {
assert(dec->action_ == READ_DATA);
assert(last_row <= dec->height_);
+ // Patch: Backport of a crash fix.
+ if (dec->last_pixel_ == dec->width_ * dec->height_) {
+ return 1; // done
+ }
+
// Decode (with special row processing).
return alph_dec->use_8b_decode ?
DecodeAlphaData(dec, (uint8_t*)dec->pixels_, dec->width_, dec->height_,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -41,15 +41,6 @@ transparent: #fff0;
white: #fff;
black: #000;
color1: #c03d33; // red
color2: #4fad2d; // green
color3: #d09306; // yellow
color4: #348cd4; // blue
color5: #8544d6; // purple
color6: #cd4073; // pink
color7: #2996ad; // sea
color8: #ce671b; // orange
wndMinWidth: 380px;
adaptiveNormalWidth: 640px;
@@ -68,7 +59,7 @@ semiboldButtonBlueText: #2b99d5;
wndMinHeight: 480px;
wndDefWidth: 800px;
wndDefHeight: 600px;
wndShadow: sprite(209px, 46px, 19px, 19px);
wndShadow: icon {{ "window_shadow", windowShadowFg }};
wndShadowShift: 1px;
layerAlpha: 0.5;
@@ -100,15 +91,6 @@ boxTitleFont: font(boxFontSize bold);
boxTitlePosition: point(26px, 28px);
boxTitleHeight: 54px;
boxBlueTitleBg: #6393b5;
boxBlueTitleAdditionalFg: #dae9f5;
boxBlueTitleAdditionalSkip: 12px;
boxBlueTitlePosition: point(23px, 18px);
boxBlueCloseIcon: sprite(120px, 108px, 12px, 12px);
boxBlueCloseBg: #c8e1f0;
boxBlueCloseDuration: 150;
boxBlueShadow: sprite(132px, 108px, 1px, 4px);
boxButtonFont: font(boxFontSize semibold);
defaultBoxButton: RoundButton {
textFg: #2f9fea;
@@ -202,6 +184,7 @@ defaultInputArea: InputArea {
heightMax: 128px;
}
defaultInputField: InputField {
textBg: white;
textFg: black;
textMargins: margins(0px, 6px, 0px, 4px);
textAlign: align(topleft);
@@ -225,15 +208,6 @@ defaultInputField: InputField {
height: 32px;
}
dialogsSearchField: InputField(defaultInputField) {
textMargins: margins(34px, 7px, 34px, 7px);
iconSprite: sprite(227px, 21px, 24px, 24px);
iconPosition: point(6px, 5px);
width: 240px;
height: 34px;
}
defaultCheckbox: Checkbox {
textFg: black;
textBg: white;
@@ -248,9 +222,7 @@ defaultCheckbox: Checkbox {
textPosition: point(32px, 2px);
diameter: 22px;
thickness: 2px;
checkIcon: icon {
{ "default_checkbox_check", #ffffff, point(4px, 7px) }
};
checkIcon: icon {{ "default_checkbox_check", #ffffff, point(4px, 7px) }};
font: normalFont;
duration: 120;
@@ -300,10 +272,11 @@ solidScroll: flatScroll {
duration: 150;
hiding: 0;
}
defaultDropdownShadow: icon {{ "dropdown_shadow", windowShadowFg }};
defaultPopupMenu: PopupMenu {
skip: 5px;
shadow: sprite(241px, 46px, 6px, 6px);
shadow: defaultDropdownShadow;
shadowShift: 1px;
itemBg: white;
@@ -322,7 +295,7 @@ defaultPopupMenu: PopupMenu {
separatorWidth: 1px;
separatorFg: #f1f1f1;
arrow: sprite(0px, 126px, 4px, 7px);
arrow: icon {{ "dropdown_submenu_arrow", #373737 }};
duration: 120;
@@ -353,53 +326,8 @@ boxScroll: flatScroll(solidScroll) {
boxScrollSkip: 6px;
boxScrollShadowBg: #00000012;
boxSearchField: InputField(defaultInputField) {
textMargins: margins(41px, 16px, 41px, 0px);
placeholderFg: #999;
placeholderFgActive: #aaa;
placeholderMargins: margins(4px, 0px, 4px, 0px);
border: 0px;
borderActive: 0px;
borderError: 0px;
height: 48px;
iconSprite: sprite(227px, 21px, 24px, 24px);
iconPosition: point(15px, 14px);
font: normalFont;
}
boxSearchCancel: iconedButton {
color: white;
bgColor: white;
overBgColor: white;
font: font(fsize);
opacity: 0.3;
overOpacity: 0.4;
textPos: point(0px, 0px);
downTextPos: point(0px, 0px);
duration: 150;
cursor: cursor(pointer);
icon: sprite(133px, 108px, 12px, 12px);
iconPos: point(8px, 18px);
downIcon: sprite(133px, 108px, 12px, 12px);
downIconPos: point(8px, 18px);
width: 41px;
height: 48px;
}
titleBG: #6389a8;
titleColor: #0f8dcc;//rgb(20, 136, 210);
titleBg: #6389a8;
titleHeight: 39px;
titleIconPos: point(7px, 7px);
titleIconImg: sprite(161px, 100px, 26px, 26px);
titleFont: font(17px);
titlePos: point(44px, 29px);
titleMenuOffset: 36px;
@@ -440,50 +368,35 @@ btnDefIconed: iconedButton {
cursor: cursor(pointer);
}
titleButtonFg: #c4d8e9;
titleButtonActiveFg: #ffffff;
titleButtonDuration: 150;
sysBtnDelta: 6px;
sysUpd: sysButton {
size: size(31px, 39px);
img: sprite(184px, 1px, 19px, 19px);
color: #c4d8e9;
overColor: white;
duration: 150;
icon: icon {{ "title_button_update", titleBg }};
color: titleButtonFg;
overColor: titleButtonActiveFg;
duration: titleButtonDuration;
}
updateBlinkDuration: 500;
sysMin: sysButton(sysUpd) {
img: sprite(207px, 1px, 19px, 19px);
icon: icon {{ "title_button_minimize", titleBg }};
}
sysMax: sysButton(sysUpd) {
img: sprite(230px, 1px, 19px, 19px);
icon: icon {{ "title_button_maximize", titleBg }};
}
sysRes: sysButton(sysUpd) {
img: sprite(253px, 1px, 19px, 19px);
icon: icon {{ "title_button_restore", titleBg }};
}
sysCls: sysButton(sysUpd) {
img: sprite(276px, 1px, 19px, 19px);
icon: icon {{ "title_button_close", titleBg }};
}
sysLock: sysButton(sysUpd) {
img: sprite(184px, 22px, 19px, 19px);
icon: icon {{ "title_button_lock", titleBg }};
}
sysUnlock: sysButton(sysUpd) {
img: sprite(207px, 22px, 19px, 19px);
}
titleBackButton: iconedButton(btnDefIconed) {
icon: sprite(9px, 104px, 13px, 20px);
iconPos: point(5px, 9px);
downIcon: sprite(9px, 104px, 13px, 20px);
downIconPos: point(5px, 10px);
bgColor: #c4d8e9;
overBgColor: #fff;
width: -30px;
height: 39px;
opacity: 1.;
cursor: cursor(default);
textPos: point(23px, 10px);
downTextPos: point(23px, 11px);
icon: icon {{ "title_button_unlock", titleBg }};
}
btnWhiteHover: #f5f5f5;
@@ -556,37 +469,6 @@ btnDefLink: linkButton {
overFont: linkOverFont;
}
cbDefFlat: flatCheckbox {
textColor: #000;
bgColor: transparent;
disColor: #999;
height: 22px;
textTop: 1px;
textLeft: 34px;
font: font(fsize);
duration: 200;
bgFunc: transition(easeOutCirc);
cursor: cursor(pointer);
disabledCursor: cursor(default);
imageRect: sprite(142px, 43px, 22px, 22px);
chkImageRect: sprite(120px, 68px, 22px, 22px);
overImageRect: sprite(142px, 68px, 22px, 22px);
chkOverImageRect: sprite(120px, 68px, 22px, 22px);
disImageRect: sprite(142px, 43px, 22px, 22px);
chkDisImageRect: sprite(120px, 43px, 22px, 22px);
imagePos: point(0px, 0px);
}
rbDefFlat: flatCheckbox(cbDefFlat) {
chkImageRect: sprite(165px, 68px, 22px, 22px);
chkOverImageRect: sprite(165px, 68px, 22px, 22px);
chkDisImageRect: sprite(165px, 43px, 22px, 22px);
}
inpDefFont: font(17px);
inpDefFlat: flatInput {
textColor: #000;
@@ -738,7 +620,7 @@ btnIntroNext: flatButton(btnDefNext, btnDefBig) {
radius: buttonRadius;
}
boxShadow: sprite(363px, 50px, 15px, 15px);
boxShadow: icon {{ "box_shadow", windowShadowFg }};
boxShadowShift: 2px;
introCountry: countryInput {
@@ -814,28 +696,7 @@ introErrLabel: flatLabel(labelDefFlat) {
align: align(center);
}
setWidth: 356px;
setTop: 26px;
setNameLeft: 3px;
setNameTop: 5px;
setNameFont: font(18px);
setStatusTop: 35px;
setStatusLeft: 3px;
setStatusFont: font(14px);
setPhotoSize: 120px;
setHeaderFont: font(17px);
setHeaderColor: black;
setHeaderSkip: 60px;
setHeaderLeft: -1px;
setHeaderTop: 26px;
setLittleSkip: 9px;
setSectionSkip: 25px;
setContactInfoLeft: 150px;
setVersionHeight: 41px;
setVersionLeft: 36px;
setVersionTop: 3px;
setVersionColor: #999;
setBottom: 130px;
setScroll: flatScroll(scrollDef) {
bottomsh: 0px;
topsh: 0px;
@@ -852,113 +713,25 @@ setClose: iconedButton(btnDefIconed) {
height: 43px;
}
setClosePos: point(32px, 32px);
setPhotoImg: sprite(0px, 218px, 120px, 120px);
setOverPhotoImg: sprite(122px, 218px, 120px, 120px);
setPhotoDuration: 150;
setPadding: 26px;
setBG: #FFF;
setSh: #000;
setTitleFrom: point(20px, 20px);
setTitleFont: font(24px);
setTitleColor: #000;
setNameInput: flatInput(inpDefFlat) {
font: font(fsize);
height: 25px;
width: 170px;
textMrg: margins(3px, 3px, 3px, 3px);
}
setErrBG: #ffa5a5;
setErrColor: #d84d4d;
setErrHeight: 30px;
setErrFont: font(fsize);
setGoodColor: #4ab44a;
setBackgroundSize: 120px;
btnSetUpload: flatButton(btnDefNext, btnDefBig) {
width: 206px;
height: 42px;
font: font(18px);
overFont: font(18px);
textTop: 9px;
overTextTop: 9px;
downTextTop: 10px;
}
btnEditSave: flatButton(btnSetUpload) {
width: 115px;
}
btnEditCancel: flatButton(btnDefFlat, btnDefBig) {
color: #666d78;
overColor: #666d78;
downColor: #50565e;
bgColor: rgba(0, 0, 0, 63);
overBgColor: rgba(0, 0, 0, 47);
downBgColor: rgba(0, 0, 0, 95);
width: 115px;
height: 40px;
textTop: 9px;
overTextTop: 9px;
downTextTop: 10px;
font: font(18px);
overFont: font(18px);
}
btnLogout: flatButton(btnDefFlat, btnDefBig) {
color: white;
overColor: white;
downColor: white;
bgColor: #db6352;
overBgColor: #d15948;
downBgColor: #c74d3b;
width: 148px;
height: 42px;
textTop: 8px;
overTextTop: 8px;
downTextTop: 9px;
font: font(18px);
overFont: font(18px);
}
searchFlatInput: flatInput(inpDefGray) {
font: font(fsize);
bgColor: #f2f2f2;
phColor: #949494;
phFocusColor: #a4a4a4;
imgRect: sprite(227px, 21px, 24px, 24px);
}
noContactsHeight: 100px;
noContactsFont: font(fsize);
noContactsColor: #777;
dlgDblCheckImg: sprite(302px, 23px, 17px, 11px);
dlgCheckImg: sprite(320px, 23px, 17px, 11px);
dlgActiveDblCheckImg: sprite(302px, 36px, 17px, 11px);
dlgActiveCheckImg: sprite(320px, 36px, 17px, 11px);
dlgSendImg: sprite(122px, 25px, 17px, 11px);
dlgActiveSendImg: sprite(142px, 25px, 17px, 11px);
dlgFilter: flatInput(inpDefGray) {
font: font(fsize);
bgColor: #f2f2f2;
phColor: #949494;
phFocusColor: #a4a4a4;
icon: icon {{ "box_search_icon", #aaaaaa, point(10px, 9px) }};
dlgChatImg: sprite(104px, 26px, 16px, 11px);
dlgActiveChatImg: sprite(104px, 37px, 16px, 11px);
dlgChannelImg: sprite(105px, 1px, 12px, 11px);
dlgActiveChannelImg: sprite(105px, 14px, 12px, 11px);
dlgFilter: flatInput(searchFlatInput) {
width: 240px;
height: 34px;
textMrg: margins(34px, 2px, 34px, 4px);
imgPos: point(6px, 5px);
}
topBarHeight: 54px;
@@ -1079,9 +852,7 @@ msgReplyPadding: margins(6px, 6px, 11px, 6px);
msgReplyBarPos: point(1px, 0px);
msgReplyBarSize: size(2px, 36px);
msgReplyBarSkip: 10px;
msgOutReplyBarColor: #5dc452;
msgInReplyBarColor: #2fa9e2;
msgOutReplyBarSelColor: #4da79f;
msgInReplyBarSelColor: #2fa9e2;
msgBotKbDuration: 200;
@@ -1115,28 +886,7 @@ msgPtr: 8px;
msgBG: ":/gui/art/bg.jpg";
msgBG0: ":/gui/art/bg0.png";
msgCheckPos: point(3px, 1px);
msgSendingImg: sprite(260px, 20px, 20px, 20px);
msgCheckImg: sprite(320px, 0px, 20px, 20px);
msgDblCheckImg: sprite(300px, 0px, 20px, 20px);
msgSelectCheckImg: sprite(162px, 0px, 20px, 20px);
msgSelectDblCheckImg: sprite(142px, 0px, 20px, 20px);
msgViewsPos: point(0px, -4px);
msgViewsImg: sprite(104px, 48px, 16px, 11px);
msgSelectViewsImg: sprite(104px, 70px, 16px, 11px);
msgOutViewsImg: sprite(104px, 81px, 16px, 11px);
msgSelectOutViewsImg: sprite(104px, 92px, 16px, 11px);
msgSendingViewsImg: sprite(104px, 103px, 16px, 11px);
msgSendingOutViewsImg: sprite(104px, 125px, 16px, 11px);
msgInvSendingImg: sprite(320px, 65px, 20px, 20px);
msgInvCheckImg: sprite(280px, 20px, 20px, 20px);
msgInvDblCheckImg: sprite(300px, 65px, 20px, 20px);
msgInvViewsImg: sprite(104px, 59px, 16px, 11px);
msgInvSendingViewsImg: sprite(104px, 114px, 16px, 11px);
msgDateSpace: 19px;
msgDateCheckSpace: 4px;
msgDateViewsSpace: 11px;
msgDateSpace: 12px;
msgDateDelta: point(2px, 5px);
msgDateImgDelta: 4px;
@@ -1147,9 +897,6 @@ msgDateImgBgSelected: #1c4a7187;
msgDateImgPadding: point(8px, 2px);
msgDateImgCheckSpace: 4px;
msgDogImg: sprite(216px, 92px, 126px, 126px);
historyPadding: 10px;
collapseButton: flatButton(btnDefFlat) {
font: msgServiceFont;
overFont: msgServiceFont;
@@ -1232,7 +979,7 @@ introErrLabelTextStyle: textStyle(defaultTextStyle) {
mediaPadding: margins(0px, 0px, 0px, 0px);//1px, 1px, 1px, 1px);//2px, 2px, 2px, 2px);
mediaCaptionSkip: 5px;
mediaHeaderSkip: 5px;
mediaInBubbleSkip: 5px;
mediaThumbSize: 48px;
mediaNameTop: 3px;
mediaDetailsShift: 3px;
@@ -1296,31 +1043,6 @@ msgFileOutBg: #78c67f;
msgFileOutBgOver: #6bc272;
msgFileOutBgSelected: #5fb389;
msgFileOutImage: sprite(0px, 146px, 18px, 18px);
msgFileOutImageSelected: sprite(18px, 146px, 18px, 18px);
msgFileInImage: sprite(0px, 164px, 18px, 18px);
msgFileInImageSelected: sprite(18px, 164px, 18px, 18px);
msgFileOutFile: sprite(36px, 146px, 18px, 18px);
msgFileOutFileSelected: sprite(54px, 146px, 18px, 18px);
msgFileInFile: sprite(36px, 164px, 18px, 18px);
msgFileInFileSelected: sprite(54px, 164px, 18px, 18px);
msgFileOutDownload: sprite(72px, 142px, 14px, 20px);
msgFileOutDownloadSelected: sprite(86px, 142px, 14px, 20px);
msgFileInDownload: sprite(72px, 162px, 14px, 20px);
msgFileInDownloadSelected: sprite(86px, 162px, 14px, 20px);
msgFileOutCancel: sprite(100px, 147px, 16px, 16px);
msgFileOutCancelSelected: sprite(116px, 147px, 16px, 16px);
msgFileInCancel: sprite(100px, 165px, 16px, 16px);
msgFileInCancelSelected: sprite(116px, 165px, 16px, 16px);
msgFileOutPause: sprite(132px, 147px, 14px, 16px);
msgFileOutPauseSelected: sprite(146px, 147px, 14px, 16px);
msgFileInPause: sprite(132px, 165px, 14px, 16px);
msgFileInPauseSelected: sprite(146px, 165px, 14px, 16px);
msgFileOutPlay: sprite(160px, 146px, 20px, 18px);
msgFileOutPlaySelected: sprite(180px, 146px, 20px, 18px);
msgFileInPlay: sprite(160px, 164px, 20px, 18px);
msgFileInPlaySelected: sprite(180px, 164px, 20px, 18px);
msgFileRed: sprite(0px, 425px, 20px, 20px);
msgFileYellow: sprite(20px, 425px, 20px, 20px);
msgFileGreen: sprite(40px, 425px, 20px, 20px);
@@ -1418,12 +1140,12 @@ btnBotKbHide: iconedButton(btnAttachEmoji) {
downIcon: sprite(373px, 95px, 23px, 14px);
downIconPos: point(5px, 17px);
}
broadcastToggle: flatCheckbox {
silentToggle: flatCheckbox {
textColor: black;
bgColor: white;
disColor: black;
width: 34px;
width: 33px;
height: 46px;
duration: 200;
bgFunc: transition(easeOutCirc);
@@ -1431,24 +1153,14 @@ broadcastToggle: flatCheckbox {
font: normalFont;
imageRect: sprite(18px, 125px, 22px, 21px);
chkImageRect: sprite(40px, 125px, 22px, 21px);
overImageRect: sprite(40px, 104px, 22px, 21px);
chkOverImageRect: sprite(40px, 125px, 22px, 21px);
disImageRect: sprite(18px, 125px, 22px, 21px);
chkDisImageRect: sprite(18px, 125px, 22px, 21px);
imagePos: point(6px, 12px);
}
silentToggle: flatCheckbox(broadcastToggle) {
width: 33px;
imageRect: sprite(354px, 242px, 21px, 21px);
chkImageRect: sprite(354px, 221px, 21px, 21px);
overImageRect: sprite(375px, 242px, 21px, 21px);
chkOverImageRect: sprite(375px, 221px, 21px, 21px);
disImageRect: sprite(354px, 242px, 21px, 21px);
chkDisImageRect: sprite(354px, 221px, 21px, 21px);
imagePos: point(6px, 12px);
}
btnRecordAudio: sprite(379px, 390px, 16px, 24px);
btnRecordAudioActive: sprite(379px, 366px, 16px, 24px);
@@ -1505,7 +1217,7 @@ textRectMargins: margins(-2px, -1px, -2px, -1px);
taMsgField: flatTextarea(taDefFlat) {
font: msgFont;
}
maxFieldHeight: 220px;
maxFieldHeight: 224px;
// historyMinHeight: 56px;
reportSpamHide: flatButton(btnDefFlat) {
@@ -1564,9 +1276,6 @@ layerPadding: margins(10px, 10px, 10px, 10px);
contactPadding: margins(49px, 22px, 0px, 6px);
contactSkip: 13px;
contactPhoneSkip: 30px;
contactUserIcon: sprite(120px, 90px, 18px, 18px);
contactPhoneIcon: sprite(138px, 90px, 18px, 18px);
contactIconTop: 10px;
contactsPhotoSize: 42px;
contactsPadding: margins(16px, 7px, 16px, 7px);
@@ -1578,15 +1287,7 @@ contactsStatusFg: #999999;
contactsStatusFgOver: #7c99b2;
contactsStatusFgOnline: #3b8dcc;
contactsBgOver: overBg;
contactsBgActive: #6f9cbd;
contactsCheckPosition: point(8px, 16px);
contactsCheckIcon: sprite(187px, 61px, 18px, 14px);
contactsCheckActiveIcon: sprite(187px, 75px, 18px, 14px);
contactsNewItemHeight: 53px;
contactsNewItemIcon: sprite(307px, 248px, 22px, 16px);
contactsNewItemIconPosition: point(29px, 19px);
contactsNewItemTop: 18px;
contactsNewItemFg: #4b82af;
contactsAboutBg: #f7f7f7;
contactsAboutShadow: #0000001F;
contactsAdminCheckbox: Checkbox(defaultBoxCheckbox) {
@@ -1616,15 +1317,7 @@ btnCancelSearch: iconedButton(btnAddContact) {
downIcon: sprite(188px, 43px, 18px, 18px);
}
notifyBG: white;
notifyBorder: #f1f1f1;
notifyBorderWidth: 1px;
notifySlowHide: 4000;
notifyPhotoSize: 62px;
notifyMacPhotoSize: 64px;
notifyPhotoPos: point(9px, 9px);
notifyClosePos: point(1px, 2px);
notifyClose: iconedButton(btnDefIconed) {
simpleClose: iconedButton(btnDefIconed) {
icon: sprite(167px, 130px, 10px, 10px);
iconPos: point(10px, 10px);
downIcon: sprite(167px, 130px, 10px, 10px);
@@ -1633,17 +1326,6 @@ notifyClose: iconedButton(btnDefIconed) {
width: 30px;
height: 30px;
}
notifyItemTop: 12px;
notifyTextLeft: 12px;
notifyTextTop: 7px;
notifySlowHideFunc: transition(easeInCirc);
notifyWaitShortHide: 0;
notifyWaitLongHide: 20000;
notifyFastAnim: 150;
notifyWidth: 316px;
notifyHeight: 80px;
notifyDeltaX: 6px;
notifyDeltaY: 7px;
boxPhotoPadding: margins(28px, 28px, 28px, 18px);
boxPhotoCompressedPadding: margins(0px, 2px, 0px, 22px);
@@ -1745,19 +1427,15 @@ dropdownDef: dropdown {
borderColor: #ebebeb;
padding: margins(10px, 10px, 10px, 10px);
shadow: sprite(241px, 46px, 6px, 6px);
shadow: defaultDropdownShadow;
shadowShift: 1px;
duration: 150;
width: 0px;
}
defaultInnerDropdownShadow: icon {
{ "dropdown_shadow", windowShadowFg },
};
defaultInnerDropdown: InnerDropdown {
padding: margins(10px, 10px, 10px, 10px);
shadow: defaultInnerDropdownShadow;
shadow: defaultDropdownShadow;
shadowShift: 1px;
duration: 150;
@@ -1816,13 +1494,6 @@ dragPadding: margins(20px, 10px, 20px, 10px);
dragHeight: 72px;
dpiSlider: slider {
color: #ccc;
thickness: 2px;
width: 260px;
bar: sprite(0px, 104px, 9px, 22px);
}
dpiActive: black;
dpiInactive: #999;
dpiFont1: linkFont;
@@ -1866,6 +1537,8 @@ emojiSymbolsActive: sprite(287px, 286px, 21px, 22px);
stickersSettings: sprite(140px, 124px, 21px, 22px);
savedGifsOver: sprite(329px, 286px, 21px, 22px);
savedGifsActive: sprite(350px, 286px, 21px, 22px);
featuredStickersOver: sprite(329px, 264px, 21px, 22px);
featuredStickersActive: sprite(350px, 264px, 21px, 22px);
stickersSettingsUnreadSize: 17px;
stickersSettingsUnreadPosition: point(4px, 5px);
@@ -1993,10 +1666,6 @@ stickerPreviewDuration: 150;
stickerPreviewBg: #FFFFFFB0;
stickerPreviewMin: 0.1;
verifiedCheck: sprite(285px, 221px, 14px, 14px);
verifiedCheckInv: sprite(299px, 221px, 14px, 14px);
verifiedCheckPos: point(4px, 2px);
botKbDuration: 200;
botKbBg: #edf1f5;
botKbOverBg: #d8e2ec;
@@ -2055,14 +1724,8 @@ mvControlMargin: 0px;
mvControlSize: 90px;
mvIconSize: size(60px, 56px);
mvLeft: sprite(320px, 445px, 12px, 22px);
mvRight: sprite(332px, 445px, 12px, 22px);
mvClose: sprite(344px, 445px, 18px, 18px);
mvSave: sprite(362px, 445px, 14px, 19px);
mvMore: sprite(376px, 445px, 5px, 21px);
mvDropdown: dropdown(dropdownDef) {
shadow: sprite(0px, 0px, 0px, 0px);
shadow: icon {};
padding: margins(11px, 12px, 11px, 12px);
border: 0px;
@@ -2087,7 +1750,7 @@ mvButton: iconedButton(btnDefIconed) {
duration: 0;
}
mvPopupMenu: PopupMenu(defaultPopupMenu) {
shadow: sprite(0px, 0px, 0px, 0px);
shadow: icon {};
itemBg: #383838;
itemBgOver: #505050;
@@ -2122,10 +1785,6 @@ mvDocExtFont: font(semibold 18px);
mvDocExtColor: white;
mvDocExtPadding: 10px;
mvDocLinksTop: 57px;
mvDocRed: sprite(0px, 400px, 25px, 25px);
mvDocYellow: sprite(25px, 400px, 25px, 25px);
mvDocGreen: sprite(50px, 400px, 25px, 25px);
mvDocBlue: sprite(75px, 400px, 25px, 25px);
mvDocIconSize: 80px;
mvDocLink: linkButton(btnDefLink) {
@@ -2143,9 +1802,7 @@ mvCaptionRadius: 2px;
mvCaptionBg: #11111180;
mvCaptionFont: font(fsize);
medviewSaveMsgCheck: icon {
{ "mediaview_save_check", #ffffff }
};
medviewSaveMsgCheck: icon {{ "mediaview_save_check", #ffffff }};
medviewSaveMsgFont: font(16px);
medviewSaveMsgPadding: margins(55px, 19px, 29px, 20px);
medviewSaveMsgCheckPos: point(23px, 21px);
@@ -2154,8 +1811,6 @@ medviewSaveMsgShown: 2000;
medviewSaveMsgHiding: 2500;
medviewSaveMsg: #000000b2;
mvTransparentBrush: sprite(9px, 124px, 8px, 8px);
// Mac specific
macAccessoryWidth: 450.;
@@ -2272,7 +1927,7 @@ sessionInfoFont: msgFont;
sessionInfoColor: #888888;
sessionTerminateTop: 30px;
sessionTerminateSkip: 18px;
sessionTerminate: iconedButton(notifyClose) {
sessionTerminate: iconedButton(simpleClose) {
iconPos: point(3px, 3px);
downIconPos: point(3px, 4px);
width: 16px;
@@ -2283,42 +1938,16 @@ webPageLeft: 10px;
webPageBar: 2px;
webPageTitleFont: semiboldFont;
webPageDescriptionFont: normalFont;
webPagePhotoSkip: 5px;
webPagePhotoSize: 100px;
webPagePhotoDelta: 8px;
mediaPlayerSuppressDuration: 150;
botDescSkip: 8px;
suppressAll: 0.2;
suppressSong: 0.05;
playerHeight: 44px;
playerBg: #e4e9ef;
playerFg: #54748f;
playerTimeFg: #a4afba;
playerLineHeight: 3px;
playerMoverSize: size(2px, 7px);
playerLineActive: #6389a8;
playerLineInactive: #bac7d4;
playerSkip: 8px;
playerNameStyle: textStyle(defaultTextStyle) {
linkFg: #6389a8;
linkFgDown: #6389a8;
linkFlags: semiboldFont;
linkFlagsOver: semiboldFont;
}
playerPlay: sprite(377px, 109px, 19px, 22px);
playerPause: sprite(379px, 131px, 17px, 20px);
playerNext: sprite(374px, 151px, 22px, 14px);
playerPrev: sprite(374px, 165px, 22px, 14px);
playerClose: sprite(361px, 97px, 12px, 12px);
playerFull: sprite(365px, 109px, 12px, 12px);
playerRepeat: sprite(365px, 121px, 12px, 14px);
playerVolume: sprite(352px, 179px, 44px, 12px);
playerInactiveOpacity: 0.8;
playerUnavailableOpacity: 0.3;
playerDuration: 200;
inlineResultsLeft: 11px;
inlineResultsSkip: 3px;
inlineMediaHeight: 96px;

View File

@@ -40,7 +40,7 @@ linkButton {
sysButton {
size: size;
img: sprite;
icon: icon;
color: color;
overColor: color;
duration: int;
@@ -130,8 +130,7 @@ flatInput {
font: font;
cursor: cursor;
imgRect: sprite;
imgPos: point;
icon: icon;
borderWidth: pixels;
borderColor: color;
@@ -202,14 +201,6 @@ countryInput {
align: align;
}
slider {
color: color;
thickness: pixels;
width: pixels;
bar: sprite;
}
flatLabel {
font: font;
margin: margins;
@@ -241,7 +232,7 @@ dropdown {
borderColor: color;
padding: margins;
shadow: sprite;
shadow: icon;
shadowShift: pixels;
duration: int;
@@ -263,7 +254,7 @@ InnerDropdown {
PopupMenu {
skip: pixels;
shadow: sprite;
shadow: icon;
shadowShift: pixels;
itemBg: color;
@@ -281,7 +272,7 @@ PopupMenu {
separatorWidth: pixels;
separatorFg: color;
arrow: sprite;
arrow: icon;
duration: int;
@@ -402,6 +393,7 @@ InputArea {
}
InputField {
textBg: color;
textFg: color;
textMargins: margins;
textAlign: align;
@@ -426,9 +418,6 @@ InputField {
width: pixels;
height: pixels;
iconSprite: sprite;
iconPosition: point;
}
PeerAvatarButton {

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1000 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Some files were not shown because too many files have changed in this diff Show More