2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Theme preview ready.

Also style::color is now copyable, constructed only inside a palette.
Also macOS setup new background ready.
This commit is contained in:
John Preston
2016-12-23 16:21:01 +03:00
parent 1d895cd953
commit ef927c8465
135 changed files with 3516 additions and 1391 deletions

View File

@@ -106,7 +106,7 @@ void TopBarWidget::showMenu() {
if (auto peer = main->peer()) {
if (!_menu) {
_menu.create(App::main());
_menu->setHiddenCallback([that = weak(), menu = _menu.data()] {
_menu->setHiddenCallback([that = weak(this), menu = _menu.data()] {
menu->deleteLater();
if (that && that->_menu == menu) {
that->_menu = nullptr;
@@ -159,10 +159,12 @@ void TopBarWidget::paintEvent(QPaintEvent *e) {
p.fillRect(QRect(0, 0, width(), st::topBarHeight), st::topBarBg);
if (_clearSelection->isHidden()) {
p.save();
int decreaseWidth = 0;
auto decreaseWidth = 0;
if (!_info->isHidden()) {
decreaseWidth += _info->width();
decreaseWidth -= st::topBarArrowPadding.left();
}
if (!_menuToggle->isHidden()) {
decreaseWidth += _menuToggle->width();
}
if (!_search->isHidden()) {
decreaseWidth += _search->width();