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

New way of working with boxes (layers).

Now the background of boxes is separated to another widget.
This will allow to use a special layer widget (like settings)
together with the usual layers-boxes upon it, moving the special
widget behind the dark background when a usual layer-box is shown.
This commit is contained in:
John Preston
2016-08-16 19:53:10 +03:00
parent 05697374c5
commit 392984f276
54 changed files with 770 additions and 990 deletions

View File

@@ -86,7 +86,7 @@ void ConfirmBox::mousePressEvent(QMouseEvent *e) {
_lastMousePos = e->globalPos();
updateHover();
ClickHandler::pressed();
return LayeredWidget::mousePressEvent(e);
return LayerWidget::mousePressEvent(e);
}
void ConfirmBox::mouseReleaseEvent(QMouseEvent *e) {
@@ -130,11 +130,6 @@ void ConfirmBox::closePressed() {
emit cancelled();
}
void ConfirmBox::hideAll() {
_confirm.hide();
_cancel.hide();
}
void ConfirmBox::showAll() {
if (_informative) {
_confirm.show();
@@ -246,10 +241,6 @@ void MaxInviteBox::step_good(float64 ms, bool timer) {
if (timer) update();
}
void MaxInviteBox::hideAll() {
_close.hide();
}
void MaxInviteBox::showAll() {
_close.show();
}
@@ -342,11 +333,6 @@ bool ConvertToSupergroupBox::convertFail(const RPCError &error) {
return true;
}
void ConvertToSupergroupBox::hideAll() {
_convert.hide();
_cancel.hide();
}
void ConvertToSupergroupBox::showAll() {
_convert.show();
_cancel.show();
@@ -417,13 +403,6 @@ void PinMessageBox::showAll() {
_cancel.show();
}
void PinMessageBox::hideAll() {
_text.hide();
_notify.hide();
_pin.hide();
_cancel.hide();
}
void PinMessageBox::pinDone(const MTPUpdates &updates) {
if (App::main()) {
App::main()->sentUpdatesReceived(updates);
@@ -497,15 +476,6 @@ void RichDeleteMessageBox::showAll() {
_cancel.show();
}
void RichDeleteMessageBox::hideAll() {
_text.hide();
_banUser.hide();
_reportSpam.hide();
_deleteAll.hide();
_delete.hide();
_cancel.hide();
}
KickMemberBox::KickMemberBox(PeerData *chat, UserData *member)
: ConfirmBox(lng_profile_sure_kick(lt_user, member->firstName), lang(lng_box_remove))
, _chat(chat)
@@ -600,7 +570,3 @@ void ConfirmInviteBox::paintEvent(QPaintEvent *e) {
void ConfirmInviteBox::showAll() {
showChildren();
}
void ConfirmInviteBox::hideAll() {
hideChildren();
}