mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Spread some style entries from basic style.
This commit is contained in:
parent
596460172f
commit
acb1a7ccf2
10 changed files with 48 additions and 19 deletions
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -617,3 +617,7 @@ dialogsStoriesTooltipHide: IconButton(defaultIconButton) {
|
|||
iconOver: icon {{ "calls/video_tooltip", importantTooltipFg }};
|
||||
ripple: emptyRippleAnimation;
|
||||
}
|
||||
|
||||
searchedBarHeight: 32px;
|
||||
searchedBarFont: normalFont;
|
||||
searchedBarPosition: point(17px, 7px);
|
||||
|
|
|
@ -37,14 +37,6 @@ constexpr auto kDragAreaEvents = {
|
|||
QEvent::Leave,
|
||||
};
|
||||
|
||||
inline auto InnerRect(not_null<Ui::RpWidget*> 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(
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -350,6 +350,8 @@ msgBotKbButton: BotKeyboardButton {
|
|||
ripple: defaultRippleAnimation;
|
||||
}
|
||||
|
||||
botDescSkip: 8px;
|
||||
|
||||
botKbDuration: 200;
|
||||
botKbStyle: TextStyle(defaultTextStyle) {
|
||||
font: font(15px semibold);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit fee301f94197d3351f2f20671c329b81540e63e2
|
||||
Subproject commit 388fc709186f6a47d42efaa922876ea39a9950b6
|
Loading…
Add table
Reference in a new issue