10019003: Some compose area icons improved. Box headers redesigned.
|
@ -1061,9 +1061,12 @@ infoButton: PeerAvatarButton {
|
||||||
profileTopBarBackIconFg: #0290d7;
|
profileTopBarBackIconFg: #0290d7;
|
||||||
profileTopBarBackIcon: icon {{ "title_back", profileTopBarBackIconFg }};
|
profileTopBarBackIcon: icon {{ "title_back", profileTopBarBackIconFg }};
|
||||||
|
|
||||||
historyReplyCancelIcon: icon {{ "box_button_close-invert", historyReplyBg }};
|
historyReplyCancelIcon: icon {{ "box_button_close", historyReplyCancelFg }};
|
||||||
boxSearchCancelIcon: icon {{ "box_button_close-invert", boxSearchBg }};
|
historyReplyCancelIconOver: icon {{ "box_button_close", historyReplyCancelFgOver }};
|
||||||
settingsFixedBarCloseIcon: icon {{ "box_button_close-invert", settingsFixedBarBg }};
|
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 }};
|
notifyFadeRight: icon {{ "fade_horizontal", notificationBg }};
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,12 @@ boxSearchBg: boxBg;
|
||||||
boxSearchCancelIconFg: cancelIconFg;
|
boxSearchCancelIconFg: cancelIconFg;
|
||||||
boxSearchCancelIconFgOver: cancelIconFgOver;
|
boxSearchCancelIconFgOver: cancelIconFgOver;
|
||||||
|
|
||||||
|
boxBlockTitleBg: boxBg;
|
||||||
|
boxBlockTitleFg: boxTitleFg;
|
||||||
|
boxBlockTitleAdditionalFg: #808080;
|
||||||
|
boxBlockTitleCloseFg: cancelIconFg;
|
||||||
|
boxBlockTitleCloseFgOver: cancelIconFgOver;
|
||||||
|
|
||||||
membersAboutLimitFg: windowSubTextFg;
|
membersAboutLimitFg: windowSubTextFg;
|
||||||
|
|
||||||
contactsBg: windowBg;
|
contactsBg: windowBg;
|
||||||
|
@ -91,10 +97,6 @@ photoCropFadeBg: #0000007f;
|
||||||
photoCropPointFg: #ffffff7f;
|
photoCropPointFg: #ffffff7f;
|
||||||
|
|
||||||
// settings
|
// settings
|
||||||
settingsFixedBarBg: boxBg;
|
|
||||||
settingsCloseFg: cancelIconFg;
|
|
||||||
settingsCloseFgOver: cancelIconFgOver;
|
|
||||||
|
|
||||||
notificationsBoxMonitorFg: windowTextFg;
|
notificationsBoxMonitorFg: windowTextFg;
|
||||||
|
|
||||||
notificationSampleUserpicFg: windowActiveBg;
|
notificationSampleUserpicFg: windowActiveBg;
|
||||||
|
@ -173,8 +175,8 @@ historySendIconFg: windowActiveBg;
|
||||||
historySendIconFgOver: windowActiveBg;
|
historySendIconFgOver: windowActiveBg;
|
||||||
historyPinnedBg: historyComposeAreaBg;
|
historyPinnedBg: historyComposeAreaBg;
|
||||||
historyReplyBg: historyComposeAreaBg;
|
historyReplyBg: historyComposeAreaBg;
|
||||||
historyReplyCancelIconFg: cancelIconFg;
|
historyReplyCancelFg: cancelIconFg;
|
||||||
historyReplyCancelIconFgOver: cancelIconFgOver;
|
historyReplyCancelFgOver: cancelIconFgOver;
|
||||||
|
|
||||||
historyComposeButtonBg: historyComposeAreaBg;
|
historyComposeButtonBg: historyComposeAreaBg;
|
||||||
historyComposeButtonBgOver: #f5f5f5;
|
historyComposeButtonBgOver: #f5f5f5;
|
||||||
|
|
Before Width: | Height: | Size: 85 B After Width: | Height: | Size: 85 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 240 B |
After Width: | Height: | Size: 358 B |
After Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.0 KiB |
|
@ -67,15 +67,17 @@ boxTitleFg: #404040;
|
||||||
boxSearchBg: boxBg;
|
boxSearchBg: boxBg;
|
||||||
boxSearchCancelIconFg: cancelIconFg;
|
boxSearchCancelIconFg: cancelIconFg;
|
||||||
boxSearchCancelIconFgOver: cancelIconFgOver;
|
boxSearchCancelIconFgOver: cancelIconFgOver;
|
||||||
|
boxBlockTitleBg: boxBg;
|
||||||
|
boxBlockTitleFg: boxTitleFg;
|
||||||
|
boxBlockTitleAdditionalFg: #808080;
|
||||||
|
boxBlockTitleCloseFg: cancelIconFg;
|
||||||
|
boxBlockTitleCloseFgOver: cancelIconFgOver;
|
||||||
membersAboutLimitFg: windowSubTextFg;
|
membersAboutLimitFg: windowSubTextFg;
|
||||||
contactsBg: windowBg;
|
contactsBg: windowBg;
|
||||||
contactsBgOver: windowOverBg;
|
contactsBgOver: windowOverBg;
|
||||||
contactsNameFg: boxTextFg;
|
contactsNameFg: boxTextFg;
|
||||||
photoCropFadeBg: #0000007f;
|
photoCropFadeBg: #0000007f;
|
||||||
photoCropPointFg: #ffffff7f;
|
photoCropPointFg: #ffffff7f;
|
||||||
settingsFixedBarBg: boxBg;
|
|
||||||
settingsCloseFg: cancelIconFg;
|
|
||||||
settingsCloseFgOver: cancelIconFgOver;
|
|
||||||
notificationsBoxMonitorFg: windowTextFg;
|
notificationsBoxMonitorFg: windowTextFg;
|
||||||
notificationSampleUserpicFg: windowActiveBg;
|
notificationSampleUserpicFg: windowActiveBg;
|
||||||
notificationSampleCloseFg: #d7d7d7; // windowSubTextFg;
|
notificationSampleCloseFg: #d7d7d7; // windowSubTextFg;
|
||||||
|
@ -141,8 +143,8 @@ historySendIconFg: windowActiveBg;
|
||||||
historySendIconFgOver: windowActiveBg;
|
historySendIconFgOver: windowActiveBg;
|
||||||
historyPinnedBg: historyComposeAreaBg;
|
historyPinnedBg: historyComposeAreaBg;
|
||||||
historyReplyBg: historyComposeAreaBg;
|
historyReplyBg: historyComposeAreaBg;
|
||||||
historyReplyCancelIconFg: cancelIconFg;
|
historyReplyCancelFg: cancelIconFg;
|
||||||
historyReplyCancelIconFgOver: cancelIconFgOver;
|
historyReplyCancelFgOver: cancelIconFgOver;
|
||||||
historyComposeButtonBg: historyComposeAreaBg;
|
historyComposeButtonBg: historyComposeAreaBg;
|
||||||
historyComposeButtonBgOver: #f5f5f5;
|
historyComposeButtonBgOver: #f5f5f5;
|
||||||
historyTextInFg: windowTextFg;
|
historyTextInFg: windowTextFg;
|
||||||
|
|
|
@ -34,8 +34,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,10,19,2
|
FILEVERSION 0,10,19,3
|
||||||
PRODUCTVERSION 0,10,19,2
|
PRODUCTVERSION 0,10,19,3
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -51,10 +51,10 @@ BEGIN
|
||||||
BLOCK "040904b0"
|
BLOCK "040904b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileVersion", "0.10.19.2"
|
VALUE "FileVersion", "0.10.19.3"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "0.10.19.2"
|
VALUE "ProductVersion", "0.10.19.3"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,10,19,2
|
FILEVERSION 0,10,19,3
|
||||||
PRODUCTVERSION 0,10,19,2
|
PRODUCTVERSION 0,10,19,3
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -43,10 +43,10 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Telegram Messenger LLP"
|
VALUE "CompanyName", "Telegram Messenger LLP"
|
||||||
VALUE "FileDescription", "Telegram Updater"
|
VALUE "FileDescription", "Telegram Updater"
|
||||||
VALUE "FileVersion", "0.10.19.2"
|
VALUE "FileVersion", "0.10.19.3"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2016"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "0.10.19.2"
|
VALUE "ProductVersion", "0.10.19.3"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
@ -19,15 +19,13 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||||
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
*/
|
*/
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "lang.h"
|
#include "boxes/aboutbox.h"
|
||||||
|
|
||||||
#include "aboutbox.h"
|
#include "lang.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include "autoupdater.h"
|
#include "autoupdater.h"
|
||||||
#include "boxes/confirmbox.h"
|
#include "boxes/confirmbox.h"
|
||||||
|
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
|
|
||||||
AboutBox::AboutBox() : AbstractBox(st::aboutWidth)
|
AboutBox::AboutBox() : AbstractBox(st::aboutWidth)
|
||||||
|
@ -38,7 +36,7 @@ AboutBox::AboutBox() : AbstractBox(st::aboutWidth)
|
||||||
, _done(this, lang(lng_close), st::defaultBoxButton) {
|
, _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]")));
|
_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(&_version, SIGNAL(clicked()), this, SLOT(onVersion()));
|
||||||
connect(&_done, SIGNAL(clicked()), this, SLOT(onClose()));
|
connect(&_done, SIGNAL(clicked()), this, SLOT(onClose()));
|
||||||
|
@ -57,8 +55,8 @@ void AboutBox::showAll() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AboutBox::resizeEvent(QResizeEvent *e) {
|
void AboutBox::resizeEvent(QResizeEvent *e) {
|
||||||
_version.moveToLeft(st::boxPadding.left(), st::boxTitleHeight + st::aboutVersionTop);
|
_version.moveToLeft(st::boxPadding.left(), titleHeight() + st::aboutVersionTop);
|
||||||
_text1.moveToLeft(st::boxPadding.left(), st::boxTitleHeight + st::aboutTextTop);
|
_text1.moveToLeft(st::boxPadding.left(), titleHeight() + st::aboutTextTop);
|
||||||
_text2.moveToLeft(st::boxPadding.left(), _text1.y() + _text1.height() + st::aboutSkip);
|
_text2.moveToLeft(st::boxPadding.left(), _text1.y() + _text1.height() + st::aboutSkip);
|
||||||
_text3.moveToLeft(st::boxPadding.left(), _text2.y() + _text2.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());
|
_done.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _done.height());
|
||||||
|
|
|
@ -21,26 +21,20 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "boxes/abstractbox.h"
|
#include "boxes/abstractbox.h"
|
||||||
|
|
||||||
|
#include "styles/style_boxes.h"
|
||||||
#include "localstorage.h"
|
#include "localstorage.h"
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
#include "ui/buttons/icon_button.h"
|
#include "ui/buttons/icon_button.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.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()) {
|
AbstractBox::AbstractBox(int w) : LayerWidget(App::wnd()->bodyWidget()) {
|
||||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||||
resize(w, 0);
|
resize((w > 0) ? w : st::boxWideWidth, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractBox::prepare() {
|
void AbstractBox::prepare() {
|
||||||
|
raiseShadow();
|
||||||
showAll();
|
showAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,12 +47,11 @@ void AbstractBox::keyPressEvent(QKeyEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractBox::resizeEvent(QResizeEvent *e) {
|
void AbstractBox::resizeEvent(QResizeEvent *e) {
|
||||||
if (_blueClose) {
|
if (_blockClose) {
|
||||||
_blueClose->moveToRight(0, 0);
|
_blockClose->moveToRight(0, 0);
|
||||||
}
|
}
|
||||||
if (_blueShadow) {
|
if (_blockShadow) {
|
||||||
_blueShadow->moveToLeft(0, st::boxTitleHeight);
|
_blockShadow->setGeometry(0, st::boxBlockTitleHeight, width(), st::boxBlockTitleShadow.height());
|
||||||
_blueShadow->resize(width(), st::boxBlueTitleShadow.height());
|
|
||||||
}
|
}
|
||||||
LayerWidget::resizeEvent(e);
|
LayerWidget::resizeEvent(e);
|
||||||
}
|
}
|
||||||
|
@ -75,21 +68,27 @@ bool AbstractBox::paint(QPainter &p) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractBox::paintTitle(Painter &p, const QString &title, const QString &additional) {
|
int AbstractBox::titleHeight() const {
|
||||||
p.setFont(st::boxTitleFont);
|
return _blockTitle ? st::boxBlockTitleHeight : st::boxTitleHeight;
|
||||||
if (_blueTitle) {
|
}
|
||||||
p.fillRect(0, 0, width(), st::boxTitleHeight, st::boxBlueTitleBg);
|
|
||||||
p.setPen(st::boxBlueTitleFg);
|
|
||||||
|
|
||||||
int32 titleWidth = st::boxTitleFont->width(title);
|
void AbstractBox::paintTitle(Painter &p, const QString &title, const QString &additional) {
|
||||||
p.drawTextLeft(st::boxBlueTitlePosition.x(), st::boxBlueTitlePosition.y(), width(), title, titleWidth);
|
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()) {
|
if (!additional.isEmpty()) {
|
||||||
p.setFont(st::boxTextFont);
|
p.setFont(st::boxBlockTitleAdditionalFont);
|
||||||
p.setPen(st::boxBlueTitleAdditionalFg);
|
p.setPen(st::boxBlockTitleAdditionalFg);
|
||||||
p.drawTextLeft(st::boxBlueTitlePosition.x() + titleWidth + st::boxBlueTitleAdditionalSkip, st::boxBlueTitlePosition.y(), width(), additional);
|
p.drawTextLeft(st::boxBlockTitlePosition.x() + titleWidth + st::boxBlockTitleAdditionalSkip, st::boxBlockTitlePosition.y(), width(), additional);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
p.setFont(st::boxTitleFont);
|
||||||
p.setPen(st::boxTitleFg);
|
p.setPen(st::boxTitleFg);
|
||||||
p.drawTextLeft(st::boxTitlePosition.x(), st::boxTitlePosition.y(), width(), title);
|
p.drawTextLeft(st::boxTitlePosition.x(), st::boxTitlePosition.y(), width(), title);
|
||||||
}
|
}
|
||||||
|
@ -135,24 +134,27 @@ void AbstractBox::onClose() {
|
||||||
emit closed(this);
|
emit closed(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractBox::setBlueTitle(bool blue) {
|
void AbstractBox::setBlockTitle(bool block) {
|
||||||
_blueTitle = blue;
|
_blockTitle = block;
|
||||||
_blueShadow.create(this);
|
_blockShadow.create(this, st::boxBlockTitleShadow);
|
||||||
_blueClose.create(this, st::boxBlueClose);
|
_blockClose.create(this, st::boxBlockTitleClose);
|
||||||
_blueClose->setClickedCallback([this] { onClose(); });
|
_blockClose->setClickedCallback([this] { onClose(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractBox::raiseShadow() {
|
void AbstractBox::raiseShadow() {
|
||||||
if (_blueShadow) {
|
if (_blockShadow) {
|
||||||
_blueShadow->raise();
|
_blockShadow->raise();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ScrollableBoxShadow::ScrollableBoxShadow(QWidget *parent) : Ui::PlainShadow(parent, st::boxScrollShadowBg) {
|
||||||
|
}
|
||||||
|
|
||||||
ScrollableBox::ScrollableBox(const style::flatScroll &scroll, int32 w) : AbstractBox(w)
|
ScrollableBox::ScrollableBox(const style::flatScroll &scroll, int32 w) : AbstractBox(w)
|
||||||
, _scroll(this, scroll)
|
, _scroll(this, scroll)
|
||||||
, _topSkip(st::boxTitleHeight)
|
, _topSkip(st::boxBlockTitleHeight)
|
||||||
, _bottomSkip(st::boxScrollSkip) {
|
, _bottomSkip(st::boxScrollSkip) {
|
||||||
setBlueTitle(true);
|
setBlockTitle(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrollableBox::resizeEvent(QResizeEvent *e) {
|
void ScrollableBox::resizeEvent(QResizeEvent *e) {
|
||||||
|
@ -161,6 +163,8 @@ void ScrollableBox::resizeEvent(QResizeEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrollableBox::init(TWidget *inner, int bottomSkip, int topSkip) {
|
void ScrollableBox::init(TWidget *inner, int bottomSkip, int topSkip) {
|
||||||
|
if (bottomSkip < 0) bottomSkip = st::boxScrollSkip;
|
||||||
|
if (topSkip < 0) topSkip = st::boxBlockTitleHeight;
|
||||||
_bottomSkip = bottomSkip;
|
_bottomSkip = bottomSkip;
|
||||||
_topSkip = topSkip;
|
_topSkip = topSkip;
|
||||||
_scroll->setOwnedWidget(inner);
|
_scroll->setOwnedWidget(inner);
|
||||||
|
@ -168,6 +172,8 @@ void ScrollableBox::init(TWidget *inner, int bottomSkip, int topSkip) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrollableBox::setScrollSkips(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) {
|
if (_topSkip != topSkip || _bottomSkip != bottomSkip) {
|
||||||
_topSkip = topSkip;
|
_topSkip = topSkip;
|
||||||
_bottomSkip = bottomSkip;
|
_bottomSkip = bottomSkip;
|
||||||
|
|
|
@ -24,27 +24,21 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
#include "ui/widgets/shadow.h"
|
#include "ui/widgets/shadow.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MaskButton;
|
class IconButton;
|
||||||
|
class GradientShadow;
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
||||||
class BlueTitleShadow : public TWidget {
|
|
||||||
public:
|
|
||||||
BlueTitleShadow(QWidget *parent) : TWidget(parent) {
|
|
||||||
}
|
|
||||||
void paintEvent(QPaintEvent *e);
|
|
||||||
};
|
|
||||||
|
|
||||||
class AbstractBox : public LayerWidget, protected base::Subscriber {
|
class AbstractBox : public LayerWidget, protected base::Subscriber {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AbstractBox(int w = st::boxWideWidth);
|
AbstractBox(int w = 0);
|
||||||
void parentResized() override;
|
void parentResized() override;
|
||||||
void showDone() override {
|
void showDone() override {
|
||||||
showAll();
|
showAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setBlueTitle(bool blue);
|
void setBlockTitle(bool block);
|
||||||
void raiseShadow();
|
void raiseShadow();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -57,6 +51,7 @@ protected:
|
||||||
|
|
||||||
void prepare();
|
void prepare();
|
||||||
bool paint(QPainter &p);
|
bool paint(QPainter &p);
|
||||||
|
int titleHeight() const;
|
||||||
void paintTitle(Painter &p, const QString &title, const QString &additional = QString());
|
void paintTitle(Painter &p, const QString &title, const QString &additional = QString());
|
||||||
void setMaxHeight(int32 maxHeight);
|
void setMaxHeight(int32 maxHeight);
|
||||||
void resizeMaxHeight(int32 newWidth, int32 maxHeight);
|
void resizeMaxHeight(int32 newWidth, int32 maxHeight);
|
||||||
|
@ -72,25 +67,25 @@ private:
|
||||||
|
|
||||||
bool _closed = false;
|
bool _closed = false;
|
||||||
|
|
||||||
bool _blueTitle = false;
|
bool _blockTitle = false;
|
||||||
ChildWidget<Ui::MaskButton> _blueClose = { nullptr };
|
ChildWidget<Ui::IconButton> _blockClose = { nullptr };
|
||||||
ChildWidget<BlueTitleShadow> _blueShadow = { nullptr };
|
ChildWidget<Ui::GradientShadow> _blockShadow = { nullptr };
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScrollableBoxShadow : public Ui::PlainShadow {
|
class ScrollableBoxShadow : public Ui::PlainShadow {
|
||||||
public:
|
public:
|
||||||
ScrollableBoxShadow(QWidget *parent) : Ui::PlainShadow(parent, st::boxScrollShadowBg) {
|
ScrollableBoxShadow(QWidget *parent);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScrollableBox : public AbstractBox {
|
class ScrollableBox : public AbstractBox {
|
||||||
public:
|
public:
|
||||||
ScrollableBox(const style::flatScroll &scroll, int w = st::boxWideWidth);
|
ScrollableBox(const style::flatScroll &scroll, int w = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void init(TWidget *inner, int bottomSkip = st::boxScrollSkip, int topSkip = st::boxTitleHeight);
|
void init(TWidget *inner, int bottomSkip = -1, int topSkip = -1);
|
||||||
void setScrollSkips(int bottomSkip = st::boxScrollSkip, int topSkip = st::boxTitleHeight);
|
void setScrollSkips(int bottomSkip = -1, int topSkip = -1);
|
||||||
|
|
||||||
void resizeEvent(QResizeEvent *e) override;
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
|
|
||||||
|
@ -108,7 +103,7 @@ private:
|
||||||
|
|
||||||
class ItemListBox : public ScrollableBox {
|
class ItemListBox : public ScrollableBox {
|
||||||
public:
|
public:
|
||||||
ItemListBox(const style::flatScroll &scroll, int32 w = st::boxWideWidth);
|
ItemListBox(const style::flatScroll &scroll, int32 w = 0);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -19,21 +19,21 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||||
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
*/
|
*/
|
||||||
#include "stdafx.h"
|
#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 "application.h"
|
||||||
#include "addcontactbox.h"
|
#include "boxes/contactsbox.h"
|
||||||
#include "contactsbox.h"
|
#include "boxes/confirmbox.h"
|
||||||
#include "confirmbox.h"
|
#include "boxes/photocropbox.h"
|
||||||
#include "photocropbox.h"
|
|
||||||
#include "ui/filedialog.h"
|
#include "ui/filedialog.h"
|
||||||
#include "ui/buttons/checkbox.h"
|
#include "ui/buttons/checkbox.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "observer_peer.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)
|
AddContactBox::AddContactBox(QString fname, QString lname, QString phone) : AbstractBox(st::boxWidth)
|
||||||
, _first(this, st::defaultInputField, lang(lng_signup_firstname), fname)
|
, _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());
|
bool readyToAdd = !_phone->getLastText().isEmpty() && (!_first->getLastText().isEmpty() || !_last->getLastText().isEmpty());
|
||||||
_boxTitle = lang(readyToAdd ? lng_confirm_contact_data : lng_enter_contact_data);
|
_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();
|
_retry->hide();
|
||||||
|
|
||||||
connect(_save, SIGNAL(clicked()), this, SLOT(onSave()));
|
connect(_save, SIGNAL(clicked()), this, SLOT(onSave()));
|
||||||
|
@ -115,8 +115,8 @@ void AddContactBox::paintEvent(QPaintEvent *e) {
|
||||||
} else {
|
} else {
|
||||||
p.setPen(st::boxTextFg);
|
p.setPen(st::boxTextFg);
|
||||||
p.setFont(st::boxTextFont);
|
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();
|
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(), st::boxTitleHeight + st::contactPadding.top(), width() - st::boxPadding.left() - st::boxPadding.right(), h), lng_contact_not_joined(lt_name, _sentName), style::al_topleft);
|
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());
|
_last->resize(_first->width(), _last->height());
|
||||||
_phone->resize(_first->width(), _last->height());
|
_phone->resize(_first->width(), _last->height());
|
||||||
if (_invertOrder) {
|
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);
|
_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);
|
_phone->moveToLeft(st::boxPadding.left() + st::contactPadding.left(), _first->y() + _first->height() + st::contactPhoneSkip);
|
||||||
} else {
|
} 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);
|
_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);
|
_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);
|
_first->setMaxLength(MaxGroupChannelTitle);
|
||||||
_last->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()) {
|
if (_peer->isUser()) {
|
||||||
_boxTitle = lang(_peer == App::self() ? lng_edit_self_title : lng_edit_contact_title);
|
_boxTitle = lang(_peer == App::self() ? lng_edit_self_title : lng_edit_contact_title);
|
||||||
h += st::contactSkip + _last->height();
|
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());
|
_first->resize(width() - st::boxPadding.left() - st::newGroupInfoPadding.left() - st::boxPadding.right(), _first->height());
|
||||||
_last->resize(_first->size());
|
_last->resize(_first->size());
|
||||||
if (_invertOrder) {
|
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);
|
_first->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _last->y() + _last->height() + st::contactSkip);
|
||||||
} else {
|
} 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);
|
_last->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _first->y() + _first->height() + st::contactSkip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1161,7 +1161,7 @@ void EditChannelBox::onDescriptionResized() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditChannelBox::updateMaxHeight() {
|
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();
|
h += st::newGroupDescriptionPadding.top() + _description->height() + st::newGroupDescriptionPadding.bottom();
|
||||||
if (!_channel->isMegagroup()) {
|
if (!_channel->isMegagroup()) {
|
||||||
h += st::newGroupPublicLinkPadding.top() + _sign->height() + st::newGroupPublicLinkPadding.bottom();
|
h += st::newGroupPublicLinkPadding.top() + _sign->height() + st::newGroupPublicLinkPadding.bottom();
|
||||||
|
@ -1175,7 +1175,7 @@ void EditChannelBox::updateMaxHeight() {
|
||||||
|
|
||||||
void EditChannelBox::resizeEvent(QResizeEvent *e) {
|
void EditChannelBox::resizeEvent(QResizeEvent *e) {
|
||||||
_title->resize(width() - st::boxPadding.left() - st::newGroupInfoPadding.left() - st::boxPadding.right(), _title->height());
|
_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());
|
_description->moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _title->y() + _title->height() + st::newGroupDescriptionPadding.top());
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,11 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||||
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
*/
|
*/
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
#include "boxes/autolockbox.h"
|
||||||
|
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
|
|
||||||
#include "localstorage.h"
|
#include "localstorage.h"
|
||||||
|
#include "boxes/confirmbox.h"
|
||||||
#include "autolockbox.h"
|
|
||||||
#include "confirmbox.h"
|
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui/buttons/checkbox.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]);
|
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);
|
_options.reserve(cnt);
|
||||||
for (int32 i = 0; i < cnt; ++i) {
|
for (int32 i = 0; i < cnt; ++i) {
|
||||||
int32 v = opts[i];
|
int32 v = opts[i];
|
||||||
|
|
|
@ -19,9 +19,9 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||||
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
*/
|
*/
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "lang.h"
|
#include "boxes/backgroundbox.h"
|
||||||
|
|
||||||
#include "backgroundbox.h"
|
#include "lang.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "window/window_theme.h"
|
#include "window/window_theme.h"
|
||||||
|
|
|
@ -23,22 +23,19 @@ using "basic.style";
|
||||||
using "ui/widgets/widgets.style";
|
using "ui/widgets/widgets.style";
|
||||||
using "intro/intro.style";
|
using "intro/intro.style";
|
||||||
|
|
||||||
boxBlueTitleBg: #6393b5;
|
boxBlockTitleHeight: 48px;
|
||||||
boxBlueTitleFg: #ffffff;
|
boxBlockTitlePosition: point(18px, 14px);
|
||||||
boxBlueTitleAdditionalFg: #dae9f5;
|
boxBlockTitleFont: font(boxFontSize semibold);
|
||||||
boxBlueTitleAdditionalSkip: 12px;
|
boxBlockTitleAdditionalSkip: 6px;
|
||||||
boxBlueTitlePosition: point(23px, 18px);
|
boxBlockTitleAdditionalFont: normalFont;
|
||||||
boxBlueTitleShadow: icon {{ "box_title_shadow", windowShadowFg }};
|
boxBlockTitleShadow: icon {{ "box_title_shadow", windowShadowFg }};
|
||||||
|
|
||||||
boxBlueClose: MaskButton(defaultMaskButton) {
|
boxBlockTitleClose: IconButton(defaultIconButton) {
|
||||||
width: boxTitleHeight;
|
width: boxBlockTitleHeight;
|
||||||
height: boxTitleHeight;
|
height: boxBlockTitleHeight;
|
||||||
|
|
||||||
bg: boxBlueTitleBg;
|
icon: boxBlockTitleCloseIcon;
|
||||||
iconBg: #c8e1f0;
|
iconOver: boxBlockTitleCloseIconOver;
|
||||||
iconBgOver: #ffffff;
|
|
||||||
|
|
||||||
icon: icon {{ "box_button_close-invert", boxBlueTitleBg }};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
confirmInviteTitle: flatLabel(labelDefFlat) {
|
confirmInviteTitle: flatLabel(labelDefFlat) {
|
||||||
|
@ -147,15 +144,12 @@ contactsMultiSelect: MultiSelect {
|
||||||
fieldIcon: boxFieldSearchIcon;
|
fieldIcon: boxFieldSearchIcon;
|
||||||
fieldIconSkip: 36px;
|
fieldIconSkip: 36px;
|
||||||
|
|
||||||
fieldCancel: MaskButton(defaultMaskButton) {
|
fieldCancel: IconButton {
|
||||||
width: 41px;
|
width: 41px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
|
|
||||||
bg: boxSearchBg;
|
|
||||||
icon: boxSearchCancelIcon;
|
icon: boxSearchCancelIcon;
|
||||||
|
iconOver: boxSearchCancelIconOver;
|
||||||
iconBg: boxSearchCancelIconFg;
|
|
||||||
iconBgOver: boxSearchCancelIconFgOver;
|
|
||||||
|
|
||||||
iconPosition: point(8px, 18px);
|
iconPosition: point(8px, 18px);
|
||||||
iconPositionDown: point(8px, 18px);
|
iconPositionDown: point(8px, 18px);
|
||||||
|
|
|
@ -21,6 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "boxes/confirmbox.h"
|
#include "boxes/confirmbox.h"
|
||||||
|
|
||||||
|
#include "styles/style_boxes.h"
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
@ -28,7 +29,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
#include "application.h"
|
#include "application.h"
|
||||||
#include "ui/buttons/checkbox.h"
|
#include "ui/buttons/checkbox.h"
|
||||||
#include "core/click_handler_types.h"
|
#include "core/click_handler_types.h"
|
||||||
#include "styles/style_boxes.h"
|
|
||||||
#include "localstorage.h"
|
#include "localstorage.h"
|
||||||
|
|
||||||
TextParseOptions _confirmBoxTextOptions = {
|
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);
|
_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();
|
_textWidth = st::boxWideWidth - st::boxPadding.left() - st::boxButtonPadding.right();
|
||||||
_textHeight = _text.countHeight(_textWidth);
|
_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();
|
textstyleRestore();
|
||||||
|
|
||||||
connect(_convert, SIGNAL(clicked()), this, SLOT(onConvert()));
|
connect(_convert, SIGNAL(clicked()), this, SLOT(onConvert()));
|
||||||
|
@ -382,8 +382,8 @@ void ConvertToSupergroupBox::paintEvent(QPaintEvent *e) {
|
||||||
// draw box title / text
|
// draw box title / text
|
||||||
p.setPen(st::boxTextFg);
|
p.setPen(st::boxTextFg);
|
||||||
textstyleSet(&st::boxTextStyle);
|
textstyleSet(&st::boxTextStyle);
|
||||||
_text.drawLeft(p, st::boxPadding.left(), st::boxTitleHeight, _textWidth, width());
|
_text.drawLeft(p, st::boxPadding.left(), titleHeight(), _textWidth, width());
|
||||||
_note.drawLeft(p, st::boxPadding.left(), st::boxTitleHeight + _textHeight + st::boxPadding.bottom(), _textWidth, width());
|
_note.drawLeft(p, st::boxPadding.left(), titleHeight() + _textHeight + st::boxPadding.bottom(), _textWidth, width());
|
||||||
textstyleRestore();
|
textstyleRestore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ void ConfirmPhoneBox::setCallStatus(const CallStatus &status) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfirmPhoneBox::launch() {
|
void ConfirmPhoneBox::launch() {
|
||||||
setBlueTitle(true);
|
setBlockTitle(true);
|
||||||
|
|
||||||
_about = new FlatLabel(this, st::confirmPhoneAboutLabel);
|
_about = new FlatLabel(this, st::confirmPhoneAboutLabel);
|
||||||
TextWithEntities aboutText;
|
TextWithEntities aboutText;
|
||||||
|
@ -110,7 +110,7 @@ void ConfirmPhoneBox::launch() {
|
||||||
_send = new BoxButton(this, lang(lng_confirm_phone_send), st::defaultBoxButton);
|
_send = new BoxButton(this, lang(lng_confirm_phone_send), st::defaultBoxButton);
|
||||||
_cancel = new BoxButton(this, lang(lng_cancel), st::cancelBoxButton);
|
_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(_send, SIGNAL(clicked()), this, SLOT(onSendCode()));
|
||||||
connect(_cancel, SIGNAL(clicked()), this, SLOT(onClose()));
|
connect(_cancel, SIGNAL(clicked()), this, SLOT(onClose()));
|
||||||
|
@ -289,7 +289,7 @@ QString ConfirmPhoneBox::getCallText() const {
|
||||||
|
|
||||||
void ConfirmPhoneBox::resizeEvent(QResizeEvent *e) {
|
void ConfirmPhoneBox::resizeEvent(QResizeEvent *e) {
|
||||||
_code->resize(width() - st::usernamePadding.left() - st::usernamePadding.right(), _code->height());
|
_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);
|
_about->moveToLeft(st::usernamePadding.left(), _code->y() + _code->height() + st::usernameSkip);
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,10 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||||
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
*/
|
*/
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
#include "boxes/connectionbox.h"
|
||||||
|
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
|
|
||||||
#include "localstorage.h"
|
#include "localstorage.h"
|
||||||
|
|
||||||
#include "connectionbox.h"
|
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui/buttons/checkbox.h"
|
#include "ui/buttons/checkbox.h"
|
||||||
|
@ -62,7 +61,7 @@ void ConnectionBox::showAll() {
|
||||||
_tcpProxyRadio->show();
|
_tcpProxyRadio->show();
|
||||||
_tryIPv6->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()) {
|
if (_httpProxyRadio->checked() || _tcpProxyRadio->checked()) {
|
||||||
h += 2 * st::boxOptionListPadding.top() + 2 * _hostInput->height();
|
h += 2 * st::boxOptionListPadding.top() + 2 * _hostInput->height();
|
||||||
_hostInput->show();
|
_hostInput->show();
|
||||||
|
@ -97,7 +96,7 @@ void ConnectionBox::paintEvent(QPaintEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionBox::resizeEvent(QResizeEvent *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());
|
_httpProxyRadio->moveToLeft(st::boxPadding.left() + st::boxOptionListPadding.left(), _autoRadio->y() + _autoRadio->height() + st::boxOptionListPadding.top());
|
||||||
|
|
||||||
int32 inputy = 0;
|
int32 inputy = 0;
|
||||||
|
@ -221,7 +220,7 @@ AutoDownloadBox::AutoDownloadBox() : AbstractBox(st::boxWidth)
|
||||||
, _gifPrivate(this, lang(lng_media_auto_private_chats), !(cAutoDownloadGif() & dbiadNoPrivate), st::defaultBoxCheckbox)
|
, _gifPrivate(this, lang(lng_media_auto_private_chats), !(cAutoDownloadGif() & dbiadNoPrivate), st::defaultBoxCheckbox)
|
||||||
, _gifGroups(this, lang(lng_media_auto_groups), !(cAutoDownloadGif() & dbiadNoGroups), st::defaultBoxCheckbox)
|
, _gifGroups(this, lang(lng_media_auto_groups), !(cAutoDownloadGif() & dbiadNoGroups), st::defaultBoxCheckbox)
|
||||||
, _gifPlay(this, lang(lng_media_auto_play), cAutoPlayGif(), 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)
|
, _save(this, lang(lng_connection_save), st::defaultBoxButton)
|
||||||
, _cancel(this, lang(lng_cancel), st::cancelBoxButton) {
|
, _cancel(this, lang(lng_cancel), st::cancelBoxButton) {
|
||||||
|
|
||||||
|
@ -258,13 +257,13 @@ void AutoDownloadBox::paintEvent(QPaintEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoDownloadBox::resizeEvent(QResizeEvent *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);
|
_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);
|
_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);
|
_gifGroups->moveToLeft(st::boxTitlePosition.x(), _gifPrivate->y() + _gifPrivate->height() + st::setLittleSkip);
|
||||||
_gifPlay->moveToLeft(st::boxTitlePosition.x(), _gifGroups->y() + _gifGroups->height() + st::setLittleSkip);
|
_gifPlay->moveToLeft(st::boxTitlePosition.x(), _gifGroups->y() + _gifGroups->height() + st::setLittleSkip);
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
#include "boxes/contactsbox.h"
|
#include "boxes/contactsbox.h"
|
||||||
|
|
||||||
#include "dialogs/dialogs_indexed_list.h"
|
#include "dialogs/dialogs_indexed_list.h"
|
||||||
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_dialogs.h"
|
#include "styles/style_dialogs.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
#include "styles/style_boxes.h"
|
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
#include "boxes/addcontactbox.h"
|
#include "boxes/addcontactbox.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
|
@ -307,7 +307,7 @@ void ContactsBox::paintEvent(QPaintEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int ContactsBox::getTopScrollSkip() const {
|
int ContactsBox::getTopScrollSkip() const {
|
||||||
auto result = st::boxTitleHeight;
|
auto result = titleHeight();
|
||||||
if (!_select->isHidden()) {
|
if (!_select->isHidden()) {
|
||||||
result += _select->height();
|
result += _select->height();
|
||||||
}
|
}
|
||||||
|
@ -332,7 +332,7 @@ void ContactsBox::resizeEvent(QResizeEvent *e) {
|
||||||
ItemListBox::resizeEvent(e);
|
ItemListBox::resizeEvent(e);
|
||||||
|
|
||||||
_select->resizeToWidth(width());
|
_select->resizeToWidth(width());
|
||||||
_select->moveToLeft(0, st::boxTitleHeight);
|
_select->moveToLeft(0, titleHeight());
|
||||||
|
|
||||||
updateScrollSkips();
|
updateScrollSkips();
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ void DownloadPathBox::showAll() {
|
||||||
_save->show();
|
_save->show();
|
||||||
_cancel->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();
|
if (_dir->checked()) h += st::downloadPathSkip + _pathLink->height();
|
||||||
h += st::boxOptionListPadding.bottom() + st::boxButtonPadding.top() + _save->height() + st::boxButtonPadding.bottom();
|
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) {
|
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());
|
_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());
|
_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();
|
int32 inputx = st::boxPadding.left() + st::boxOptionListPadding.left() + st::defaultRadiobutton.textPosition.x();
|
||||||
|
|
|
@ -19,9 +19,9 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||||
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
*/
|
*/
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "lang.h"
|
#include "boxes/emojibox.h"
|
||||||
|
|
||||||
#include "emojibox.h"
|
#include "lang.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
@ -72,13 +72,13 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
EmojiBox::EmojiBox() : _esize(EmojiSizes[EIndex + 1]) {
|
EmojiBox::EmojiBox() : _esize(EmojiSizes[EIndex + 1]) {
|
||||||
setBlueTitle(true);
|
setBlockTitle(true);
|
||||||
|
|
||||||
fillBlocks();
|
fillBlocks();
|
||||||
|
|
||||||
_blockHeight = st::emojiReplaceInnerHeight;
|
_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();
|
prepare();
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ void EmojiBox::paintEvent(QPaintEvent *e) {
|
||||||
|
|
||||||
p.setFont(st::emojiTextFont);
|
p.setFont(st::emojiTextFont);
|
||||||
p.setPen(st::boxTextFg);
|
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) {
|
for (Blocks::const_iterator i = _blocks.cbegin(), e = _blocks.cend(); i != e; ++i) {
|
||||||
int32 rowSize = i->size(), left = (width() - rowSize * st::emojiReplaceWidth) / 2;
|
int32 rowSize = i->size(), left = (width() - rowSize * st::emojiReplaceWidth) / 2;
|
||||||
for (BlockRow::const_iterator j = i->cbegin(), en = i->cend(); j != en; ++j) {
|
for (BlockRow::const_iterator j = i->cbegin(), en = i->cend(); j != en; ++j) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ _close(this, lang(lng_box_ok), st::defaultBoxButton) {
|
||||||
|
|
||||||
bool haveTestLang = (cLang() == languageTest);
|
bool haveTestLang = (cLang() == languageTest);
|
||||||
|
|
||||||
int32 y = st::boxTitleHeight + st::boxOptionListPadding.top();
|
int32 y = titleHeight() + st::boxOptionListPadding.top();
|
||||||
_langs.reserve(languageCount + (haveTestLang ? 1 : 0));
|
_langs.reserve(languageCount + (haveTestLang ? 1 : 0));
|
||||||
if (haveTestLang) {
|
if (haveTestLang) {
|
||||||
_langs.push_back(new Ui::Radiobutton(this, qsl("lang"), languageTest, qsl("Custom Lang"), (cLang() == languageTest), st::langsButton));
|
_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()));
|
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()));
|
connect(&_close, SIGNAL(clicked()), this, SLOT(onClose()));
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "boxes/localstoragebox.h"
|
#include "boxes/localstoragebox.h"
|
||||||
|
|
||||||
|
#include "styles/style_boxes.h"
|
||||||
#include "localstorage.h"
|
#include "localstorage.h"
|
||||||
#include "ui/flatbutton.h"
|
#include "ui/flatbutton.h"
|
||||||
#include "lang.h"
|
#include "lang.h"
|
||||||
#include "styles/style_boxes.h"
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
LocalStorageBox::LocalStorageBox() : AbstractBox()
|
LocalStorageBox::LocalStorageBox() : AbstractBox()
|
||||||
|
@ -50,8 +50,8 @@ void LocalStorageBox::updateControls() {
|
||||||
rowsHeight = st::linkFont->height + st::localStorageBoxSkip;
|
rowsHeight = st::linkFont->height + st::localStorageBoxSkip;
|
||||||
}
|
}
|
||||||
_clear->setVisible(_imagesCount > 0 || _audiosCount > 0);
|
_clear->setVisible(_imagesCount > 0 || _audiosCount > 0);
|
||||||
setMaxHeight(st::boxTitleHeight + st::localStorageBoxSkip + rowsHeight + _clear->height() + st::boxButtonPadding.top() + _close->height() + st::boxButtonPadding.bottom());
|
setMaxHeight(titleHeight() + st::localStorageBoxSkip + rowsHeight + _clear->height() + st::boxButtonPadding.top() + _close->height() + st::boxButtonPadding.bottom());
|
||||||
_clear->moveToLeft(st::boxPadding.left(), st::boxTitleHeight + st::localStorageBoxSkip + rowsHeight);
|
_clear->moveToLeft(st::boxPadding.left(), titleHeight() + st::localStorageBoxSkip + rowsHeight);
|
||||||
_close->moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _close->height());
|
_close->moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _close->height());
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ void LocalStorageBox::paintEvent(QPaintEvent *e) {
|
||||||
p.setFont(st::boxTextFont);
|
p.setFont(st::boxTextFont);
|
||||||
p.setPen(st::windowTextFg);
|
p.setPen(st::windowTextFg);
|
||||||
checkLocalStoredCounts();
|
checkLocalStoredCounts();
|
||||||
int top = st::boxTitleHeight + st::localStorageBoxSkip;
|
int top = titleHeight() + st::localStorageBoxSkip;
|
||||||
if (_imagesCount > 0) {
|
if (_imagesCount > 0) {
|
||||||
auto text = lng_settings_images_cached(lt_count, _imagesCount, lt_size, formatSizeText(Local::storageImagesSize() + Local::storageStickersSize() + Local::storageWebFilesSize()));
|
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);
|
p.drawTextLeft(st::boxPadding.left(), top, width(), text);
|
||||||
|
|
|
@ -75,7 +75,7 @@ PasscodeBox::PasscodeBox(const QByteArray &newSalt, const QByteArray &curSalt, b
|
||||||
}
|
}
|
||||||
|
|
||||||
void PasscodeBox::init() {
|
void PasscodeBox::init() {
|
||||||
setBlueTitle(true);
|
setBlockTitle(true);
|
||||||
|
|
||||||
textstyleSet(&st::usernameTextStyle);
|
textstyleSet(&st::usernameTextStyle);
|
||||||
_about.setRichText(st::normalFont, lang(_cloudPwd ? lng_cloud_password_about : lng_passcode_about));
|
_about.setRichText(st::normalFont, lang(_cloudPwd ? lng_cloud_password_about : lng_passcode_about));
|
||||||
|
@ -84,17 +84,17 @@ void PasscodeBox::init() {
|
||||||
if (_turningOff) {
|
if (_turningOff) {
|
||||||
_oldPasscode.show();
|
_oldPasscode.show();
|
||||||
_boxTitle = lang(_cloudPwd ? lng_cloud_password_remove : lng_passcode_remove);
|
_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 {
|
} else {
|
||||||
bool has = _cloudPwd ? (!_curSalt.isEmpty()) : Global::LocalPasscode();
|
bool has = _cloudPwd ? (!_curSalt.isEmpty()) : Global::LocalPasscode();
|
||||||
if (has) {
|
if (has) {
|
||||||
_oldPasscode.show();
|
_oldPasscode.show();
|
||||||
_boxTitle = lang(_cloudPwd ? lng_cloud_password_change : lng_passcode_change);
|
_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 {
|
} else {
|
||||||
_oldPasscode.hide();
|
_oldPasscode.hide();
|
||||||
_boxTitle = lang(_cloudPwd ? lng_cloud_password_create : lng_passcode_create);
|
_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();
|
bool has = _cloudPwd ? (!_curSalt.isEmpty()) : Global::LocalPasscode();
|
||||||
int32 w = st::boxWidth - st::boxPadding.left() - st::boxPadding.right();
|
int32 w = st::boxWidth - st::boxPadding.left() - st::boxPadding.right();
|
||||||
_oldPasscode.resize(w, _oldPasscode.height());
|
_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.resize(w, _newPasscode.height());
|
||||||
_newPasscode.moveToLeft(st::boxPadding.left(), _oldPasscode.y() + ((_turningOff || has) ? (_oldPasscode.height() + st::passcodeSkip + ((_hasRecovery && !_hintText.isEmpty()) ? st::passcodeSkip : 0)) : 0));
|
_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());
|
_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)
|
, _saveButton(this, lang(lng_passcode_submit), st::defaultBoxButton)
|
||||||
, _cancelButton(this, lang(lng_cancel), st::cancelBoxButton)
|
, _cancelButton(this, lang(lng_cancel), st::cancelBoxButton)
|
||||||
, _recoverCode(this, st::defaultInputField, lang(lng_signin_code)) {
|
, _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(&_saveButton, SIGNAL(clicked()), this, SLOT(onSubmit()));
|
||||||
connect(&_cancelButton, SIGNAL(clicked()), this, SLOT(onClose()));
|
connect(&_cancelButton, SIGNAL(clicked()), this, SLOT(onClose()));
|
||||||
|
@ -535,7 +535,7 @@ void RecoverBox::paintEvent(QPaintEvent *e) {
|
||||||
|
|
||||||
void RecoverBox::resizeEvent(QResizeEvent *e) {
|
void RecoverBox::resizeEvent(QResizeEvent *e) {
|
||||||
_recoverCode.resize(st::boxWidth - st::boxPadding.left() - st::boxPadding.right(), _recoverCode.height());
|
_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());
|
_saveButton.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _saveButton.height());
|
||||||
_cancelButton.moveToRight(st::boxButtonPadding.right() + _saveButton.width() + st::boxButtonPadding.left(), _saveButton.y());
|
_cancelButton.moveToRight(st::boxButtonPadding.right() + _saveButton.width() + st::boxButtonPadding.left(), _saveButton.y());
|
||||||
|
|
|
@ -57,7 +57,7 @@ void ReportBox::paintEvent(QPaintEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReportBox::resizeEvent(QResizeEvent *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());
|
_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());
|
_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());
|
_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() {
|
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) {
|
if (_reasonOtherText) {
|
||||||
h += st::newGroupDescriptionPadding.top() + _reasonOtherText->height() + st::newGroupDescriptionPadding.bottom();
|
h += st::newGroupDescriptionPadding.top() + _reasonOtherText->height() + st::newGroupDescriptionPadding.bottom();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ SessionsBox::SessionsBox() : ScrollableBox(st::sessionsScroll)
|
||||||
connect(App::wnd(), SIGNAL(newAuthorization()), this, SLOT(onNewAuthorization()));
|
connect(App::wnd(), SIGNAL(newAuthorization()), this, SLOT(onNewAuthorization()));
|
||||||
connect(&_shortPollTimer, SIGNAL(timeout()), this, SLOT(onShortPollAuthorizations()));
|
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);
|
_inner->resize(width(), st::noContactsHeight);
|
||||||
|
|
||||||
prepare();
|
prepare();
|
||||||
|
@ -76,7 +76,7 @@ void SessionsBox::paintEvent(QPaintEvent *e) {
|
||||||
if (paint(p)) return;
|
if (paint(p)) return;
|
||||||
|
|
||||||
paintTitle(p, lang(lng_sessions_other_header));
|
paintTitle(p, lang(lng_sessions_other_header));
|
||||||
p.translate(0, st::boxTitleHeight);
|
p.translate(0, titleHeight());
|
||||||
|
|
||||||
if (_loading) {
|
if (_loading) {
|
||||||
p.setFont(st::noContactsFont->f);
|
p.setFont(st::noContactsFont->f);
|
||||||
|
|
|
@ -83,7 +83,7 @@ ShareBox::ShareBox(CopyCallback &©Callback, SubmitCallback &&submitCallback,
|
||||||
}
|
}
|
||||||
|
|
||||||
int ShareBox::getTopScrollSkip() const {
|
int ShareBox::getTopScrollSkip() const {
|
||||||
auto result = st::boxTitleHeight;
|
auto result = titleHeight();
|
||||||
if (!_select->isHidden()) {
|
if (!_select->isHidden()) {
|
||||||
result += _select->height();
|
result += _select->height();
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ void ShareBox::resizeEvent(QResizeEvent *e) {
|
||||||
ItemListBox::resizeEvent(e);
|
ItemListBox::resizeEvent(e);
|
||||||
|
|
||||||
_select->resizeToWidth(width());
|
_select->resizeToWidth(width());
|
||||||
_select->moveToLeft(0, st::boxTitleHeight);
|
_select->moveToLeft(0, titleHeight());
|
||||||
|
|
||||||
updateScrollSkips();
|
updateScrollSkips();
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ void StickersBox::setup() {
|
||||||
_aboutHeight = st::stickersReorderPadding.top() + _about.countHeight(_aboutWidth) + st::stickersReorderPadding.bottom();
|
_aboutHeight = st::stickersReorderPadding.top() + _about.countHeight(_aboutWidth) + st::stickersReorderPadding.bottom();
|
||||||
_topShadow.create(this, st::contactsAboutShadow);
|
_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)));
|
setMaxHeight(snap(countHeight(), int32(st::sessionsHeight), int32(st::boxMaxListHeight)));
|
||||||
|
|
||||||
connect(App::main(), SIGNAL(stickersUpdated()), this, SLOT(onStickersUpdated()));
|
connect(App::main(), SIGNAL(stickersUpdated()), this, SLOT(onStickersUpdated()));
|
||||||
|
@ -244,7 +244,7 @@ int32 StickersBox::countHeight() const {
|
||||||
if (_section == Section::Installed) {
|
if (_section == Section::Installed) {
|
||||||
bottomSkip = st::boxButtonPadding.top() + _save->height() + st::boxButtonPadding.bottom();
|
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) {
|
void StickersBox::disenableDone(const MTPmessages_StickerSetInstallResult &result, mtpRequestId req) {
|
||||||
|
@ -306,7 +306,7 @@ void StickersBox::paintEvent(QPaintEvent *e) {
|
||||||
return lang(lng_stickers_archived);
|
return lang(lng_stickers_archived);
|
||||||
})();
|
})();
|
||||||
paintTitle(p, title);
|
paintTitle(p, title);
|
||||||
p.translate(0, st::boxTitleHeight);
|
p.translate(0, titleHeight());
|
||||||
|
|
||||||
if (_aboutHeight > 0) {
|
if (_aboutHeight > 0) {
|
||||||
p.fillRect(0, 0, width(), _aboutHeight, st::contactsAboutBg);
|
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);
|
_inner->setVisibleScrollbar((scrollArea()->scrollTopMax() > 0) ? (st::boxScroll.width - st::boxScroll.deltax) : 0);
|
||||||
updateVisibleTopBottom();
|
updateVisibleTopBottom();
|
||||||
if (_topShadow) {
|
if (_topShadow) {
|
||||||
_topShadow->setGeometry(0, st::boxTitleHeight + _aboutHeight, width(), st::lineWidth);
|
_topShadow->setGeometry(0, titleHeight() + _aboutHeight, width(), st::lineWidth);
|
||||||
}
|
}
|
||||||
if (_save) {
|
if (_save) {
|
||||||
_save->moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _save->height());
|
_save->moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _save->height());
|
||||||
|
|
|
@ -200,9 +200,9 @@ void StickerSetBox::Inner::gotSet(const MTPmessages_StickerSet &set) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (d.vset.type() == mtpc_stickerSet) {
|
if (d.vset.type() == mtpc_stickerSet) {
|
||||||
auto &s(d.vset.c_stickerSet());
|
auto &s = d.vset.c_stickerSet();
|
||||||
_setTitle = stickerSetTitle(s);
|
_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);
|
_setShortName = qs(s.vshort_name);
|
||||||
_setId = s.vid.v;
|
_setId = s.vid.v;
|
||||||
_setAccess = s.vaccess_hash.v;
|
_setAccess = s.vaccess_hash.v;
|
||||||
|
|
|
@ -33,13 +33,13 @@ _username(this, st::defaultInputField, qsl("@username"), App::self()->username,
|
||||||
_link(this, QString(), st::defaultBoxLinkButton),
|
_link(this, QString(), st::defaultBoxLinkButton),
|
||||||
_saveRequestId(0), _checkRequestId(0),
|
_saveRequestId(0), _checkRequestId(0),
|
||||||
_about(st::boxWidth - st::usernamePadding.left()) {
|
_about(st::boxWidth - st::usernamePadding.left()) {
|
||||||
setBlueTitle(true);
|
setBlockTitle(true);
|
||||||
|
|
||||||
_goodText = App::self()->username.isEmpty() ? QString() : lang(lng_username_available);
|
_goodText = App::self()->username.isEmpty() ? QString() : lang(lng_username_available);
|
||||||
|
|
||||||
textstyleSet(&st::usernameTextStyle);
|
textstyleSet(&st::usernameTextStyle);
|
||||||
_about.setRichText(st::boxTextFont, lang(lng_username_about));
|
_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();
|
textstyleRestore();
|
||||||
|
|
||||||
connect(&_save, SIGNAL(clicked()), this, SLOT(onSave()));
|
connect(&_save, SIGNAL(clicked()), this, SLOT(onSave()));
|
||||||
|
@ -106,7 +106,7 @@ void UsernameBox::paintEvent(QPaintEvent *e) {
|
||||||
|
|
||||||
void UsernameBox::resizeEvent(QResizeEvent *e) {
|
void UsernameBox::resizeEvent(QResizeEvent *e) {
|
||||||
_username.resize(width() - st::usernamePadding.left() - st::usernamePadding.right(), _username.height());
|
_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);
|
textstyleSet(&st::usernameTextStyle);
|
||||||
int32 availw = st::boxWidth - st::usernamePadding.left(), h = _about.countHeight(availw);
|
int32 availw = st::boxWidth - st::usernamePadding.left(), h = _about.countHeight(availw);
|
||||||
|
|
|
@ -22,7 +22,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
|
|
||||||
#include "core/utils.h"
|
#include "core/utils.h"
|
||||||
|
|
||||||
#define BETA_VERSION_MACRO (10019002ULL)
|
#define BETA_VERSION_MACRO (10019003ULL)
|
||||||
|
|
||||||
constexpr int AppVersion = 10020;
|
constexpr int AppVersion = 10020;
|
||||||
constexpr str_const AppVersionStr = "0.10.20";
|
constexpr str_const AppVersionStr = "0.10.20";
|
||||||
|
|
|
@ -195,6 +195,9 @@ historySend: IconButton {
|
||||||
iconPosition: point(11px, 11px);
|
iconPosition: point(11px, 11px);
|
||||||
iconPositionDown: 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) {
|
historyAttach: IconButton(historySend) {
|
||||||
icon: icon {{ "send_control_attach", historyComposeIconFg }};
|
icon: icon {{ "send_control_attach", historyComposeIconFg }};
|
||||||
iconOver: icon {{ "send_control_attach", historyComposeIconFgOver }};
|
iconOver: icon {{ "send_control_attach", historyComposeIconFgOver }};
|
||||||
|
@ -276,17 +279,17 @@ historyReplyIconPosition: point(13px, 13px);
|
||||||
historyReplyIcon: icon {{ "history_action_reply", #6fa1d2 }};
|
historyReplyIcon: icon {{ "history_action_reply", #6fa1d2 }};
|
||||||
historyForwardIcon: icon {{ "history_action_forward", #6fa1d2 }};
|
historyForwardIcon: icon {{ "history_action_forward", #6fa1d2 }};
|
||||||
historyEditIcon: icon {{ "history_action_edit", #6fa1d2 }};
|
historyEditIcon: icon {{ "history_action_edit", #6fa1d2 }};
|
||||||
historyReplyCancel: MaskButton(defaultMaskButton) {
|
historyReplyCancel: IconButton {
|
||||||
width: 49px;
|
width: 49px;
|
||||||
height: 49px;
|
height: 49px;
|
||||||
|
|
||||||
bg: historyReplyBg;
|
|
||||||
icon: historyReplyCancelIcon;
|
icon: historyReplyCancelIcon;
|
||||||
|
iconOver: historyReplyCancelIconOver;
|
||||||
|
|
||||||
iconBg: historyReplyCancelIconFg;
|
iconPosition: point(-1px, -1px);
|
||||||
iconBgOver: historyReplyCancelIconFgOver;
|
iconPositionDown: point(-1px, -1px);
|
||||||
}
|
}
|
||||||
historyInlineBotCancel: MaskButton(historyReplyCancel) {
|
historyInlineBotCancel: IconButton(historyReplyCancel) {
|
||||||
height: 46px;
|
height: 46px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2996,10 +2996,10 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent)
|
||||||
, _fieldAutocomplete(this)
|
, _fieldAutocomplete(this)
|
||||||
, _reportSpamPanel(this)
|
, _reportSpamPanel(this)
|
||||||
, _send(this, st::historySend)
|
, _send(this, st::historySend)
|
||||||
, _unblock(this, lang(lng_unblock_button), st::historyUnblock)
|
, _unblock(this, lang(lng_unblock_button).toUpper(), st::historyUnblock)
|
||||||
, _botStart(this, lang(lng_bot_start), st::historyComposeButton)
|
, _botStart(this, lang(lng_bot_start).toUpper(), st::historyComposeButton)
|
||||||
, _joinChannel(this, lang(lng_channel_join), st::historyComposeButton)
|
, _joinChannel(this, lang(lng_channel_join).toUpper(), st::historyComposeButton)
|
||||||
, _muteUnmute(this, lang(lng_channel_mute), st::historyComposeButton)
|
, _muteUnmute(this, lang(lng_channel_mute).toUpper(), st::historyComposeButton)
|
||||||
, _attachToggle(this, st::historyAttach)
|
, _attachToggle(this, st::historyAttach)
|
||||||
, _attachEmoji(this, st::historyAttachEmoji)
|
, _attachEmoji(this, st::historyAttachEmoji)
|
||||||
, _botKeyboardShow(this, st::historyBotKeyboardShow)
|
, _botKeyboardShow(this, st::historyBotKeyboardShow)
|
||||||
|
@ -6473,7 +6473,7 @@ void HistoryWidget::clearInlineBot() {
|
||||||
void HistoryWidget::inlineBotChanged() {
|
void HistoryWidget::inlineBotChanged() {
|
||||||
bool isInlineBot = _inlineBot && (_inlineBot != LookingUpInlineBot);
|
bool isInlineBot = _inlineBot && (_inlineBot != LookingUpInlineBot);
|
||||||
if (isInlineBot && !_inlineBotCancel) {
|
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()));
|
connect(_inlineBotCancel.get(), SIGNAL(clicked()), this, SLOT(onInlineBotCancel()));
|
||||||
_inlineBotCancel->setGeometry(_send->geometry());
|
_inlineBotCancel->setGeometry(_send->geometry());
|
||||||
_attachEmoji->raise();
|
_attachEmoji->raise();
|
||||||
|
@ -6514,14 +6514,14 @@ void HistoryWidget::onCheckFieldAutocomplete() {
|
||||||
void HistoryWidget::updateFieldPlaceholder() {
|
void HistoryWidget::updateFieldPlaceholder() {
|
||||||
if (_editMsgId) {
|
if (_editMsgId) {
|
||||||
_field->setPlaceholder(lang(lng_edit_message_text));
|
_field->setPlaceholder(lang(lng_edit_message_text));
|
||||||
// _send->setText(lang(lng_settings_save));
|
_send->setIcon(&st::historyEditSaveIcon, &st::historyEditSaveIconOver);
|
||||||
} else {
|
} else {
|
||||||
if (_inlineBot && _inlineBot != LookingUpInlineBot) {
|
if (_inlineBot && _inlineBot != LookingUpInlineBot) {
|
||||||
_field->setPlaceholder(_inlineBot->botInfo->inlinePlaceholder.mid(1), _inlineBot->username.size() + 2);
|
_field->setPlaceholder(_inlineBot->botInfo->inlinePlaceholder.mid(1), _inlineBot->username.size() + 2);
|
||||||
} else {
|
} else {
|
||||||
_field->setPlaceholder(lang((_history && _history->isChannel() && !_history->isMegagroup()) ? (_silent->checked() ? lng_broadcast_silent_ph : lng_broadcast_ph) : lng_message_ph));
|
_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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ class DropdownMenu;
|
||||||
class PlainShadow;
|
class PlainShadow;
|
||||||
class PopupMenu;
|
class PopupMenu;
|
||||||
class IconButton;
|
class IconButton;
|
||||||
class MaskButton;
|
|
||||||
class HistoryDownButton;
|
class HistoryDownButton;
|
||||||
class EmojiButton;
|
class EmojiButton;
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
@ -897,7 +896,7 @@ private:
|
||||||
Text _replyEditMsgText;
|
Text _replyEditMsgText;
|
||||||
mutable SingleTimer _updateEditTimeLeftDisplay;
|
mutable SingleTimer _updateEditTimeLeftDisplay;
|
||||||
|
|
||||||
ChildWidget<Ui::MaskButton> _fieldBarCancel;
|
ChildWidget<Ui::IconButton> _fieldBarCancel;
|
||||||
void updateReplyEditTexts(bool force = false);
|
void updateReplyEditTexts(bool force = false);
|
||||||
|
|
||||||
struct PinnedBar {
|
struct PinnedBar {
|
||||||
|
@ -907,7 +906,7 @@ private:
|
||||||
MsgId msgId = 0;
|
MsgId msgId = 0;
|
||||||
HistoryItem *msg = nullptr;
|
HistoryItem *msg = nullptr;
|
||||||
Text text;
|
Text text;
|
||||||
ChildWidget<Ui::MaskButton> cancel;
|
ChildWidget<Ui::IconButton> cancel;
|
||||||
ChildWidget<Ui::PlainShadow> shadow;
|
ChildWidget<Ui::PlainShadow> shadow;
|
||||||
};
|
};
|
||||||
std_::unique_ptr<PinnedBar> _pinnedBar;
|
std_::unique_ptr<PinnedBar> _pinnedBar;
|
||||||
|
@ -1087,7 +1086,7 @@ private:
|
||||||
UserData *_inlineBot = nullptr;
|
UserData *_inlineBot = nullptr;
|
||||||
QString _inlineBotUsername;
|
QString _inlineBotUsername;
|
||||||
mtpRequestId _inlineBotResolveRequestId = 0;
|
mtpRequestId _inlineBotResolveRequestId = 0;
|
||||||
std_::unique_ptr<Ui::MaskButton> _inlineBotCancel;
|
std_::unique_ptr<Ui::IconButton> _inlineBotCancel;
|
||||||
void inlineBotResolveDone(const MTPcontacts_ResolvedPeer &result);
|
void inlineBotResolveDone(const MTPcontacts_ResolvedPeer &result);
|
||||||
bool inlineBotResolveFail(QString name, const RPCError &error);
|
bool inlineBotResolveFail(QString name, const RPCError &error);
|
||||||
|
|
||||||
|
|
|
@ -559,6 +559,7 @@ void MainWindow::showConnecting(const QString &text, const QString &reconnect) {
|
||||||
_connecting->set(text, reconnect);
|
_connecting->set(text, reconnect);
|
||||||
} else {
|
} else {
|
||||||
_connecting.create(bodyWidget(), text, reconnect);
|
_connecting.create(bodyWidget(), text, reconnect);
|
||||||
|
_connecting->show();
|
||||||
updateControlsGeometry();
|
updateControlsGeometry();
|
||||||
fixOrder();
|
fixOrder();
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,7 +215,7 @@ mediaPlayerScroll: flatScroll(solidScroll) {
|
||||||
}
|
}
|
||||||
mediaPlayerListHeightMax: 280px;
|
mediaPlayerListHeightMax: 280px;
|
||||||
mediaPlayerListMarginBottom: 10px;
|
mediaPlayerListMarginBottom: 10px;
|
||||||
mediaPlayerScrollShadow: icon {{ "playlist_shadow", #000000 }};
|
mediaPlayerScrollShadow: icon {{ "playlist_shadow", windowShadowFg }};
|
||||||
|
|
||||||
mediaPlayerListMarginTop: 8px;
|
mediaPlayerListMarginTop: 8px;
|
||||||
mediaPlayerListIconFg: #ffffff;
|
mediaPlayerListIconFg: #ffffff;
|
||||||
|
|
|
@ -31,21 +31,12 @@ settingsMargin: 48px;
|
||||||
|
|
||||||
settingsFixedBarHeight: 52px;
|
settingsFixedBarHeight: 52px;
|
||||||
settingsFixedBarFont: font(14px semibold);
|
settingsFixedBarFont: font(14px semibold);
|
||||||
settingsFixedBarFg: windowTextFg;
|
|
||||||
settingsFixedBarTextLeft: 20px;
|
settingsFixedBarTextLeft: 20px;
|
||||||
settingsFixedBarTextTop: 16px;
|
settingsFixedBarTextTop: 16px;
|
||||||
settingsFixedBarClose: MaskButton(defaultMaskButton) {
|
settingsFixedBarClose: IconButton(boxBlockTitleClose) {
|
||||||
width: settingsFixedBarHeight;
|
width: settingsFixedBarHeight;
|
||||||
height: settingsFixedBarHeight;
|
height: settingsFixedBarHeight;
|
||||||
|
|
||||||
bg: settingsFixedBarBg;
|
|
||||||
icon: settingsFixedBarCloseIcon;
|
|
||||||
|
|
||||||
iconBg: settingsCloseFg;
|
|
||||||
iconBgOver: settingsCloseFgOver;
|
|
||||||
}
|
}
|
||||||
settingsFixedBarShadowBg1: #00000021;
|
|
||||||
settingsFixedBarShadowBg2: #0000000b;
|
|
||||||
|
|
||||||
settingsMarginTop: 34px;
|
settingsMarginTop: 34px;
|
||||||
settingsPhotoSize: 112px;
|
settingsPhotoSize: 112px;
|
||||||
|
|
|
@ -48,7 +48,7 @@ void FixedBar::resizeEvent(QResizeEvent *e) {
|
||||||
void FixedBar::paintEvent(QPaintEvent *e) {
|
void FixedBar::paintEvent(QPaintEvent *e) {
|
||||||
Painter p(this);
|
Painter p(this);
|
||||||
|
|
||||||
p.fillRect(e->rect(), st::settingsFixedBarBg);
|
p.fillRect(e->rect(), st::boxBlockTitleBg);
|
||||||
|
|
||||||
p.setFont(st::settingsFixedBarFont);
|
p.setFont(st::settingsFixedBarFont);
|
||||||
p.setPen(st::windowTextFg);
|
p.setPen(st::windowTextFg);
|
||||||
|
|
|
@ -21,7 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MaskButton;
|
class IconButton;
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
|
@ -37,7 +37,7 @@ protected:
|
||||||
int resizeGetHeight(int newWidth) override;
|
int resizeGetHeight(int newWidth) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ChildWidget<Ui::MaskButton> _close;
|
ChildWidget<Ui::IconButton> _close;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -128,14 +128,12 @@ Widget::Widget(QWidget *parent) : LayerWidget(parent)
|
||||||
, _scroll(this, st::setScroll)
|
, _scroll(this, st::setScroll)
|
||||||
, _inner(this)
|
, _inner(this)
|
||||||
, _fixedBar(this)
|
, _fixedBar(this)
|
||||||
, _fixedBarShadow1(this, st::settingsFixedBarShadowBg1)
|
, _fixedBarShadow(this, st::boxBlockTitleShadow) {
|
||||||
, _fixedBarShadow2(this, st::settingsFixedBarShadowBg2) {
|
|
||||||
_scroll->setOwnedWidget(_inner);
|
_scroll->setOwnedWidget(_inner);
|
||||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||||
|
|
||||||
_fixedBar->move(0, 0);
|
_fixedBar->move(0, 0);
|
||||||
_fixedBarShadow1->move(0, _fixedBar->y() + st::settingsFixedBarHeight);
|
_fixedBarShadow->move(0, _fixedBar->y() + st::settingsFixedBarHeight);
|
||||||
_fixedBarShadow2->move(0, _fixedBarShadow1->y() + st::lineWidth);
|
|
||||||
_scroll->move(0, st::settingsFixedBarHeight);
|
_scroll->move(0, st::settingsFixedBarHeight);
|
||||||
|
|
||||||
connect(_inner, SIGNAL(heightUpdated()), this, SLOT(onInnerHeightUpdated()));
|
connect(_inner, SIGNAL(heightUpdated()), this, SLOT(onInnerHeightUpdated()));
|
||||||
|
@ -211,8 +209,7 @@ void Widget::resizeEvent(QResizeEvent *e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
_fixedBar->resizeToWidth(width());
|
_fixedBar->resizeToWidth(width());
|
||||||
_fixedBarShadow1->resize(width(), st::lineWidth);
|
_fixedBarShadow->resize(width(), st::boxBlockTitleShadow.height());
|
||||||
_fixedBarShadow2->resize(width(), st::lineWidth);
|
|
||||||
|
|
||||||
QSize scrollSize(width(), height() - _fixedBar->height());
|
QSize scrollSize(width(), height() - _fixedBar->height());
|
||||||
if (_scroll->size() != scrollSize) {
|
if (_scroll->size() != scrollSize) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
||||||
#include "layerwidget.h"
|
#include "layerwidget.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class PlainShadow;
|
class GradientShadow;
|
||||||
} // namespace Ui
|
} // namespace Ui
|
||||||
|
|
||||||
namespace Settings {
|
namespace Settings {
|
||||||
|
@ -54,7 +54,7 @@ private:
|
||||||
ChildWidget<ScrollArea> _scroll;
|
ChildWidget<ScrollArea> _scroll;
|
||||||
ChildWidget<InnerWidget> _inner;
|
ChildWidget<InnerWidget> _inner;
|
||||||
ChildWidget<FixedBar> _fixedBar;
|
ChildWidget<FixedBar> _fixedBar;
|
||||||
ChildWidget<Ui::PlainShadow> _fixedBarShadow1, _fixedBarShadow2;
|
ChildWidget<Ui::GradientShadow> _fixedBarShadow;
|
||||||
|
|
||||||
int _contentLeft = 0;
|
int _contentLeft = 0;
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,9 @@ void IconButton::paintEvent(QPaintEvent *e) {
|
||||||
if (position.x() < 0) {
|
if (position.x() < 0) {
|
||||||
position.setX((width() - icon->width()) / 2);
|
position.setX((width() - icon->width()) / 2);
|
||||||
}
|
}
|
||||||
|
if (position.y() < 0) {
|
||||||
|
position.setY((height() - icon->height()) / 2);
|
||||||
|
}
|
||||||
icon->paint(p, position, width());
|
icon->paint(p, position, width());
|
||||||
if (over > 0. && over < 1.) {
|
if (over > 0. && over < 1.) {
|
||||||
auto iconOver = overIcon();
|
auto iconOver = overIcon();
|
||||||
|
|
|
@ -201,7 +201,7 @@ CountrySelectBox::CountrySelectBox() : ItemListBox(st::countriesScroll, st::boxW
|
||||||
, _topShadow(this) {
|
, _topShadow(this) {
|
||||||
_select->resizeToWidth(st::boxWidth);
|
_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->setQueryChangedCallback([this](const QString &query) { onFilterUpdate(query); });
|
||||||
_select->setSubmittedCallback([this](bool) { onSubmit(); });
|
_select->setSubmittedCallback([this](bool) { onSubmit(); });
|
||||||
|
@ -240,10 +240,10 @@ void CountrySelectBox::resizeEvent(QResizeEvent *e) {
|
||||||
ItemListBox::resizeEvent(e);
|
ItemListBox::resizeEvent(e);
|
||||||
|
|
||||||
_select->resizeToWidth(width());
|
_select->resizeToWidth(width());
|
||||||
_select->moveToLeft(0, st::boxTitleHeight);
|
_select->moveToLeft(0, titleHeight());
|
||||||
|
|
||||||
_inner->resizeToWidth(width());
|
_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() {
|
void CountrySelectBox::showAll() {
|
||||||
|
|
|
@ -26,7 +26,7 @@ class InputField;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
|
|
||||||
class MaskButton;
|
class IconButton;
|
||||||
|
|
||||||
class MultiSelect : public TWidget {
|
class MultiSelect : public TWidget {
|
||||||
public:
|
public:
|
||||||
|
@ -154,7 +154,7 @@ private:
|
||||||
int _fieldTop = 0;
|
int _fieldTop = 0;
|
||||||
int _fieldWidth = 0;
|
int _fieldWidth = 0;
|
||||||
ChildWidget<InputField> _field;
|
ChildWidget<InputField> _field;
|
||||||
ChildWidget<Ui::MaskButton> _cancel;
|
ChildWidget<Ui::IconButton> _cancel;
|
||||||
|
|
||||||
int _newHeight = 0;
|
int _newHeight = 0;
|
||||||
IntAnimation _height;
|
IntAnimation _height;
|
||||||
|
|
|
@ -119,7 +119,7 @@ MultiSelect {
|
||||||
fieldMinWidth: pixels;
|
fieldMinWidth: pixels;
|
||||||
fieldIcon: icon;
|
fieldIcon: icon;
|
||||||
fieldIconSkip: pixels;
|
fieldIconSkip: pixels;
|
||||||
fieldCancel: MaskButton;
|
fieldCancel: IconButton;
|
||||||
fieldCancelSkip: pixels;
|
fieldCancelSkip: pixels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,6 +181,11 @@ defaultLabelSimple: LabelSimple {
|
||||||
textFg: windowTextFg;
|
textFg: windowTextFg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaultIconButton: IconButton {
|
||||||
|
iconPosition: point(-1px, -1px);
|
||||||
|
iconPositionDown: point(-1px, -1px);
|
||||||
|
}
|
||||||
|
|
||||||
defaultMaskButton: MaskButton {
|
defaultMaskButton: MaskButton {
|
||||||
iconPosition: point(-1px, -1px);
|
iconPosition: point(-1px, -1px);
|
||||||
iconPositionDown: point(-1px, -1px);
|
iconPositionDown: point(-1px, -1px);
|
||||||
|
|
|
@ -3,4 +3,4 @@ AppVersionStrMajor 0.10
|
||||||
AppVersionStrSmall 0.10.20
|
AppVersionStrSmall 0.10.20
|
||||||
AppVersionStr 0.10.20
|
AppVersionStr 0.10.20
|
||||||
AlphaChannel 0
|
AlphaChannel 0
|
||||||
BetaVersion 10019002
|
BetaVersion 10019003
|
||||||
|
|