mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Added ability to set background color for premium top bar via styles.
This commit is contained in:
@@ -120,7 +120,7 @@ void TopBarAbstract::paintEdges(QPainter &p, const QBrush &brush) const {
|
||||
}
|
||||
|
||||
void TopBarAbstract::paintEdges(QPainter &p) const {
|
||||
paintEdges(p, st::boxBg);
|
||||
paintEdges(p, st().bg);
|
||||
if (isDark() && st().additionalShadowForDarkThemes) {
|
||||
paintEdges(p, st::shadowFg);
|
||||
paintEdges(p, st::shadowFg);
|
||||
@@ -144,7 +144,7 @@ bool TopBarAbstract::isDark() const {
|
||||
|
||||
void TopBarAbstract::computeIsDark() {
|
||||
const auto contrast = CountContrast(
|
||||
st::boxBg->c,
|
||||
st().bg->c,
|
||||
st::premiumButtonFg->c);
|
||||
_isDark = (contrast > kMinAcceptableContrast);
|
||||
}
|
||||
|
Reference in New Issue
Block a user