diff --git a/Telegram/SourceFiles/calls/group/calls_group_invite_controller.cpp b/Telegram/SourceFiles/calls/group/calls_group_invite_controller.cpp index ffb685968..6259bcd94 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_invite_controller.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_invite_controller.cpp @@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "apiwrap.h" #include "lang/lang_keys.h" #include "styles/style_calls.h" +#include "styles/style_dialogs.h" // searchedBarHeight namespace Calls::Group { namespace { diff --git a/Telegram/SourceFiles/chat_helpers/chat_helpers.style b/Telegram/SourceFiles/chat_helpers/chat_helpers.style index 3739ef7e3..7a323faee 100644 --- a/Telegram/SourceFiles/chat_helpers/chat_helpers.style +++ b/Telegram/SourceFiles/chat_helpers/chat_helpers.style @@ -721,6 +721,20 @@ manageEmojiStatusTop: 25px; inlineRadialSize: 44px; inlineFileSize: 44px; +inlineResultsLeft: 11px; +inlineResultsSkip: 3px; +inlineMediaHeight: 96px; +inlineThumbSize: 64px; +inlineThumbSkip: 10px; +inlineTitleFg: windowFg; +inlineDescriptionFg: windowSubTextFg; +inlineRowMargin: 6px; +inlineRowBorder: 1px; +inlineRowBorderFg: shadowFg; +inlineRowFileNameTop: 2px; +inlineRowFileDescriptionTop: 23px; +inlineResultsMinWidth: 48px; +inlineDurationMargin: 3px; stickersPremiumLock: icon{{ "emoji/premium_lock", premiumButtonFg }}; @@ -827,6 +841,9 @@ historyEmojiStatusInfoLabel: FlatLabel(historyContactStatusLabel) { } historyContactStatusMinSkip: 16px; +historyReplyCancelIcon: icon {{ "box_button_close", historyReplyCancelFg }}; +historyReplyCancelIconOver: icon {{ "box_button_close", historyReplyCancelFgOver }}; + historyReplySkip: 53px; historyReplyNameFg: windowActiveTextFg; historyReplyHeight: 49px; @@ -1239,3 +1256,12 @@ defaultReportBox: ReportBox { personal: menuIconPersonal; other: menuIconReport; } + +dragFont: font(27px semibold); +dragSubfont: font(19px semibold); +dragColor: windowSubTextFg; +dragDropColor: windowActiveTextFg; + +dragMargin: margins(0px, 10px, 0px, 10px); +dragPadding: margins(20px, 10px, 20px, 10px); +dragHeight: 72px; diff --git a/Telegram/SourceFiles/dialogs/dialogs.style b/Telegram/SourceFiles/dialogs/dialogs.style index 9516af32f..5743e74d6 100644 --- a/Telegram/SourceFiles/dialogs/dialogs.style +++ b/Telegram/SourceFiles/dialogs/dialogs.style @@ -617,3 +617,7 @@ dialogsStoriesTooltipHide: IconButton(defaultIconButton) { iconOver: icon {{ "calls/video_tooltip", importantTooltipFg }}; ripple: emptyRippleAnimation; } + +searchedBarHeight: 32px; +searchedBarFont: normalFont; +searchedBarPosition: point(17px, 7px); diff --git a/Telegram/SourceFiles/history/history_drag_area.cpp b/Telegram/SourceFiles/history/history_drag_area.cpp index 5c2cebf38..39ba5fe3c 100644 --- a/Telegram/SourceFiles/history/history_drag_area.cpp +++ b/Telegram/SourceFiles/history/history_drag_area.cpp @@ -37,14 +37,6 @@ constexpr auto kDragAreaEvents = { QEvent::Leave, }; -inline auto InnerRect(not_null widget) { - return QRect( - st::dragPadding.left(), - st::dragPadding.top(), - widget->width() - st::dragPadding.left() - st::dragPadding.right(), - widget->height() - st::dragPadding.top() - st::dragPadding.bottom()); -} - } // namespace DragArea::Areas DragArea::SetupDragAreaToContainer( @@ -264,7 +256,7 @@ bool DragArea::overlaps(const QRect &globalRect) { return false; } - const auto inner = InnerRect(this); + const auto inner = rect() - st::dragPadding; const auto testRect = QRect( mapFromGlobal(globalRect.topLeft()), globalRect.size()); @@ -280,11 +272,11 @@ void DragArea::mouseMoveEvent(QMouseEvent *e) { return; } - setIn(InnerRect(this).contains(e->pos())); + setIn((rect() - st::dragPadding).contains(e->pos())); } void DragArea::dragMoveEvent(QDragMoveEvent *e) { - setIn(InnerRect(this).contains(e->pos())); + setIn((rect() - st::dragPadding).contains(e->pos())); e->setDropAction(_in ? Qt::CopyAction : Qt::IgnoreAction); e->accept(); } @@ -314,7 +306,7 @@ void DragArea::paintEvent(QPaintEvent *e) { return; } p.setOpacity(opacity); - const auto inner = InnerRect(this); + const auto inner = rect() - st::dragPadding; if (!_cache.isNull()) { p.drawPixmapLeft( @@ -385,7 +377,7 @@ void DragArea::hideStart() { if (_cache.isNull()) { _cache = Ui::GrabWidget( this, - InnerRect(this).marginsAdded(st::boxRoundShadow.extend)); + rect() - st::dragPadding + st::boxRoundShadow.extend); } _hiding = true; setIn(false); @@ -410,7 +402,7 @@ void DragArea::showStart() { if (_cache.isNull()) { _cache = Ui::GrabWidget( this, - InnerRect(this).marginsAdded(st::boxRoundShadow.extend)); + rect() - st::dragPadding + st::boxRoundShadow.extend); } show(); _a_opacity.start( diff --git a/Telegram/SourceFiles/inline_bots/inline_bot_result.cpp b/Telegram/SourceFiles/inline_bots/inline_bot_result.cpp index 100e3efdf..339b40eaf 100644 --- a/Telegram/SourceFiles/inline_bots/inline_bot_result.cpp +++ b/Telegram/SourceFiles/inline_bots/inline_bot_result.cpp @@ -27,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/image/image_location_factory.h" #include "mainwidget.h" #include "main/main_session.h" +#include "styles/style_chat_helpers.h" namespace InlineBots { namespace { diff --git a/Telegram/SourceFiles/layout/layout_mosaic.cpp b/Telegram/SourceFiles/layout/layout_mosaic.cpp index 7ffe926d4..645f290bb 100644 --- a/Telegram/SourceFiles/layout/layout_mosaic.cpp +++ b/Telegram/SourceFiles/layout/layout_mosaic.cpp @@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "layout/layout_mosaic.h" -#include "styles/style_basic.h" +#include "styles/style_chat_helpers.h" namespace Mosaic::Layout { diff --git a/Telegram/SourceFiles/media/audio/media_audio.cpp b/Telegram/SourceFiles/media/audio/media_audio.cpp index 9186d3616..9c7a53b3f 100644 --- a/Telegram/SourceFiles/media/audio/media_audio.cpp +++ b/Telegram/SourceFiles/media/audio/media_audio.cpp @@ -1156,6 +1156,8 @@ void Fader::onTimer() { QMutexLocker lock(&AudioMutex); if (!mixer()) return; + constexpr auto kMediaPlayerSuppressDuration = crl::time(150); + auto volumeChangedAll = false; auto volumeChangedSong = false; if (_suppressAll || _suppressSongAnim) { @@ -1167,13 +1169,13 @@ void Fader::onTimer() { } else if (ms > _suppressAllEnd - kFadeDuration) { if (_suppressVolumeAll.to() != 1.) _suppressVolumeAll.start(1.); _suppressVolumeAll.update(1. - ((_suppressAllEnd - ms) / float64(kFadeDuration)), anim::linear); - } else if (ms >= _suppressAllStart + st::mediaPlayerSuppressDuration) { + } else if (ms >= _suppressAllStart + kMediaPlayerSuppressDuration) { if (_suppressAllAnim) { _suppressVolumeAll.finish(); _suppressAllAnim = false; } } else if (ms > _suppressAllStart) { - _suppressVolumeAll.update((ms - _suppressAllStart) / float64(st::mediaPlayerSuppressDuration), anim::linear); + _suppressVolumeAll.update((ms - _suppressAllStart) / float64(kMediaPlayerSuppressDuration), anim::linear); } auto wasVolumeMultiplierAll = VolumeMultiplierAll; VolumeMultiplierAll = _suppressVolumeAll.current(); diff --git a/Telegram/SourceFiles/overview/overview_layout.cpp b/Telegram/SourceFiles/overview/overview_layout.cpp index 47364e953..26413eb00 100644 --- a/Telegram/SourceFiles/overview/overview_layout.cpp +++ b/Telegram/SourceFiles/overview/overview_layout.cpp @@ -45,8 +45,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "ui/painter.h" #include "ui/power_saving.h" #include "ui/ui_utility.h" -#include "styles/style_overview.h" #include "styles/style_chat.h" +#include "styles/style_chat_helpers.h" +#include "styles/style_overview.h" namespace Overview { namespace Layout { diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index 7567c501a..f0062eff2 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -350,6 +350,8 @@ msgBotKbButton: BotKeyboardButton { ripple: defaultRippleAnimation; } +botDescSkip: 8px; + botKbDuration: 200; botKbStyle: TextStyle(defaultTextStyle) { font: font(15px semibold); diff --git a/Telegram/lib_ui b/Telegram/lib_ui index fee301f94..388fc7091 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit fee301f94197d3351f2f20671c329b81540e63e2 +Subproject commit 388fc709186f6a47d42efaa922876ea39a9950b6