Compare commits
192 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d9173bca8 | ||
|
|
c1d862d8de | ||
|
|
e1478359e6 | ||
|
|
8bc4e3816b | ||
|
|
48332c0c6b | ||
|
|
3455344c62 | ||
|
|
e5a5273b3a | ||
|
|
2bd561821a | ||
|
|
763b347a8f | ||
|
|
c514c62d61 | ||
|
|
130c41d711 | ||
|
|
77df38b4fd | ||
|
|
c773bffec6 | ||
|
|
20d04a065e | ||
|
|
951d93832c | ||
|
|
143cfe0d0f | ||
|
|
3b843f3d0f | ||
|
|
5ad2fc12d9 | ||
|
|
9752224449 | ||
|
|
f1307f70ce | ||
|
|
2ffc0196dd | ||
|
|
3503be03c9 | ||
|
|
40fc7379bc | ||
|
|
48a20f0e71 | ||
|
|
b33b59b8b9 | ||
|
|
2f4b2d0a33 | ||
|
|
ba4dcc42dc | ||
|
|
fc7c5d0ab3 | ||
|
|
086f754a96 | ||
|
|
7345408568 | ||
|
|
e536d5ad59 | ||
|
|
72b26861a9 | ||
|
|
eb6b2c7d2e | ||
|
|
48fde28484 | ||
|
|
fd6a312abc | ||
|
|
eb939fa4b0 | ||
|
|
0902741b85 | ||
|
|
cf247384d3 | ||
|
|
fa0e255183 | ||
|
|
5d6dafeeda | ||
|
|
31a847fb9d | ||
|
|
4f0cff5467 | ||
|
|
d543073632 | ||
|
|
956d048d56 | ||
|
|
9eb8a93719 | ||
|
|
d919f3e705 | ||
|
|
9950629e4e | ||
|
|
8f135d7e00 | ||
|
|
8d13014613 | ||
|
|
1a67b31ee9 | ||
|
|
2d9ccbc428 | ||
|
|
3c8fb5f1f6 | ||
|
|
e616c39608 | ||
|
|
377d333f1c | ||
|
|
6798b86655 | ||
|
|
b298c72b52 | ||
|
|
f1d52c12ae | ||
|
|
4a9821117b | ||
|
|
3c84899edf | ||
|
|
4369c23314 | ||
|
|
15ee4b40dc | ||
|
|
eb47b9468c | ||
|
|
16ce28f4d2 | ||
|
|
e7b6d7b498 | ||
|
|
41dc0f4e98 | ||
|
|
043cba0a64 | ||
|
|
c8aa7672e9 | ||
|
|
a9929a5d51 | ||
|
|
79a90956f7 | ||
|
|
9fdd75113f | ||
|
|
b600050057 | ||
|
|
c9288f2d0a | ||
|
|
f710fe2dd3 | ||
|
|
aa17702c01 | ||
|
|
9d6fb22d11 | ||
|
|
4875060e8f | ||
|
|
6db52f7fa9 | ||
|
|
1cc1aab823 | ||
|
|
1a645a8496 | ||
|
|
e1a8c89ff1 | ||
|
|
2d1d62a953 | ||
|
|
7f950d2de2 | ||
|
|
c2aa8d3c77 | ||
|
|
0bf55835f5 | ||
|
|
a41e0c4aa7 | ||
|
|
1d6aba86ba | ||
|
|
45dabbf9ab | ||
|
|
4bdb2c48c7 | ||
|
|
4a5f467560 | ||
|
|
ef2faf676e | ||
|
|
3d2f025e10 | ||
|
|
acbaf83442 | ||
|
|
1b54ccb59c | ||
|
|
886327a1d0 | ||
|
|
2ebab6a13c | ||
|
|
a18e3e5616 | ||
|
|
376941dd5e | ||
|
|
828b42e4f1 | ||
|
|
a5eee9bd3e | ||
|
|
fee1cec3d9 | ||
|
|
1247bd19b6 | ||
|
|
325e28f3a8 | ||
|
|
5d37517eac | ||
|
|
5b3ac58578 | ||
|
|
01a5aa30df | ||
|
|
6b8d3aa48c | ||
|
|
f1f7333c7a | ||
|
|
73a8d27bfd | ||
|
|
139882113d | ||
|
|
5b7d936140 | ||
|
|
903795d0e5 | ||
|
|
0562024444 | ||
|
|
78815800d0 | ||
|
|
344890c533 | ||
|
|
5529e24000 | ||
|
|
538ffb9727 | ||
|
|
d277b0d4bb | ||
|
|
90a4b66366 | ||
|
|
da49d8440a | ||
|
|
18f3e45657 | ||
|
|
c91bdf3fef | ||
|
|
8546814a25 | ||
|
|
453661d611 | ||
|
|
866bc4ff8a | ||
|
|
ff3e6c429d | ||
|
|
52731a737a | ||
|
|
3d8dadc2e7 | ||
|
|
042c9fc23d | ||
|
|
38114d3297 | ||
|
|
947963d5d1 | ||
|
|
efbf67a8ff | ||
|
|
3e4088b413 | ||
|
|
0479b214da | ||
|
|
3d9e0030c5 | ||
|
|
780fe61ff2 | ||
|
|
f970ac3163 | ||
|
|
a8f3582cb1 | ||
|
|
47eead17b1 | ||
|
|
5c20ae0411 | ||
|
|
c563280b76 | ||
|
|
c4a4e99f6b | ||
|
|
75c12dda31 | ||
|
|
2ea4c87d78 | ||
|
|
1da2a7c10c | ||
|
|
f7999bc993 | ||
|
|
227aa36627 | ||
|
|
ce1973fd30 | ||
|
|
50fa8b63c9 | ||
|
|
37b5329af3 | ||
|
|
6d2fc5c642 | ||
|
|
578cf4ed61 | ||
|
|
298bd2a476 | ||
|
|
c00456e12e | ||
|
|
708bf688ea | ||
|
|
96202f775c | ||
|
|
26ca5fafbb | ||
|
|
3423bd69dc | ||
|
|
a7b692e8ed | ||
|
|
e623d05e37 | ||
|
|
cb798ab3c5 | ||
|
|
f83610778a | ||
|
|
8660ab555b | ||
|
|
ffe75444d1 | ||
|
|
86982da5f7 | ||
|
|
a62a47098e | ||
|
|
1629793ace | ||
|
|
273637f9ac | ||
|
|
e90468f67b | ||
|
|
a41912cdf3 | ||
|
|
07e2eb4c57 | ||
|
|
f517494c91 | ||
|
|
c7e8b153bb | ||
|
|
8419a56e10 | ||
|
|
ff657347b8 | ||
|
|
b5640fdb0a | ||
|
|
58933df54b | ||
|
|
96a0e1c237 | ||
|
|
82d92d21f6 | ||
|
|
34331f558f | ||
|
|
52a7ed77ba | ||
|
|
589b7310c1 | ||
|
|
326d22565d | ||
|
|
2f206bf6bc | ||
|
|
d8444cb5d0 | ||
|
|
ab18fc6478 | ||
|
|
610d42fd8d | ||
|
|
3d3fc33253 | ||
|
|
b772e42ca1 | ||
|
|
160895f6e3 | ||
|
|
43a40c3b9a | ||
|
|
71cfc83c1d | ||
|
|
10f3d2049a |
743
.travis/build.sh
@@ -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
|
||||
|
||||
11
README.md
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
705
Telegram/Patches/qtbase_5_3_2.diff
Normal 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
|
||||
@@ -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
|
||||
|
||||
47
Telegram/Patches/qtimageformats_5_3_2.diff
Normal 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_,
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
BIN
Telegram/Resources/icons/add_contact_phone.png
Normal file
|
After Width: | Height: | Size: 380 B |
BIN
Telegram/Resources/icons/add_contact_phone@2x.png
Normal file
|
After Width: | Height: | Size: 708 B |
BIN
Telegram/Resources/icons/add_contact_user.png
Normal file
|
After Width: | Height: | Size: 316 B |
BIN
Telegram/Resources/icons/add_contact_user@2x.png
Normal file
|
After Width: | Height: | Size: 579 B |
BIN
Telegram/Resources/icons/box_button_close.png
Normal file
|
After Width: | Height: | Size: 151 B |
BIN
Telegram/Resources/icons/box_button_close@2x.png
Normal file
|
After Width: | Height: | Size: 283 B |
BIN
Telegram/Resources/icons/box_search_cancel.png
Normal file
|
After Width: | Height: | Size: 187 B |
BIN
Telegram/Resources/icons/box_search_cancel@2x.png
Normal file
|
After Width: | Height: | Size: 296 B |
BIN
Telegram/Resources/icons/box_search_icon.png
Normal file
|
After Width: | Height: | Size: 350 B |
BIN
Telegram/Resources/icons/box_search_icon@2x.png
Normal file
|
After Width: | Height: | Size: 707 B |
BIN
Telegram/Resources/icons/box_shadow.png
Normal file
|
After Width: | Height: | Size: 190 B |
BIN
Telegram/Resources/icons/box_shadow@2x.png
Normal file
|
After Width: | Height: | Size: 294 B |
BIN
Telegram/Resources/icons/box_title_shadow.png
Normal file
|
After Width: | Height: | Size: 85 B |
BIN
Telegram/Resources/icons/box_title_shadow@2x.png
Normal file
|
After Width: | Height: | Size: 105 B |
BIN
Telegram/Resources/icons/contacts_add.png
Normal file
|
After Width: | Height: | Size: 316 B |
BIN
Telegram/Resources/icons/contacts_add@2x.png
Normal file
|
After Width: | Height: | Size: 590 B |
BIN
Telegram/Resources/icons/dialogs_channel.png
Normal file
|
After Width: | Height: | Size: 253 B |
BIN
Telegram/Resources/icons/dialogs_channel@2x.png
Normal file
|
After Width: | Height: | Size: 433 B |
BIN
Telegram/Resources/icons/dialogs_chat.png
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
Telegram/Resources/icons/dialogs_chat@2x.png
Normal file
|
After Width: | Height: | Size: 602 B |
BIN
Telegram/Resources/icons/dialogs_received.png
Normal file
|
After Width: | Height: | Size: 158 B |
BIN
Telegram/Resources/icons/dialogs_received@2x.png
Normal file
|
After Width: | Height: | Size: 309 B |
BIN
Telegram/Resources/icons/dialogs_sending.png
Normal file
|
After Width: | Height: | Size: 223 B |
BIN
Telegram/Resources/icons/dialogs_sending@2x.png
Normal file
|
After Width: | Height: | Size: 432 B |
BIN
Telegram/Resources/icons/dialogs_sent.png
Normal file
|
After Width: | Height: | Size: 145 B |
BIN
Telegram/Resources/icons/dialogs_sent@2x.png
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
Telegram/Resources/icons/dialogs_verified_check.png
Normal file
|
After Width: | Height: | Size: 180 B |
BIN
Telegram/Resources/icons/dialogs_verified_check@2x.png
Normal file
|
After Width: | Height: | Size: 281 B |
BIN
Telegram/Resources/icons/dialogs_verified_star.png
Normal file
|
After Width: | Height: | Size: 342 B |
BIN
Telegram/Resources/icons/dialogs_verified_star@2x.png
Normal file
|
After Width: | Height: | Size: 660 B |
BIN
Telegram/Resources/icons/dropdown_submenu_arrow.png
Normal file
|
After Width: | Height: | Size: 119 B |
BIN
Telegram/Resources/icons/dropdown_submenu_arrow@2x.png
Normal file
|
After Width: | Height: | Size: 166 B |
BIN
Telegram/Resources/icons/fade_horizontal_left.png
Normal file
|
After Width: | Height: | Size: 139 B |
BIN
Telegram/Resources/icons/fade_horizontal_left@2x.png
Normal file
|
After Width: | Height: | Size: 192 B |
BIN
Telegram/Resources/icons/fade_horizontal_right.png
Normal file
|
After Width: | Height: | Size: 142 B |
BIN
Telegram/Resources/icons/fade_horizontal_right@2x.png
Normal file
|
After Width: | Height: | Size: 190 B |
BIN
Telegram/Resources/icons/history_empty_dog.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
Telegram/Resources/icons/history_empty_dog@2x.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
Telegram/Resources/icons/history_file_cancel.png
Normal file
|
After Width: | Height: | Size: 268 B |
BIN
Telegram/Resources/icons/history_file_cancel@2x.png
Normal file
|
After Width: | Height: | Size: 401 B |
BIN
Telegram/Resources/icons/history_file_document.png
Normal file
|
After Width: | Height: | Size: 170 B |
BIN
Telegram/Resources/icons/history_file_document@2x.png
Normal file
|
After Width: | Height: | Size: 281 B |
BIN
Telegram/Resources/icons/history_file_download.png
Normal file
|
After Width: | Height: | Size: 174 B |
BIN
Telegram/Resources/icons/history_file_download@2x.png
Normal file
|
After Width: | Height: | Size: 419 B |
BIN
Telegram/Resources/icons/history_file_image.png
Normal file
|
After Width: | Height: | Size: 289 B |
BIN
Telegram/Resources/icons/history_file_image@2x.png
Normal file
|
After Width: | Height: | Size: 468 B |
BIN
Telegram/Resources/icons/history_file_pause.png
Normal file
|
After Width: | Height: | Size: 118 B |
BIN
Telegram/Resources/icons/history_file_pause@2x.png
Normal file
|
After Width: | Height: | Size: 165 B |
BIN
Telegram/Resources/icons/history_file_play.png
Normal file
|
After Width: | Height: | Size: 242 B |
BIN
Telegram/Resources/icons/history_file_play@2x.png
Normal file
|
After Width: | Height: | Size: 417 B |
BIN
Telegram/Resources/icons/history_received.png
Normal file
|
After Width: | Height: | Size: 163 B |
BIN
Telegram/Resources/icons/history_received@2x.png
Normal file
|
After Width: | Height: | Size: 320 B |
BIN
Telegram/Resources/icons/history_sent.png
Normal file
|
After Width: | Height: | Size: 150 B |
BIN
Telegram/Resources/icons/history_sent@2x.png
Normal file
|
After Width: | Height: | Size: 267 B |
BIN
Telegram/Resources/icons/history_views.png
Normal file
|
After Width: | Height: | Size: 383 B |
BIN
Telegram/Resources/icons/history_views@2x.png
Normal file
|
After Width: | Height: | Size: 1000 B |
BIN
Telegram/Resources/icons/mediaview_close.png
Normal file
|
After Width: | Height: | Size: 172 B |
BIN
Telegram/Resources/icons/mediaview_close@2x.png
Normal file
|
After Width: | Height: | Size: 351 B |
BIN
Telegram/Resources/icons/mediaview_download.png
Normal file
|
After Width: | Height: | Size: 142 B |
BIN
Telegram/Resources/icons/mediaview_download@2x.png
Normal file
|
After Width: | Height: | Size: 227 B |
BIN
Telegram/Resources/icons/mediaview_file_corner.png
Normal file
|
After Width: | Height: | Size: 188 B |
BIN
Telegram/Resources/icons/mediaview_file_corner@2x.png
Normal file
|
After Width: | Height: | Size: 303 B |
BIN
Telegram/Resources/icons/mediaview_more.png
Normal file
|
After Width: | Height: | Size: 146 B |
BIN
Telegram/Resources/icons/mediaview_more@2x.png
Normal file
|
After Width: | Height: | Size: 207 B |
BIN
Telegram/Resources/icons/mediaview_next.png
Normal file
|
After Width: | Height: | Size: 296 B |
BIN
Telegram/Resources/icons/mediaview_next@2x.png
Normal file
|
After Width: | Height: | Size: 497 B |
BIN
Telegram/Resources/icons/mediaview_previous.png
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
Telegram/Resources/icons/mediaview_previous@2x.png
Normal file
|
After Width: | Height: | Size: 496 B |
BIN
Telegram/Resources/icons/monitor.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
Telegram/Resources/icons/monitor@2x.png
Normal file
|
After Width: | Height: | Size: 10 KiB |