2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Palette usage improvements.

This commit is contained in:
John Preston
2016-10-31 15:29:26 +03:00
parent dbb6371e67
commit e08f5437a6
101 changed files with 1105 additions and 1045 deletions

View File

@@ -22,6 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "settings/settings_fixed_bar.h"
#include "styles/style_settings.h"
#include "styles/style_boxes.h"
#include "ui/buttons/icon_button.h"
#include "mainwindow.h"
#include "lang.h"
@@ -30,6 +31,7 @@ namespace Settings {
FixedBar::FixedBar(QWidget *parent) : TWidget(parent)
, _close(this, st::settingsFixedBarClose) {
setAttribute(Qt::WA_OpaquePaintEvent);
_close->setClickedCallback([]() {
Ui::hideSettingsAndLayer();
});
@@ -46,6 +48,8 @@ void FixedBar::resizeEvent(QResizeEvent *e) {
void FixedBar::paintEvent(QPaintEvent *e) {
Painter p(this);
p.fillRect(e->rect(), st::settingsFixedBarBg);
p.setFont(st::settingsFixedBarFont);
p.setPen(st::windowTextFg);
p.drawTextLeft(st::settingsFixedBarTextLeft, st::settingsFixedBarTextTop, width(), lang(lng_menu_settings));