Try title overscroll colors only on macOS.
This commit is contained in:
parent
2fe9ec27b1
commit
8f7fe24ac4
1 changed files with 11 additions and 7 deletions
|
|
@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/layers/show.h"
|
#include "ui/layers/show.h"
|
||||||
#include "ui/style/style_core_palette.h"
|
#include "ui/style/style_core_palette.h"
|
||||||
#include "ui/painter.h"
|
#include "ui/painter.h"
|
||||||
|
#include "base/platform/base_platform_info.h"
|
||||||
#include "base/debug_log.h"
|
#include "base/debug_log.h"
|
||||||
#include "styles/style_widgets.h"
|
#include "styles/style_widgets.h"
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
|
|
@ -817,13 +818,16 @@ void SeparatePanel::paintShadowBorder(QPainter &p) const {
|
||||||
};
|
};
|
||||||
const auto bg = st::windowBg->c;
|
const auto bg = st::windowBg->c;
|
||||||
if (_titleOverrideColor) {
|
if (_titleOverrideColor) {
|
||||||
const auto half = height() / 2;
|
const auto niceOverscroll = ::Platform::IsMac();
|
||||||
fillLeft(part1, half, _titleOverrideBorderParts);
|
const auto top = niceOverscroll
|
||||||
fillLeft(half, height() - part1, _borderParts);
|
? (height() / 2)
|
||||||
fillRight(part1, half, _titleOverrideBorderParts);
|
: (_padding.top() + _titleHeight);
|
||||||
fillRight(half, height() - part1, _borderParts);
|
fillLeft(part1, top, _titleOverrideBorderParts);
|
||||||
fillBody(_padding.top() + radius, half, *_titleOverrideColor);
|
fillLeft(top, height() - part1, _borderParts);
|
||||||
fillBody(half, height() - _padding.bottom() - radius, bg);
|
fillRight(part1, top, _titleOverrideBorderParts);
|
||||||
|
fillRight(top, height() - part1, _borderParts);
|
||||||
|
fillBody(_padding.top() + radius, top, *_titleOverrideColor);
|
||||||
|
fillBody(top, height() - _padding.bottom() - radius, bg);
|
||||||
} else {
|
} else {
|
||||||
fillLeft(part1, height() - part1, _borderParts);
|
fillLeft(part1, height() - part1, _borderParts);
|
||||||
fillRight(part1, height() - part1, _borderParts);
|
fillRight(part1, height() - part1, _borderParts);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue