2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Most of the new Settings are done.

Left: auto update, privacy and security, local storage box +
some minor things, like design fixes, codes like loadlang and
clearing of the local storage (box) and temp download folder.
This commit is contained in:
John Preston
2016-08-26 22:49:18 -06:00
parent 993b91ac15
commit fdab386178
66 changed files with 1259 additions and 656 deletions

View File

@@ -42,6 +42,8 @@ Widget::Widget() : LayerWidget()
_fixedBarShadow1->move(0, _fixedBar->y() + st::settingsFixedBarHeight);
_fixedBarShadow2->move(0, _fixedBarShadow1->y() + st::lineWidth);
_scroll->move(0, st::settingsFixedBarHeight);
connect(_inner, SIGNAL(heightUpdated()), this, SLOT(onInnerHeightUpdated()));
}
void Widget::parentResized() {
@@ -70,6 +72,17 @@ void Widget::parentResized() {
// resize it here, not in the resizeEvent() handler.
_inner->resizeToWidth(newWidth, newContentLeft);
resizeUsingInnerHeight(newWidth, newContentLeft);
}
void Widget::onInnerHeightUpdated() {
resizeUsingInnerHeight(width(), _contentLeft);
}
void Widget::resizeUsingInnerHeight(int newWidth, int newContentLeft) {
if (!App::wnd()) return;
int windowWidth = App::wnd()->width();
int windowHeight = App::wnd()->height();
int maxHeight = st::settingsFixedBarHeight + _inner->height();
int newHeight = maxHeight;