10019003: Some compose area icons improved. Box headers redesigned.

This commit is contained in:
John Preston 2016-11-08 17:43:10 +03:00
parent 475b35bf55
commit 494254496e
53 changed files with 223 additions and 226 deletions

View File

@ -1061,9 +1061,12 @@ infoButton: PeerAvatarButton {
profileTopBarBackIconFg: #0290d7;
profileTopBarBackIcon: icon {{ "title_back", profileTopBarBackIconFg }};
historyReplyCancelIcon: icon {{ "box_button_close-invert", historyReplyBg }};
boxSearchCancelIcon: icon {{ "box_button_close-invert", boxSearchBg }};
settingsFixedBarCloseIcon: icon {{ "box_button_close-invert", settingsFixedBarBg }};
historyReplyCancelIcon: icon {{ "box_button_close", historyReplyCancelFg }};
historyReplyCancelIconOver: icon {{ "box_button_close", historyReplyCancelFgOver }};
boxSearchCancelIcon: icon {{ "box_button_close", boxSearchCancelIconFg }};
boxSearchCancelIconOver: icon {{ "box_button_close", boxSearchCancelIconFgOver }};
boxBlockTitleCloseIcon: icon {{ "box_button_close", boxBlockTitleCloseFg }};
boxBlockTitleCloseIconOver: icon {{ "box_button_close", boxBlockTitleCloseFgOver }};
notifyFadeRight: icon {{ "fade_horizontal", notificationBg }};

View File

@ -81,6 +81,12 @@ boxSearchBg: boxBg;
boxSearchCancelIconFg: cancelIconFg;
boxSearchCancelIconFgOver: cancelIconFgOver;
boxBlockTitleBg: boxBg;
boxBlockTitleFg: boxTitleFg;
boxBlockTitleAdditionalFg: #808080;
boxBlockTitleCloseFg: cancelIconFg;
boxBlockTitleCloseFgOver: cancelIconFgOver;
membersAboutLimitFg: windowSubTextFg;
contactsBg: windowBg;
@ -91,10 +97,6 @@ photoCropFadeBg: #0000007f;
photoCropPointFg: #ffffff7f;
// settings
settingsFixedBarBg: boxBg;
settingsCloseFg: cancelIconFg;
settingsCloseFgOver: cancelIconFgOver;
notificationsBoxMonitorFg: windowTextFg;
notificationSampleUserpicFg: windowActiveBg;
@ -173,8 +175,8 @@ historySendIconFg: windowActiveBg;
historySendIconFgOver: windowActiveBg;
historyPinnedBg: historyComposeAreaBg;
historyReplyBg: historyComposeAreaBg;
historyReplyCancelIconFg: cancelIconFg;
historyReplyCancelIconFgOver: cancelIconFgOver;
historyReplyCancelFg: cancelIconFg;
historyReplyCancelFgOver: cancelIconFgOver;
historyComposeButtonBg: historyComposeAreaBg;
historyComposeButtonBgOver: #f5f5f5;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 B

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

After

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 518 B

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 685 B

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -67,15 +67,17 @@ boxTitleFg: #404040;
boxSearchBg: boxBg;
boxSearchCancelIconFg: cancelIconFg;
boxSearchCancelIconFgOver: cancelIconFgOver;
boxBlockTitleBg: boxBg;
boxBlockTitleFg: boxTitleFg;
boxBlockTitleAdditionalFg: #808080;
boxBlockTitleCloseFg: cancelIconFg;
boxBlockTitleCloseFgOver: cancelIconFgOver;
membersAboutLimitFg: windowSubTextFg;
contactsBg: windowBg;
contactsBgOver: windowOverBg;
contactsNameFg: boxTextFg;
photoCropFadeBg: #0000007f;
photoCropPointFg: #ffffff7f;
settingsFixedBarBg: boxBg;
settingsCloseFg: cancelIconFg;
settingsCloseFgOver: cancelIconFgOver;
notificationsBoxMonitorFg: windowTextFg;
notificationSampleUserpicFg: windowActiveBg;
notificationSampleCloseFg: #d7d7d7; // windowSubTextFg;
@ -141,8 +143,8 @@ historySendIconFg: windowActiveBg;
historySendIconFgOver: windowActiveBg;
historyPinnedBg: historyComposeAreaBg;
historyReplyBg: historyComposeAreaBg;
historyReplyCancelIconFg: cancelIconFg;
historyReplyCancelIconFgOver: cancelIconFgOver;
historyReplyCancelFg: cancelIconFg;
historyReplyCancelFgOver: cancelIconFgOver;
historyComposeButtonBg: historyComposeAreaBg;
historyComposeButtonBgOver: #f5f5f5;
historyTextInFg: windowTextFg;

View File

@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,10,19,2
PRODUCTVERSION 0,10,19,2
FILEVERSION 0,10,19,3
PRODUCTVERSION 0,10,19,3
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -51,10 +51,10 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileVersion", "0.10.19.2"
VALUE "FileVersion", "0.10.19.3"
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.10.19.2"
VALUE "ProductVersion", "0.10.19.3"
END
END
BLOCK "VarFileInfo"

View File

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,10,19,2
PRODUCTVERSION 0,10,19,2
FILEVERSION 0,10,19,3
PRODUCTVERSION 0,10,19,3
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -43,10 +43,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram Messenger LLP"
VALUE "FileDescription", "Telegram Updater"
VALUE "FileVersion", "0.10.19.2"
VALUE "FileVersion", "0.10.19.3"
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "0.10.19.2"
VALUE "ProductVersion", "0.10.19.3"
END
END
BLOCK "VarFileInfo"

View File

@ -19,15 +19,13 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
#include "stdafx.h"
#include "lang.h"
#include "boxes/aboutbox.h"
#include "aboutbox.h"
#include "lang.h"
#include "mainwidget.h"
#include "mainwindow.h"
#include "autoupdater.h"
#include "boxes/confirmbox.h"
#include "application.h"
AboutBox::AboutBox() : AbstractBox(st::aboutWidth)
@ -38,7 +36,7 @@ AboutBox::AboutBox() : AbstractBox(st::aboutWidth)
, _done(this, lang(lng_close), st::defaultBoxButton) {
_text3.setRichText(lng_about_text_3(lt_faq_open, qsl("[a href=\"%1\"]").arg(telegramFaqLink()), lt_faq_close, qsl("[/a]")));
setMaxHeight(st::boxTitleHeight + st::aboutTextTop + _text1.height() + st::aboutSkip + _text2.height() + st::aboutSkip + _text3.height() + st::boxButtonPadding.top() + _done.height() + st::boxButtonPadding.bottom());
setMaxHeight(titleHeight() + st::aboutTextTop + _text1.height() + st::aboutSkip + _text2.height() + st::aboutSkip + _text3.height() + st::boxButtonPadding.top() + _done.height() + st::boxButtonPadding.bottom());
connect(&_version, SIGNAL(clicked()), this, SLOT(onVersion()));
connect(&_done, SIGNAL(clicked()), this, SLOT(onClose()));
@ -57,8 +55,8 @@ void AboutBox::showAll() {
}
void AboutBox::resizeEvent(QResizeEvent *e) {
_version.moveToLeft(st::boxPadding.left(), st::boxTitleHeight + st::aboutVersionTop);
_text1.moveToLeft(st::boxPadding.left(), st::boxTitleHeight + st::aboutTextTop);
_version.moveToLeft(st::boxPadding.left(), titleHeight() + st::aboutVersionTop);
_text1.moveToLeft(st::boxPadding.left(), titleHeight() + st::aboutTextTop);
_text2.moveToLeft(st::boxPadding.left(), _text1.y() + _text1.height() + st::aboutSkip);
_text3.moveToLeft(st::boxPadding.left(), _text2.y() + _text2.height() + st::aboutSkip);
_done.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _done.height());

View File

@ -21,26 +21,20 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "stdafx.h"
#include "boxes/abstractbox.h"
#include "styles/style_boxes.h"
#include "localstorage.h"
#include "lang.h"
#include "ui/buttons/icon_button.h"
#include "mainwidget.h"
#include "mainwindow.h"
#include "styles/style_boxes.h"
void BlueTitleShadow::paintEvent(QPaintEvent *e) {
Painter p(this);
QRect r(e->rect());
st::boxBlueTitleShadow.fill(p, QRect(r.left(), 0, r.width(), height()));
}
AbstractBox::AbstractBox(int w) : LayerWidget(App::wnd()->bodyWidget()) {
setAttribute(Qt::WA_OpaquePaintEvent);
resize(w, 0);
resize((w > 0) ? w : st::boxWideWidth, 0);
}
void AbstractBox::prepare() {
raiseShadow();
showAll();
}
@ -53,12 +47,11 @@ void AbstractBox::keyPressEvent(QKeyEvent *e) {
}
void AbstractBox::resizeEvent(QResizeEvent *e) {
if (_blueClose) {
_blueClose->moveToRight(0, 0);
if (_blockClose) {
_blockClose->moveToRight(0, 0);
}
if (_blueShadow) {
_blueShadow->moveToLeft(0, st::boxTitleHeight);
_blueShadow->resize(width(), st::boxBlueTitleShadow.height());
if (_blockShadow) {
_blockShadow->setGeometry(0, st::boxBlockTitleHeight, width(), st::boxBlockTitleShadow.height());
}
LayerWidget::resizeEvent(e);
}
@ -75,21 +68,27 @@ bool AbstractBox::paint(QPainter &p) {
return false;
}
void AbstractBox::paintTitle(Painter &p, const QString &title, const QString &additional) {
p.setFont(st::boxTitleFont);
if (_blueTitle) {
p.fillRect(0, 0, width(), st::boxTitleHeight, st::boxBlueTitleBg);
p.setPen(st::boxBlueTitleFg);
int AbstractBox::titleHeight() const {
return _blockTitle ? st::boxBlockTitleHeight : st::boxTitleHeight;
}
int32 titleWidth = st::boxTitleFont->width(title);
p.drawTextLeft(st::boxBlueTitlePosition.x(), st::boxBlueTitlePosition.y(), width(), title, titleWidth);
void AbstractBox::paintTitle(Painter &p, const QString &title, const QString &additional) {
if (_blockTitle) {
p.fillRect(0, 0, width(), titleHeight(), st::boxBlockTitleBg);
p.setFont(st::boxBlockTitleFont);
p.setPen(st::boxBlockTitleFg);
auto titleWidth = st::boxBlockTitleFont->width(title);
p.drawTextLeft(st::boxBlockTitlePosition.x(), st::boxBlockTitlePosition.y(), width(), title, titleWidth);
if (!additional.isEmpty()) {
p.setFont(st::boxTextFont);
p.setPen(st::boxBlueTitleAdditionalFg);
p.drawTextLeft(st::boxBlueTitlePosition.x() + titleWidth + st::boxBlueTitleAdditionalSkip, st::boxBlueTitlePosition.y(), width(), additional);
p.setFont(st::boxBlockTitleAdditionalFont);
p.setPen(st::boxBlockTitleAdditionalFg);
p.drawTextLeft(st::boxBlockTitlePosition.x() + titleWidth + st::boxBlockTitleAdditionalSkip, st::boxBlockTitlePosition.y(), width(), additional);
}
} else {
p.setFont(st::boxTitleFont);
p.setPen(st::boxTitleFg);
p.drawTextLeft(st::boxTitlePosition.x(), st::boxTitlePosition.y(), width(), title);
}
@ -135,24 +134,27 @@ void AbstractBox::onClose() {
emit closed(this);
}
void AbstractBox::setBlueTitle(bool blue) {
_blueTitle = blue;
_blueShadow.create(this);
_blueClose.create(this, st::boxBlueClose);
_blueClose->setClickedCallback([this] { onClose(); });
void AbstractBox::setBlockTitle(bool block) {
_blockTitle = block;
_blockShadow.create(this, st::boxBlockTitleShadow);
_blockClose.create(this, st::boxBlockTitleClose);
_blockClose->setClickedCallback([this] { onClose(); });
}
void AbstractBox::raiseShadow() {
if (_blueShadow) {
_blueShadow->raise();
if (_blockShadow) {
_blockShadow->raise();
}
}
ScrollableBoxShadow::ScrollableBoxShadow(QWidget *parent) : Ui::PlainShadow(parent, st::boxScrollShadowBg) {
}
ScrollableBox::ScrollableBox(const style::flatScroll &scroll, int32 w) : AbstractBox(w)
, _scroll(this, scroll)
, _topSkip(st::boxTitleHeight)
, _topSkip(st::boxBlockTitleHeight)
, _bottomSkip(st::boxScrollSkip) {
setBlueTitle(true);
setBlockTitle(true);
}
void ScrollableBox::resizeEvent(QResizeEvent *e) {
@ -161,6 +163,8 @@ void ScrollableBox::resizeEvent(QResizeEvent *e) {
}
void ScrollableBox::init(TWidget *inner, int bottomSkip, int topSkip) {
if (bottomSkip < 0) bottomSkip = st::boxScrollSkip;
if (topSkip < 0) topSkip = st::boxBlockTitleHeight;
_bottomSkip = bottomSkip;
_topSkip = topSkip;
_scroll->setOwnedWidget(inner);
@ -168,6 +172,8 @@ void ScrollableBox::init(TWidget *inner, int bottomSkip, int topSkip) {
}
void ScrollableBox::setScrollSkips(int bottomSkip, int topSkip) {
if (bottomSkip < 0) bottomSkip = st::boxScrollSkip;
if (topSkip < 0) topSkip = st::boxBlockTitleHeight;
if (_topSkip != topSkip || _bottomSkip != bottomSkip) {
_topSkip = topSkip;
_bottomSkip = bottomSkip;

View File

@ -24,27 +24,21 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "ui/widgets/shadow.h"
namespace Ui {
class MaskButton;
class IconButton;
class GradientShadow;
} // namespace Ui
class BlueTitleShadow : public TWidget {
public:
BlueTitleShadow(QWidget *parent) : TWidget(parent) {
}
void paintEvent(QPaintEvent *e);
};
class AbstractBox : public LayerWidget, protected base::Subscriber {
Q_OBJECT
public:
AbstractBox(int w = st::boxWideWidth);
AbstractBox(int w = 0);
void parentResized() override;
void showDone() override {
showAll();
}
void setBlueTitle(bool blue);
void setBlockTitle(bool block);
void raiseShadow();
public slots:
@ -57,6 +51,7 @@ protected:
void prepare();
bool paint(QPainter &p);
int titleHeight() const;
void paintTitle(Painter &p, const QString &title, const QString &additional = QString());
void setMaxHeight(int32 maxHeight);
void resizeMaxHeight(int32 newWidth, int32 maxHeight);
@ -72,25 +67,25 @@ private:
bool _closed = false;
bool _blueTitle = false;
ChildWidget<Ui::MaskButton> _blueClose = { nullptr };
ChildWidget<BlueTitleShadow> _blueShadow = { nullptr };
bool _blockTitle = false;
ChildWidget<Ui::IconButton> _blockClose = { nullptr };
ChildWidget<Ui::GradientShadow> _blockShadow = { nullptr };
};
class ScrollableBoxShadow : public Ui::PlainShadow {
public:
ScrollableBoxShadow(QWidget *parent) : Ui::PlainShadow(parent, st::boxScrollShadowBg) {
}
ScrollableBoxShadow(QWidget *parent);
};
class ScrollableBox : public AbstractBox {
public:
ScrollableBox(const style::flatScroll &scroll, int w = st::boxWideWidth);
ScrollableBox(const style::flatScroll &scroll, int w = 0);
protected:
void init(TWidget *inner, int bottomSkip = st::boxScrollSkip, int topSkip = st::boxTitleHeight);
void setScrollSkips(int bottomSkip = st::boxScrollSkip, int topSkip = st::boxTitleHeight);
void init(TWidget *inner, int bottomSkip = -1, int topSkip = -1);
void setScrollSkips(int bottomSkip = -1, int topSkip = -1);
void resizeEvent(QResizeEvent *e) override;
@ -108,7 +103,7 @@ private:
class ItemListBox : public ScrollableBox {
public:
ItemListBox(const style::flatScroll &scroll, int32 w = st::boxWideWidth);
ItemListBox(const style::flatScroll &scroll, int32 w = 0);
};

View File

@ -19,21 +19,21 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
#include "stdafx.h"
#include "lang.h"
#include "boxes/addcontactbox.h"
#include "styles/style_boxes.h"
#include "styles/style_dialogs.h"
#include "lang.h"
#include "application.h"
#include "addcontactbox.h"
#include "contactsbox.h"
#include "confirmbox.h"
#include "photocropbox.h"
#include "boxes/contactsbox.h"
#include "boxes/confirmbox.h"
#include "boxes/photocropbox.h"
#include "ui/filedialog.h"
#include "ui/buttons/checkbox.h"
#include "mainwidget.h"
#include "mainwindow.h"
#include "apiwrap.h"
#include "observer_peer.h"
#include "styles/style_boxes.h"
#include "styles/style_dialogs.h"
AddContactBox::AddContactBox(QString fname, QString lname, QString phone) : AbstractBox(st::boxWidth)
, _first(this, st::defaultInputField, lang(lng_signup_firstname), fname)
@ -73,7 +73,7 @@ void AddContactBox::initBox() {
bool readyToAdd = !_phone->getLastText().isEmpty() && (!_first->getLastText().isEmpty() || !_last->getLastText().isEmpty());
_boxTitle = lang(readyToAdd ? lng_confirm_contact_data : lng_enter_contact_data);
}
setMaxHeight(st::boxTitleHeight + st::contactPadding.top() + _first->height() + st::contactSkip + _last->height() + st::contactPhoneSkip + _phone->height() + st::contactPadding.bottom() + st::boxPadding.bottom() + st::boxButtonPadding.top() + _save->height() + st::boxButtonPadding.bottom());
setMaxHeight(titleHeight() + st::contactPadding.top() + _first->height() + st::contactSkip + _last->height() + st::contactPhoneSkip + _phone->height() + st::contactPadding.bottom() + st::boxPadding.bottom() + st::boxButtonPadding.top() + _save->height() + st::boxButtonPadding.bottom());
_retry->hide();
connect(_save, SIGNAL(clicked()), this, SLOT(onSave()));
@ -115,8 +115,8 @@ void AddContactBox::paintEvent(QPaintEvent *e) {
} else {
p.setPen(st::boxTextFg);
p.setFont(st::boxTextFont);
int32 h = height() - st::boxTitleHeight - st::contactPadding.top() - st::contactPadding.bottom() - st::boxPadding.bottom() - st::boxButtonPadding.top() - _retry->height() - st::boxButtonPadding.bottom();
p.drawText(QRect(st::boxPadding.left(), st::boxTitleHeight + st::contactPadding.top(), width() - st::boxPadding.left() - st::boxPadding.right(), h), lng_contact_not_joined(lt_name, _sentName), style::al_topleft);
int32 h = height() - titleHeight() - st::contactPadding.top() - st::contactPadding.bottom() - st::boxPadding.bottom() - st::boxButtonPadding.top() - _retry->height() - st::boxButtonPadding.bottom();
p.drawText(QRect(st::boxPadding.left(), titleHeight() + st::contactPadding.top(), width() - st::boxPadding.left() - st::boxPadding.right(), h), lng_contact_not_joined(lt_name, _sentName), style::al_topleft);
}
}
@ -125,11 +125,11 @@ void AddContactBox::resizeEvent(QResizeEvent *e) {
_last->resize(_first->width(), _last->height());
_phone->resize(_first->width(), _last->height());
if (_invertOrder) {
_last->moveToLeft(st::boxPadding.left() + st::contactPadding.left(), st::boxTitleHeight + st::contactPadding.top());
_last->moveToLeft(st::boxPadding.left() + st::contactPadding.left(), titleHeight() + st::contactPadding.top());
_first->moveToLeft(st::boxPadding.left() + st::contactPadding.left(), _last->y() + _last->height() + st::contactSkip);
_phone->moveToLeft(st::boxPadding.left() + st::contactPadding.left(), _first->y() + _first->height() + st::contactPhoneSkip);
} else {
_first->moveToLeft(st::boxPadding.left() + st::contactPadding.left(), st::boxTitleHeight + st::contactPadding.top());
_first->moveToLeft(st::boxPadding.left() + st::contactPadding.left(), titleHeight() + st::contactPadding.top());
_last->moveToLeft(st::boxPadding.left() + st::contactPadding.left(), _first->y() + _first->height() + st::contactSkip);
_phone->moveToLeft(st::boxPadding.left() + st::contactPadding.left(), _last->y() + _last->height() + st::contactPhoneSkip);
}
@ -919,7 +919,7 @@ _invertOrder(!peer->isChat() && langFirstNameGoesSecond()) {
_first->setMaxLength(MaxGroupChannelTitle);
_last->setMaxLength(MaxGroupChannelTitle);
int32 h = st::boxTitleHeight + st::contactPadding.top() + _first->height();
int32 h = titleHeight() + st::contactPadding.top() + _first->height();
if (_peer->isUser()) {
_boxTitle = lang(_peer == App::self() ? lng_edit_self_title : lng_edit_contact_title);
h += st::contactSkip + _last->height();
@ -989,10 +989,10 @@ void EditNameTitleBox::resizeEvent(QResizeEvent *e) {
_first->resize(width() - st::boxPadding.left() - st::newGroupInfoPadding.left() - st::boxPadding.right(), _first->height());
_last->resize(_first->size());
if (_invertOrder) {
_last->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), st::boxTitleHeight + st::contactPadding.top());
_last->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), titleHeight() + st::contactPadding.top());
_first->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _last->y() + _last->height() + st::contactSkip);
} else {
_first->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), st::boxTitleHeight + st::contactPadding.top());
_first->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), titleHeight() + st::contactPadding.top());
_last->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _first->y() + _first->height() + st::contactSkip);
}
@ -1161,7 +1161,7 @@ void EditChannelBox::onDescriptionResized() {
}
void EditChannelBox::updateMaxHeight() {
int32 h = st::boxTitleHeight + st::newGroupInfoPadding.top() + _title->height();
int32 h = titleHeight() + st::newGroupInfoPadding.top() + _title->height();
h += st::newGroupDescriptionPadding.top() + _description->height() + st::newGroupDescriptionPadding.bottom();
if (!_channel->isMegagroup()) {
h += st::newGroupPublicLinkPadding.top() + _sign->height() + st::newGroupPublicLinkPadding.bottom();
@ -1175,7 +1175,7 @@ void EditChannelBox::updateMaxHeight() {
void EditChannelBox::resizeEvent(QResizeEvent *e) {
_title->resize(width() - st::boxPadding.left() - st::newGroupInfoPadding.left() - st::boxPadding.right(), _title->height());
_title->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), st::boxTitleHeight + st::newGroupInfoPadding.top() + st::newGroupNamePosition.y());
_title->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), titleHeight() + st::newGroupInfoPadding.top() + st::newGroupNamePosition.y());
_description->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _title->y() + _title->height() + st::newGroupDescriptionPadding.top());

View File

@ -19,12 +19,11 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
#include "stdafx.h"
#include "boxes/autolockbox.h"
#include "lang.h"
#include "localstorage.h"
#include "autolockbox.h"
#include "confirmbox.h"
#include "boxes/confirmbox.h"
#include "mainwidget.h"
#include "mainwindow.h"
#include "ui/buttons/checkbox.h"
@ -36,9 +35,9 @@ _close(this, lang(lng_box_ok), st::defaultBoxButton) {
int32 opts[] = { 60, 300, 3600, 18000 }, cnt = sizeof(opts) / sizeof(opts[0]);
resizeMaxHeight(st::langsWidth, st::boxTitleHeight + cnt * (st::boxOptionListPadding.top() + st::langsButton.height) + st::boxOptionListPadding.bottom() + st::boxPadding.bottom() + st::boxButtonPadding.top() + _close.height() + st::boxButtonPadding.bottom());
resizeMaxHeight(st::langsWidth, titleHeight() + cnt * (st::boxOptionListPadding.top() + st::langsButton.height) + st::boxOptionListPadding.bottom() + st::boxPadding.bottom() + st::boxButtonPadding.top() + _close.height() + st::boxButtonPadding.bottom());
int32 y = st::boxTitleHeight + st::boxOptionListPadding.top();
int32 y = titleHeight() + st::boxOptionListPadding.top();
_options.reserve(cnt);
for (int32 i = 0; i < cnt; ++i) {
int32 v = opts[i];

View File

@ -19,9 +19,9 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
#include "stdafx.h"
#include "lang.h"
#include "boxes/backgroundbox.h"
#include "backgroundbox.h"
#include "lang.h"
#include "mainwidget.h"
#include "mainwindow.h"
#include "window/window_theme.h"

View File

@ -23,22 +23,19 @@ using "basic.style";
using "ui/widgets/widgets.style";
using "intro/intro.style";
boxBlueTitleBg: #6393b5;
boxBlueTitleFg: #ffffff;
boxBlueTitleAdditionalFg: #dae9f5;
boxBlueTitleAdditionalSkip: 12px;
boxBlueTitlePosition: point(23px, 18px);
boxBlueTitleShadow: icon {{ "box_title_shadow", windowShadowFg }};
boxBlockTitleHeight: 48px;
boxBlockTitlePosition: point(18px, 14px);
boxBlockTitleFont: font(boxFontSize semibold);
boxBlockTitleAdditionalSkip: 6px;
boxBlockTitleAdditionalFont: normalFont;
boxBlockTitleShadow: icon {{ "box_title_shadow", windowShadowFg }};
boxBlueClose: MaskButton(defaultMaskButton) {
width: boxTitleHeight;
height: boxTitleHeight;
boxBlockTitleClose: IconButton(defaultIconButton) {
width: boxBlockTitleHeight;
height: boxBlockTitleHeight;
bg: boxBlueTitleBg;
iconBg: #c8e1f0;
iconBgOver: #ffffff;
icon: icon {{ "box_button_close-invert", boxBlueTitleBg }};
icon: boxBlockTitleCloseIcon;
iconOver: boxBlockTitleCloseIconOver;
}
confirmInviteTitle: flatLabel(labelDefFlat) {
@ -147,15 +144,12 @@ contactsMultiSelect: MultiSelect {
fieldIcon: boxFieldSearchIcon;
fieldIconSkip: 36px;
fieldCancel: MaskButton(defaultMaskButton) {
fieldCancel: IconButton {
width: 41px;
height: 48px;
bg: boxSearchBg;
icon: boxSearchCancelIcon;
iconBg: boxSearchCancelIconFg;
iconBgOver: boxSearchCancelIconFgOver;
iconOver: boxSearchCancelIconOver;
iconPosition: point(8px, 18px);
iconPositionDown: point(8px, 18px);

View File

@ -21,6 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "stdafx.h"
#include "boxes/confirmbox.h"
#include "styles/style_boxes.h"
#include "lang.h"
#include "mainwidget.h"
#include "mainwindow.h"
@ -28,7 +29,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "application.h"
#include "ui/buttons/checkbox.h"
#include "core/click_handler_types.h"
#include "styles/style_boxes.h"
#include "localstorage.h"
TextParseOptions _confirmBoxTextOptions = {
@ -316,7 +316,7 @@ ConvertToSupergroupBox::ConvertToSupergroupBox(ChatData *chat) : AbstractBox(st:
_note.setText(st::boxTextFont, lng_profile_convert_warning(lt_bold_start, textcmdStartSemibold(), lt_bold_end, textcmdStopSemibold()), _confirmBoxTextOptions);
_textWidth = st::boxWideWidth - st::boxPadding.left() - st::boxButtonPadding.right();
_textHeight = _text.countHeight(_textWidth);
setMaxHeight(st::boxTitleHeight + _textHeight + st::boxPadding.bottom() + _note.countHeight(_textWidth) + st::boxButtonPadding.top() + _convert->height() + st::boxButtonPadding.bottom());
setMaxHeight(titleHeight() + _textHeight + st::boxPadding.bottom() + _note.countHeight(_textWidth) + st::boxButtonPadding.top() + _convert->height() + st::boxButtonPadding.bottom());
textstyleRestore();
connect(_convert, SIGNAL(clicked()), this, SLOT(onConvert()));
@ -382,8 +382,8 @@ void ConvertToSupergroupBox::paintEvent(QPaintEvent *e) {
// draw box title / text
p.setPen(st::boxTextFg);
textstyleSet(&st::boxTextStyle);
_text.drawLeft(p, st::boxPadding.left(), st::boxTitleHeight, _textWidth, width());
_note.drawLeft(p, st::boxPadding.left(), st::boxTitleHeight + _textHeight + st::boxPadding.bottom(), _textWidth, width());
_text.drawLeft(p, st::boxPadding.left(), titleHeight(), _textWidth, width());
_note.drawLeft(p, st::boxPadding.left(), titleHeight() + _textHeight + st::boxPadding.bottom(), _textWidth, width());
textstyleRestore();
}

View File

@ -93,7 +93,7 @@ void ConfirmPhoneBox::setCallStatus(const CallStatus &status) {
}
void ConfirmPhoneBox::launch() {
setBlueTitle(true);
setBlockTitle(true);
_about = new FlatLabel(this, st::confirmPhoneAboutLabel);
TextWithEntities aboutText;
@ -110,7 +110,7 @@ void ConfirmPhoneBox::launch() {
_send = new BoxButton(this, lang(lng_confirm_phone_send), st::defaultBoxButton);
_cancel = new BoxButton(this, lang(lng_cancel), st::cancelBoxButton);
setMaxHeight(st::boxTitleHeight + st::usernamePadding.top() + _code->height() + st::usernameSkip + _about->height() + st::usernameSkip + _send->height() + st::boxButtonPadding.bottom());
setMaxHeight(titleHeight() + st::usernamePadding.top() + _code->height() + st::usernameSkip + _about->height() + st::usernameSkip + _send->height() + st::boxButtonPadding.bottom());
connect(_send, SIGNAL(clicked()), this, SLOT(onSendCode()));
connect(_cancel, SIGNAL(clicked()), this, SLOT(onClose()));
@ -289,7 +289,7 @@ QString ConfirmPhoneBox::getCallText() const {
void ConfirmPhoneBox::resizeEvent(QResizeEvent *e) {
_code->resize(width() - st::usernamePadding.left() - st::usernamePadding.right(), _code->height());
_code->moveToLeft(st::usernamePadding.left(), st::boxTitleHeight + st::usernamePadding.top());
_code->moveToLeft(st::usernamePadding.left(), titleHeight() + st::usernamePadding.top());
_about->moveToLeft(st::usernamePadding.left(), _code->y() + _code->height() + st::usernameSkip);

View File

@ -19,11 +19,10 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
#include "stdafx.h"
#include "boxes/connectionbox.h"
#include "lang.h"
#include "localstorage.h"
#include "connectionbox.h"
#include "mainwidget.h"
#include "mainwindow.h"
#include "ui/buttons/checkbox.h"
@ -62,7 +61,7 @@ void ConnectionBox::showAll() {
_tcpProxyRadio->show();
_tryIPv6->show();
int32 h = st::boxTitleHeight + st::boxOptionListPadding.top() + _autoRadio->height() + st::boxOptionListPadding.top() + _httpProxyRadio->height() + st::boxOptionListPadding.top() + _tcpProxyRadio->height() + st::boxOptionListPadding.top() + st::connectionIPv6Skip + _tryIPv6->height() + st::boxOptionListPadding.bottom() + st::boxPadding.bottom() + st::boxButtonPadding.top() + _save->height() + st::boxButtonPadding.bottom();
int32 h = titleHeight() + st::boxOptionListPadding.top() + _autoRadio->height() + st::boxOptionListPadding.top() + _httpProxyRadio->height() + st::boxOptionListPadding.top() + _tcpProxyRadio->height() + st::boxOptionListPadding.top() + st::connectionIPv6Skip + _tryIPv6->height() + st::boxOptionListPadding.bottom() + st::boxPadding.bottom() + st::boxButtonPadding.top() + _save->height() + st::boxButtonPadding.bottom();
if (_httpProxyRadio->checked() || _tcpProxyRadio->checked()) {
h += 2 * st::boxOptionListPadding.top() + 2 * _hostInput->height();
_hostInput->show();
@ -97,7 +96,7 @@ void ConnectionBox::paintEvent(QPaintEvent *e) {
}
void ConnectionBox::resizeEvent(QResizeEvent *e) {
_autoRadio->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), st::boxTitleHeight + st::boxOptionListPadding.top());
_autoRadio->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), titleHeight() + st::boxOptionListPadding.top());
_httpProxyRadio->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), _autoRadio->y() + _autoRadio->height() + st::boxOptionListPadding.top());
int32 inputy = 0;
@ -221,7 +220,7 @@ AutoDownloadBox::AutoDownloadBox() : AbstractBox(st::boxWidth)
, _gifPrivate(this, lang(lng_media_auto_private_chats), !(cAutoDownloadGif() & dbiadNoPrivate), st::defaultBoxCheckbox)
, _gifGroups(this, lang(lng_media_auto_groups), !(cAutoDownloadGif() & dbiadNoGroups), st::defaultBoxCheckbox)
, _gifPlay(this, lang(lng_media_auto_play), cAutoPlayGif(), st::defaultBoxCheckbox)
, _sectionHeight(st::boxTitleHeight + 2 * (st::defaultBoxCheckbox.height + st::setLittleSkip))
, _sectionHeight(titleHeight() + 2 * (st::defaultBoxCheckbox.height + st::setLittleSkip))
, _save(this, lang(lng_connection_save), st::defaultBoxButton)
, _cancel(this, lang(lng_cancel), st::cancelBoxButton) {
@ -258,13 +257,13 @@ void AutoDownloadBox::paintEvent(QPaintEvent *e) {
}
void AutoDownloadBox::resizeEvent(QResizeEvent *e) {
_photoPrivate->moveToLeft(st::boxTitlePosition.x(), st::boxTitleHeight + st::setLittleSkip);
_photoPrivate->moveToLeft(st::boxTitlePosition.x(), titleHeight() + st::setLittleSkip);
_photoGroups->moveToLeft(st::boxTitlePosition.x(), _photoPrivate->y() + _photoPrivate->height() + st::setLittleSkip);
_audioPrivate->moveToLeft(st::boxTitlePosition.x(), _sectionHeight + st::boxTitleHeight + st::setLittleSkip);
_audioPrivate->moveToLeft(st::boxTitlePosition.x(), _sectionHeight + titleHeight() + st::setLittleSkip);
_audioGroups->moveToLeft(st::boxTitlePosition.x(), _audioPrivate->y() + _audioPrivate->height() + st::setLittleSkip);
_gifPrivate->moveToLeft(st::boxTitlePosition.x(), 2 * _sectionHeight + st::boxTitleHeight + st::setLittleSkip);
_gifPrivate->moveToLeft(st::boxTitlePosition.x(), 2 * _sectionHeight + titleHeight() + st::setLittleSkip);
_gifGroups->moveToLeft(st::boxTitlePosition.x(), _gifPrivate->y() + _gifPrivate->height() + st::setLittleSkip);
_gifPlay->moveToLeft(st::boxTitlePosition.x(), _gifGroups->y() + _gifGroups->height() + st::setLittleSkip);

View File

@ -22,9 +22,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "boxes/contactsbox.h"
#include "dialogs/dialogs_indexed_list.h"
#include "styles/style_boxes.h"
#include "styles/style_dialogs.h"
#include "styles/style_history.h"
#include "styles/style_boxes.h"
#include "lang.h"
#include "boxes/addcontactbox.h"
#include "mainwidget.h"
@ -307,7 +307,7 @@ void ContactsBox::paintEvent(QPaintEvent *e) {
}
int ContactsBox::getTopScrollSkip() const {
auto result = st::boxTitleHeight;
auto result = titleHeight();
if (!_select->isHidden()) {
result += _select->height();
}
@ -332,7 +332,7 @@ void ContactsBox::resizeEvent(QResizeEvent *e) {
ItemListBox::resizeEvent(e);
_select->resizeToWidth(width());
_select->moveToLeft(0, st::boxTitleHeight);
_select->moveToLeft(0, titleHeight());
updateScrollSkips();

View File

@ -65,7 +65,7 @@ void DownloadPathBox::showAll() {
_save->show();
_cancel->show();
int32 h = st::boxTitleHeight + st::boxOptionListPadding.top() + _default->height() + st::boxOptionListPadding.top() + _temp->height() + st::boxOptionListPadding.top() + _dir->height();
int32 h = titleHeight() + st::boxOptionListPadding.top() + _default->height() + st::boxOptionListPadding.top() + _temp->height() + st::boxOptionListPadding.top() + _dir->height();
if (_dir->checked()) h += st::downloadPathSkip + _pathLink->height();
h += st::boxOptionListPadding.bottom() + st::boxButtonPadding.top() + _save->height() + st::boxButtonPadding.bottom();
@ -80,7 +80,7 @@ void DownloadPathBox::paintEvent(QPaintEvent *e) {
}
void DownloadPathBox::resizeEvent(QResizeEvent *e) {
_default->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), st::boxTitleHeight + st::boxOptionListPadding.top());
_default->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), titleHeight() + st::boxOptionListPadding.top());
_temp->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), _default->y() + _default->height() + st::boxOptionListPadding.top());
_dir->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), _temp->y() + _temp->height() + st::boxOptionListPadding.top());
int32 inputx = st::boxPadding.left() + st::boxOptionListPadding.left() + st::defaultRadiobutton.textPosition.x();

View File

@ -19,9 +19,9 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
*/
#include "stdafx.h"
#include "lang.h"
#include "boxes/emojibox.h"
#include "emojibox.h"
#include "lang.h"
#include "mainwidget.h"
#include "mainwindow.h"
@ -72,13 +72,13 @@ namespace {
}
EmojiBox::EmojiBox() : _esize(EmojiSizes[EIndex + 1]) {
setBlueTitle(true);
setBlockTitle(true);
fillBlocks();
_blockHeight = st::emojiReplaceInnerHeight;
resizeMaxHeight(_blocks[0].size() * st::emojiReplaceWidth + 2 * st::emojiReplacePadding, st::boxTitleHeight + st::emojiReplacePadding + _blocks.size() * st::emojiReplaceHeight + (st::emojiReplaceHeight - _blockHeight) + st::emojiReplacePadding);
resizeMaxHeight(_blocks[0].size() * st::emojiReplaceWidth + 2 * st::emojiReplacePadding, titleHeight() + st::emojiReplacePadding + _blocks.size() * st::emojiReplaceHeight + (st::emojiReplaceHeight - _blockHeight) + st::emojiReplacePadding);
prepare();
}
@ -129,7 +129,7 @@ void EmojiBox::paintEvent(QPaintEvent *e) {
p.setFont(st::emojiTextFont);
p.setPen(st::boxTextFg);
int32 top = st::boxTitleHeight + st::emojiReplacePadding + (st::emojiReplaceHeight - _blockHeight) / 2;
int32 top = titleHeight() + st::emojiReplacePadding + (st::emojiReplaceHeight - _blockHeight) / 2;
for (Blocks::const_iterator i = _blocks.cbegin(), e = _blocks.cend(); i != e; ++i) {
int32 rowSize = i->size(), left = (width() - rowSize * st::emojiReplaceWidth) / 2;
for (BlockRow::const_iterator j = i->cbegin(), en = i->cend(); j != en; ++j) {

View File

@ -34,7 +34,7 @@ _close(this, lang(lng_box_ok), st::defaultBoxButton) {
bool haveTestLang = (cLang() == languageTest);
int32 y = st::boxTitleHeight + st::boxOptionListPadding.top();
int32 y = titleHeight() + st::boxOptionListPadding.top();
_langs.reserve(languageCount + (haveTestLang ? 1 : 0));
if (haveTestLang) {
_langs.push_back(new Ui::Radiobutton(this, qsl("lang"), languageTest, qsl("Custom Lang"), (cLang() == languageTest), st::langsButton));
@ -56,7 +56,7 @@ _close(this, lang(lng_box_ok), st::defaultBoxButton) {
connect(_langs.back(), SIGNAL(changed()), this, SLOT(onChange()));
}
resizeMaxHeight(st::langsWidth, st::boxTitleHeight + (languageCount + (haveTestLang ? 1 : 0)) * (st::boxOptionListPadding.top() + st::langsButton.height) + st::boxOptionListPadding.bottom() + st::boxPadding.bottom() + st::boxButtonPadding.top() + _close.height() + st::boxButtonPadding.bottom());
resizeMaxHeight(st::langsWidth, titleHeight() + (languageCount + (haveTestLang ? 1 : 0)) * (st::boxOptionListPadding.top() + st::langsButton.height) + st::boxOptionListPadding.bottom() + st::boxPadding.bottom() + st::boxButtonPadding.top() + _close.height() + st::boxButtonPadding.bottom());
connect(&_close, SIGNAL(clicked()), this, SLOT(onClose()));

View File

@ -21,10 +21,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "stdafx.h"
#include "boxes/localstoragebox.h"
#include "styles/style_boxes.h"
#include "localstorage.h"
#include "ui/flatbutton.h"
#include "lang.h"
#include "styles/style_boxes.h"
#include "mainwindow.h"
LocalStorageBox::LocalStorageBox() : AbstractBox()
@ -50,8 +50,8 @@ void LocalStorageBox::updateControls() {
rowsHeight = st::linkFont->height + st::localStorageBoxSkip;
}
_clear->setVisible(_imagesCount > 0 || _audiosCount > 0);
setMaxHeight(st::boxTitleHeight + st::localStorageBoxSkip + rowsHeight + _clear->height() + st::boxButtonPadding.top() + _close->height() + st::boxButtonPadding.bottom());
_clear->moveToLeft(st::boxPadding.left(), st::boxTitleHeight + st::localStorageBoxSkip + rowsHeight);
setMaxHeight(titleHeight() + st::localStorageBoxSkip + rowsHeight + _clear->height() + st::boxButtonPadding.top() + _close->height() + st::boxButtonPadding.bottom());
_clear->moveToLeft(st::boxPadding.left(), titleHeight() + st::localStorageBoxSkip + rowsHeight);
_close->moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _close->height());
update();
}
@ -83,7 +83,7 @@ void LocalStorageBox::paintEvent(QPaintEvent *e) {
p.setFont(st::boxTextFont);
p.setPen(st::windowTextFg);
checkLocalStoredCounts();
int top = st::boxTitleHeight + st::localStorageBoxSkip;
int top = titleHeight() + st::localStorageBoxSkip;
if (_imagesCount > 0) {
auto text = lng_settings_images_cached(lt_count, _imagesCount, lt_size, formatSizeText(Local::storageImagesSize() + Local::storageStickersSize() + Local::storageWebFilesSize()));
p.drawTextLeft(st::boxPadding.left(), top, width(), text);

View File

@ -75,7 +75,7 @@ PasscodeBox::PasscodeBox(const QByteArray &newSalt, const QByteArray &curSalt, b
}
void PasscodeBox::init() {
setBlueTitle(true);
setBlockTitle(true);
textstyleSet(&st::usernameTextStyle);
_about.setRichText(st::normalFont, lang(_cloudPwd ? lng_cloud_password_about : lng_passcode_about));
@ -84,17 +84,17 @@ void PasscodeBox::init() {
if (_turningOff) {
_oldPasscode.show();
_boxTitle = lang(_cloudPwd ? lng_cloud_password_remove : lng_passcode_remove);
setMaxHeight(st::boxTitleHeight + st::passcodePadding.top() + _oldPasscode.height() + st::passcodeSkip + ((_hasRecovery && !_hintText.isEmpty()) ? st::passcodeSkip : 0) + _aboutHeight + st::passcodePadding.bottom() + st::boxButtonPadding.top() + _saveButton.height() + st::boxButtonPadding.bottom());
setMaxHeight(titleHeight() + st::passcodePadding.top() + _oldPasscode.height() + st::passcodeSkip + ((_hasRecovery && !_hintText.isEmpty()) ? st::passcodeSkip : 0) + _aboutHeight + st::passcodePadding.bottom() + st::boxButtonPadding.top() + _saveButton.height() + st::boxButtonPadding.bottom());
} else {
bool has = _cloudPwd ? (!_curSalt.isEmpty()) : Global::LocalPasscode();
if (has) {
_oldPasscode.show();
_boxTitle = lang(_cloudPwd ? lng_cloud_password_change : lng_passcode_change);
setMaxHeight(st::boxTitleHeight + st::passcodePadding.top() + _oldPasscode.height() + st::passcodeSkip + ((_hasRecovery && !_hintText.isEmpty()) ? st::passcodeSkip : 0) + _newPasscode.height() + st::contactSkip + _reenterPasscode.height() + st::passcodeSkip + (_cloudPwd ? _passwordHint.height() + st::contactSkip : 0) + _aboutHeight + st::passcodePadding.bottom() + st::boxButtonPadding.top() + _saveButton.height() + st::boxButtonPadding.bottom());
setMaxHeight(titleHeight() + st::passcodePadding.top() + _oldPasscode.height() + st::passcodeSkip + ((_hasRecovery && !_hintText.isEmpty()) ? st::passcodeSkip : 0) + _newPasscode.height() + st::contactSkip + _reenterPasscode.height() + st::passcodeSkip + (_cloudPwd ? _passwordHint.height() + st::contactSkip : 0) + _aboutHeight + st::passcodePadding.bottom() + st::boxButtonPadding.top() + _saveButton.height() + st::boxButtonPadding.bottom());
} else {
_oldPasscode.hide();
_boxTitle = lang(_cloudPwd ? lng_cloud_password_create : lng_passcode_create);
setMaxHeight(st::boxTitleHeight + st::passcodePadding.top() + _newPasscode.height() + st::contactSkip + _reenterPasscode.height() + st::passcodeSkip + (_cloudPwd ? _passwordHint.height() + st::contactSkip : 0) + _aboutHeight + (_cloudPwd ? st::contactSkip + _recoverEmail.height() + st::passcodeSkip : st::passcodePadding.bottom()) + st::boxButtonPadding.top() + _saveButton.height() + st::boxButtonPadding.bottom());
setMaxHeight(titleHeight() + st::passcodePadding.top() + _newPasscode.height() + st::contactSkip + _reenterPasscode.height() + st::passcodeSkip + (_cloudPwd ? _passwordHint.height() + st::contactSkip : 0) + _aboutHeight + (_cloudPwd ? st::contactSkip + _recoverEmail.height() + st::passcodeSkip : st::passcodePadding.bottom()) + st::boxButtonPadding.top() + _saveButton.height() + st::boxButtonPadding.bottom());
}
}
@ -233,7 +233,7 @@ void PasscodeBox::resizeEvent(QResizeEvent *e) {
bool has = _cloudPwd ? (!_curSalt.isEmpty()) : Global::LocalPasscode();
int32 w = st::boxWidth - st::boxPadding.left() - st::boxPadding.right();
_oldPasscode.resize(w, _oldPasscode.height());
_oldPasscode.moveToLeft(st::boxPadding.left(), st::boxTitleHeight + st::passcodePadding.top());
_oldPasscode.moveToLeft(st::boxPadding.left(), titleHeight() + st::passcodePadding.top());
_newPasscode.resize(w, _newPasscode.height());
_newPasscode.moveToLeft(st::boxPadding.left(), _oldPasscode.y() + ((_turningOff || has) ? (_oldPasscode.height() + st::passcodeSkip + ((_hasRecovery && !_hintText.isEmpty()) ? st::passcodeSkip : 0)) : 0));
_reenterPasscode.resize(w, _reenterPasscode.height());
@ -496,9 +496,9 @@ RecoverBox::RecoverBox(const QString &pattern) : AbstractBox(st::boxWidth)
, _saveButton(this, lang(lng_passcode_submit), st::defaultBoxButton)
, _cancelButton(this, lang(lng_cancel), st::cancelBoxButton)
, _recoverCode(this, st::defaultInputField, lang(lng_signin_code)) {
setBlueTitle(true);
setBlockTitle(true);
setMaxHeight(st::boxTitleHeight + st::passcodePadding.top() + st::passcodeSkip + _recoverCode.height() + st::passcodeSkip + st::passcodePadding.bottom() + st::boxButtonPadding.top() + _saveButton.height() + st::boxButtonPadding.bottom());
setMaxHeight(titleHeight() + st::passcodePadding.top() + st::passcodeSkip + _recoverCode.height() + st::passcodeSkip + st::passcodePadding.bottom() + st::boxButtonPadding.top() + _saveButton.height() + st::boxButtonPadding.bottom());
connect(&_saveButton, SIGNAL(clicked()), this, SLOT(onSubmit()));
connect(&_cancelButton, SIGNAL(clicked()), this, SLOT(onClose()));
@ -535,7 +535,7 @@ void RecoverBox::paintEvent(QPaintEvent *e) {
void RecoverBox::resizeEvent(QResizeEvent *e) {
_recoverCode.resize(st::boxWidth - st::boxPadding.left() - st::boxPadding.right(), _recoverCode.height());
_recoverCode.moveToLeft(st::boxPadding.left(), st::boxTitleHeight + st::passcodePadding.top() + st::passcodeSkip);
_recoverCode.moveToLeft(st::boxPadding.left(), titleHeight() + st::passcodePadding.top() + st::passcodeSkip);
_saveButton.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _saveButton.height());
_cancelButton.moveToRight(st::boxButtonPadding.right() + _saveButton.width() + st::boxButtonPadding.left(), _saveButton.y());

View File

@ -57,7 +57,7 @@ void ReportBox::paintEvent(QPaintEvent *e) {
}
void ReportBox::resizeEvent(QResizeEvent *e) {
_reasonSpam->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), st::boxTitleHeight + st::boxOptionListPadding.top());
_reasonSpam->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), titleHeight() + st::boxOptionListPadding.top());
_reasonViolence->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), _reasonSpam->y() + _reasonSpam->height() + st::boxOptionListPadding.top());
_reasonPornography->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), _reasonViolence->y() + _reasonViolence->height() + st::boxOptionListPadding.top());
_reasonOther->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), _reasonPornography->y() + _reasonPornography->height() + st::boxOptionListPadding.top());
@ -143,7 +143,7 @@ bool ReportBox::reportFail(const RPCError &error) {
}
void ReportBox::updateMaxHeight() {
int32 h = st::boxTitleHeight + 4 * (st::boxOptionListPadding.top() + _reasonSpam->height()) + st::boxButtonPadding.top() + _report->height() + st::boxButtonPadding.bottom();
int32 h = titleHeight() + 4 * (st::boxOptionListPadding.top() + _reasonSpam->height()) + st::boxButtonPadding.top() + _report->height() + st::boxButtonPadding.bottom();
if (_reasonOtherText) {
h += st::newGroupDescriptionPadding.top() + _reasonOtherText->height() + st::newGroupDescriptionPadding.bottom();
}

View File

@ -45,7 +45,7 @@ SessionsBox::SessionsBox() : ScrollableBox(st::sessionsScroll)
connect(App::wnd(), SIGNAL(newAuthorization()), this, SLOT(onNewAuthorization()));
connect(&_shortPollTimer, SIGNAL(timeout()), this, SLOT(onShortPollAuthorizations()));
init(_inner, st::boxButtonPadding.bottom() + _done.height() + st::boxButtonPadding.top(), st::boxTitleHeight);
init(_inner, st::boxButtonPadding.bottom() + _done.height() + st::boxButtonPadding.top(), titleHeight());
_inner->resize(width(), st::noContactsHeight);
prepare();
@ -76,7 +76,7 @@ void SessionsBox::paintEvent(QPaintEvent *e) {
if (paint(p)) return;
paintTitle(p, lang(lng_sessions_other_header));
p.translate(0, st::boxTitleHeight);
p.translate(0, titleHeight());
if (_loading) {
p.setFont(st::noContactsFont->f);

View File

@ -83,7 +83,7 @@ ShareBox::ShareBox(CopyCallback &&copyCallback, SubmitCallback &&submitCallback,
}
int ShareBox::getTopScrollSkip() const {
auto result = st::boxTitleHeight;
auto result = titleHeight();
if (!_select->isHidden()) {
result += _select->height();
}
@ -186,7 +186,7 @@ void ShareBox::resizeEvent(QResizeEvent *e) {
ItemListBox::resizeEvent(e);
_select->resizeToWidth(width());
_select->moveToLeft(0, st::boxTitleHeight);
_select->moveToLeft(0, titleHeight());
updateScrollSkips();

View File

@ -188,7 +188,7 @@ void StickersBox::setup() {
_aboutHeight = st::stickersReorderPadding.top() + _about.countHeight(_aboutWidth) + st::stickersReorderPadding.bottom();
_topShadow.create(this, st::contactsAboutShadow);
}
ItemListBox::init(_inner, bottomSkip, st::boxTitleHeight + _aboutHeight);
ItemListBox::init(_inner, bottomSkip, titleHeight() + _aboutHeight);
setMaxHeight(snap(countHeight(), int32(st::sessionsHeight), int32(st::boxMaxListHeight)));
connect(App::main(), SIGNAL(stickersUpdated()), this, SLOT(onStickersUpdated()));
@ -244,7 +244,7 @@ int32 StickersBox::countHeight() const {
if (_section == Section::Installed) {
bottomSkip = st::boxButtonPadding.top() + _save->height() + st::boxButtonPadding.bottom();
}
return st::boxTitleHeight + _aboutHeight + _inner->height() + bottomSkip;
return titleHeight() + _aboutHeight + _inner->height() + bottomSkip;
}
void StickersBox::disenableDone(const MTPmessages_StickerSetInstallResult &result, mtpRequestId req) {
@ -306,7 +306,7 @@ void StickersBox::paintEvent(QPaintEvent *e) {
return lang(lng_stickers_archived);
})();
paintTitle(p, title);
p.translate(0, st::boxTitleHeight);
p.translate(0, titleHeight());
if (_aboutHeight > 0) {
p.fillRect(0, 0, width(), _aboutHeight, st::contactsAboutBg);
@ -343,7 +343,7 @@ void StickersBox::resizeEvent(QResizeEvent *e) {
_inner->setVisibleScrollbar((scrollArea()->scrollTopMax() > 0) ? (st::boxScroll.width - st::boxScroll.deltax) : 0);
updateVisibleTopBottom();
if (_topShadow) {
_topShadow->setGeometry(0, st::boxTitleHeight + _aboutHeight, width(), st::lineWidth);
_topShadow->setGeometry(0, titleHeight() + _aboutHeight, width(), st::lineWidth);
}
if (_save) {
_save->moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _save->height());

View File

@ -200,9 +200,9 @@ void StickerSetBox::Inner::gotSet(const MTPmessages_StickerSet &set) {
}
}
if (d.vset.type() == mtpc_stickerSet) {
auto &s(d.vset.c_stickerSet());
auto &s = d.vset.c_stickerSet();
_setTitle = stickerSetTitle(s);
_title = st::boxTitleFont->elided(_setTitle, width() - st::boxTitlePosition.x() - st::boxTitleHeight);
_title = st::boxBlockTitleFont->elided(_setTitle, width() - st::boxBlockTitlePosition.x() - st::boxBlockTitleHeight);
_setShortName = qs(s.vshort_name);
_setId = s.vid.v;
_setAccess = s.vaccess_hash.v;

View File

@ -33,13 +33,13 @@ _username(this, st::defaultInputField, qsl("@username"), App::self()->username,
_link(this, QString(), st::defaultBoxLinkButton),
_saveRequestId(0), _checkRequestId(0),
_about(st::boxWidth - st::usernamePadding.left()) {
setBlueTitle(true);
setBlockTitle(true);
_goodText = App::self()->username.isEmpty() ? QString() : lang(lng_username_available);
textstyleSet(&st::usernameTextStyle);
_about.setRichText(st::boxTextFont, lang(lng_username_about));
resizeMaxHeight(st::boxWidth, st::boxTitleHeight + st::usernamePadding.top() + _username.height() + st::usernameSkip + _about.countHeight(st::boxWidth - st::usernamePadding.left()) + 3 * st::usernameTextStyle.lineHeight + st::usernamePadding.bottom() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom());
resizeMaxHeight(st::boxWidth, titleHeight() + st::usernamePadding.top() + _username.height() + st::usernameSkip + _about.countHeight(st::boxWidth - st::usernamePadding.left()) + 3 * st::usernameTextStyle.lineHeight + st::usernamePadding.bottom() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom());
textstyleRestore();
connect(&_save, SIGNAL(clicked()), this, SLOT(onSave()));
@ -106,7 +106,7 @@ void UsernameBox::paintEvent(QPaintEvent *e) {
void UsernameBox::resizeEvent(QResizeEvent *e) {
_username.resize(width() - st::usernamePadding.left() - st::usernamePadding.right(), _username.height());
_username.moveToLeft(st::usernamePadding.left(), st::boxTitleHeight + st::usernamePadding.top());
_username.moveToLeft(st::usernamePadding.left(), titleHeight() + st::usernamePadding.top());
textstyleSet(&st::usernameTextStyle);
int32 availw = st::boxWidth - st::usernamePadding.left(), h = _about.countHeight(availw);

View File

@ -22,7 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "core/utils.h"
#define BETA_VERSION_MACRO (10019002ULL)
#define BETA_VERSION_MACRO (10019003ULL)
constexpr int AppVersion = 10020;
constexpr str_const AppVersionStr = "0.10.20";

View File

@ -195,6 +195,9 @@ historySend: IconButton {
iconPosition: point(11px, 11px);
iconPositionDown: point(11px, 11px);
}
historyEditSaveIcon: icon {{ "send_control_save", historySendIconFg, point(3px, 7px) }};
historyEditSaveIconOver: icon {{ "send_control_save", historySendIconFgOver, point(3px, 7px) }};
historyAttach: IconButton(historySend) {
icon: icon {{ "send_control_attach", historyComposeIconFg }};
iconOver: icon {{ "send_control_attach", historyComposeIconFgOver }};
@ -276,17 +279,17 @@ historyReplyIconPosition: point(13px, 13px);
historyReplyIcon: icon {{ "history_action_reply", #6fa1d2 }};
historyForwardIcon: icon {{ "history_action_forward", #6fa1d2 }};
historyEditIcon: icon {{ "history_action_edit", #6fa1d2 }};
historyReplyCancel: MaskButton(defaultMaskButton) {
historyReplyCancel: IconButton {
width: 49px;
height: 49px;
bg: historyReplyBg;
icon: historyReplyCancelIcon;
iconOver: historyReplyCancelIconOver;
iconBg: historyReplyCancelIconFg;
iconBgOver: historyReplyCancelIconFgOver;
iconPosition: point(-1px, -1px);
iconPositionDown: point(-1px, -1px);
}
historyInlineBotCancel: MaskButton(historyReplyCancel) {
historyInlineBotCancel: IconButton(historyReplyCancel) {
height: 46px;
}

View File

@ -2996,10 +2996,10 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent)
, _fieldAutocomplete(this)
, _reportSpamPanel(this)
, _send(this, st::historySend)
, _unblock(this, lang(lng_unblock_button), st::historyUnblock)
, _botStart(this, lang(lng_bot_start), st::historyComposeButton)
, _joinChannel(this, lang(lng_channel_join), st::historyComposeButton)
, _muteUnmute(this, lang(lng_channel_mute), st::historyComposeButton)
, _unblock(this, lang(lng_unblock_button).toUpper(), st::historyUnblock)
, _botStart(this, lang(lng_bot_start).toUpper(), st::historyComposeButton)
, _joinChannel(this, lang(lng_channel_join).toUpper(), st::historyComposeButton)
, _muteUnmute(this, lang(lng_channel_mute).toUpper(), st::historyComposeButton)
, _attachToggle(this, st::historyAttach)
, _attachEmoji(this, st::historyAttachEmoji)
, _botKeyboardShow(this, st::historyBotKeyboardShow)
@ -6473,7 +6473,7 @@ void HistoryWidget::clearInlineBot() {
void HistoryWidget::inlineBotChanged() {
bool isInlineBot = _inlineBot && (_inlineBot != LookingUpInlineBot);
if (isInlineBot && !_inlineBotCancel) {
_inlineBotCancel = std_::make_unique<Ui::MaskButton>(this, st::historyInlineBotCancel);
_inlineBotCancel = std_::make_unique<Ui::IconButton>(this, st::historyInlineBotCancel);
connect(_inlineBotCancel.get(), SIGNAL(clicked()), this, SLOT(onInlineBotCancel()));
_inlineBotCancel->setGeometry(_send->geometry());
_attachEmoji->raise();
@ -6514,14 +6514,14 @@ void HistoryWidget::onCheckFieldAutocomplete() {
void HistoryWidget::updateFieldPlaceholder() {
if (_editMsgId) {
_field->setPlaceholder(lang(lng_edit_message_text));
// _send->setText(lang(lng_settings_save));
_send->setIcon(&st::historyEditSaveIcon, &st::historyEditSaveIconOver);
} else {
if (_inlineBot && _inlineBot != LookingUpInlineBot) {
_field->setPlaceholder(_inlineBot->botInfo->inlinePlaceholder.mid(1), _inlineBot->username.size() + 2);
} else {
_field->setPlaceholder(lang((_history && _history->isChannel() && !_history->isMegagroup()) ? (_silent->checked() ? lng_broadcast_silent_ph : lng_broadcast_ph) : lng_message_ph));
}
// _send->setText(lang(lng_send_button));
_send->setIcon(nullptr);
}
}

View File

@ -42,7 +42,6 @@ class DropdownMenu;
class PlainShadow;
class PopupMenu;
class IconButton;
class MaskButton;
class HistoryDownButton;
class EmojiButton;
} // namespace Ui
@ -897,7 +896,7 @@ private:
Text _replyEditMsgText;
mutable SingleTimer _updateEditTimeLeftDisplay;
ChildWidget<Ui::MaskButton> _fieldBarCancel;
ChildWidget<Ui::IconButton> _fieldBarCancel;
void updateReplyEditTexts(bool force = false);
struct PinnedBar {
@ -907,7 +906,7 @@ private:
MsgId msgId = 0;
HistoryItem *msg = nullptr;
Text text;
ChildWidget<Ui::MaskButton> cancel;
ChildWidget<Ui::IconButton> cancel;
ChildWidget<Ui::PlainShadow> shadow;
};
std_::unique_ptr<PinnedBar> _pinnedBar;
@ -1087,7 +1086,7 @@ private:
UserData *_inlineBot = nullptr;
QString _inlineBotUsername;
mtpRequestId _inlineBotResolveRequestId = 0;
std_::unique_ptr<Ui::MaskButton> _inlineBotCancel;
std_::unique_ptr<Ui::IconButton> _inlineBotCancel;
void inlineBotResolveDone(const MTPcontacts_ResolvedPeer &result);
bool inlineBotResolveFail(QString name, const RPCError &error);

View File

@ -559,6 +559,7 @@ void MainWindow::showConnecting(const QString &text, const QString &reconnect) {
_connecting->set(text, reconnect);
} else {
_connecting.create(bodyWidget(), text, reconnect);
_connecting->show();
updateControlsGeometry();
fixOrder();
}

View File

@ -215,7 +215,7 @@ mediaPlayerScroll: flatScroll(solidScroll) {
}
mediaPlayerListHeightMax: 280px;
mediaPlayerListMarginBottom: 10px;
mediaPlayerScrollShadow: icon {{ "playlist_shadow", #000000 }};
mediaPlayerScrollShadow: icon {{ "playlist_shadow", windowShadowFg }};
mediaPlayerListMarginTop: 8px;
mediaPlayerListIconFg: #ffffff;

View File

@ -31,21 +31,12 @@ settingsMargin: 48px;
settingsFixedBarHeight: 52px;
settingsFixedBarFont: font(14px semibold);
settingsFixedBarFg: windowTextFg;
settingsFixedBarTextLeft: 20px;
settingsFixedBarTextTop: 16px;
settingsFixedBarClose: MaskButton(defaultMaskButton) {
settingsFixedBarClose: IconButton(boxBlockTitleClose) {
width: settingsFixedBarHeight;
height: settingsFixedBarHeight;
bg: settingsFixedBarBg;
icon: settingsFixedBarCloseIcon;
iconBg: settingsCloseFg;
iconBgOver: settingsCloseFgOver;
}
settingsFixedBarShadowBg1: #00000021;
settingsFixedBarShadowBg2: #0000000b;
settingsMarginTop: 34px;
settingsPhotoSize: 112px;

View File

@ -48,7 +48,7 @@ void FixedBar::resizeEvent(QResizeEvent *e) {
void FixedBar::paintEvent(QPaintEvent *e) {
Painter p(this);
p.fillRect(e->rect(), st::settingsFixedBarBg);
p.fillRect(e->rect(), st::boxBlockTitleBg);
p.setFont(st::settingsFixedBarFont);
p.setPen(st::windowTextFg);

View File

@ -21,7 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#pragma once
namespace Ui {
class MaskButton;
class IconButton;
} // namespace Ui
namespace Settings {
@ -37,7 +37,7 @@ protected:
int resizeGetHeight(int newWidth) override;
private:
ChildWidget<Ui::MaskButton> _close;
ChildWidget<Ui::IconButton> _close;
};

View File

@ -128,14 +128,12 @@ Widget::Widget(QWidget *parent) : LayerWidget(parent)
, _scroll(this, st::setScroll)
, _inner(this)
, _fixedBar(this)
, _fixedBarShadow1(this, st::settingsFixedBarShadowBg1)
, _fixedBarShadow2(this, st::settingsFixedBarShadowBg2) {
, _fixedBarShadow(this, st::boxBlockTitleShadow) {
_scroll->setOwnedWidget(_inner);
setAttribute(Qt::WA_OpaquePaintEvent);
_fixedBar->move(0, 0);
_fixedBarShadow1->move(0, _fixedBar->y() + st::settingsFixedBarHeight);
_fixedBarShadow2->move(0, _fixedBarShadow1->y() + st::lineWidth);
_fixedBarShadow->move(0, _fixedBar->y() + st::settingsFixedBarHeight);
_scroll->move(0, st::settingsFixedBarHeight);
connect(_inner, SIGNAL(heightUpdated()), this, SLOT(onInnerHeightUpdated()));
@ -211,8 +209,7 @@ void Widget::resizeEvent(QResizeEvent *e) {
}
_fixedBar->resizeToWidth(width());
_fixedBarShadow1->resize(width(), st::lineWidth);
_fixedBarShadow2->resize(width(), st::lineWidth);
_fixedBarShadow->resize(width(), st::boxBlockTitleShadow.height());
QSize scrollSize(width(), height() - _fixedBar->height());
if (_scroll->size() != scrollSize) {

View File

@ -23,7 +23,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "layerwidget.h"
namespace Ui {
class PlainShadow;
class GradientShadow;
} // namespace Ui
namespace Settings {
@ -54,7 +54,7 @@ private:
ChildWidget<ScrollArea> _scroll;
ChildWidget<InnerWidget> _inner;
ChildWidget<FixedBar> _fixedBar;
ChildWidget<Ui::PlainShadow> _fixedBarShadow1, _fixedBarShadow2;
ChildWidget<Ui::GradientShadow> _fixedBarShadow;
int _contentLeft = 0;

View File

@ -60,6 +60,9 @@ void IconButton::paintEvent(QPaintEvent *e) {
if (position.x() < 0) {
position.setX((width() - icon->width()) / 2);
}
if (position.y() < 0) {
position.setY((height() - icon->height()) / 2);
}
icon->paint(p, position, width());
if (over > 0. && over < 1.) {
auto iconOver = overIcon();

View File

@ -201,7 +201,7 @@ CountrySelectBox::CountrySelectBox() : ItemListBox(st::countriesScroll, st::boxW
, _topShadow(this) {
_select->resizeToWidth(st::boxWidth);
ItemListBox::init(_inner, st::boxScrollSkip, st::boxTitleHeight + _select->height());
ItemListBox::init(_inner, st::boxScrollSkip, titleHeight() + _select->height());
_select->setQueryChangedCallback([this](const QString &query) { onFilterUpdate(query); });
_select->setSubmittedCallback([this](bool) { onSubmit(); });
@ -240,10 +240,10 @@ void CountrySelectBox::resizeEvent(QResizeEvent *e) {
ItemListBox::resizeEvent(e);
_select->resizeToWidth(width());
_select->moveToLeft(0, st::boxTitleHeight);
_select->moveToLeft(0, titleHeight());
_inner->resizeToWidth(width());
_topShadow.setGeometry(0, st::boxTitleHeight + _select->height(), width(), st::lineWidth);
_topShadow.setGeometry(0, titleHeight() + _select->height(), width(), st::lineWidth);
}
void CountrySelectBox::showAll() {

View File

@ -26,7 +26,7 @@ class InputField;
namespace Ui {
class MaskButton;
class IconButton;
class MultiSelect : public TWidget {
public:
@ -154,7 +154,7 @@ private:
int _fieldTop = 0;
int _fieldWidth = 0;
ChildWidget<InputField> _field;
ChildWidget<Ui::MaskButton> _cancel;
ChildWidget<Ui::IconButton> _cancel;
int _newHeight = 0;
IntAnimation _height;

View File

@ -119,7 +119,7 @@ MultiSelect {
fieldMinWidth: pixels;
fieldIcon: icon;
fieldIconSkip: pixels;
fieldCancel: MaskButton;
fieldCancel: IconButton;
fieldCancelSkip: pixels;
}
@ -181,6 +181,11 @@ defaultLabelSimple: LabelSimple {
textFg: windowTextFg;
}
defaultIconButton: IconButton {
iconPosition: point(-1px, -1px);
iconPositionDown: point(-1px, -1px);
}
defaultMaskButton: MaskButton {
iconPosition: point(-1px, -1px);
iconPositionDown: point(-1px, -1px);

View File

@ -3,4 +3,4 @@ AppVersionStrMajor 0.10
AppVersionStrSmall 0.10.20
AppVersionStr 0.10.20
AlphaChannel 0
BetaVersion 10019002
BetaVersion 10019003