mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-03 16:15:13 +00:00
Internal rework of settings
This commit is contained in:
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include "dialogs/dialogs_widget.h"
|
||||
|
||||
#include "kotato/kotato_settings.h"
|
||||
#include "kotato/kotato_lang.h"
|
||||
#include "dialogs/dialogs_inner_widget.h"
|
||||
#include "dialogs/dialogs_search_from_controllers.h"
|
||||
@@ -1592,7 +1593,7 @@ void Widget::updateControlsGeometry() {
|
||||
_forwardCancel->moveToLeft(0, filterAreaTop);
|
||||
filterAreaTop += st::dialogsForwardHeight;
|
||||
}
|
||||
auto smallLayoutWidth = (st::dialogsPadding.x() + (DialogListLines() == 1 ? st::dialogsUnreadHeight : st::dialogsPhotoSize) + st::dialogsPadding.x());
|
||||
auto smallLayoutWidth = (st::dialogsPadding.x() + (::Kotato::JsonSettings::GetInt("chat_list_lines") == 1 ? st::dialogsUnreadHeight : st::dialogsPhotoSize) + st::dialogsPadding.x());
|
||||
auto smallLayoutRatio = (width() < st::columnMinimalWidthLeft) ? (st::columnMinimalWidthLeft - width()) / float64(st::columnMinimalWidthLeft - smallLayoutWidth) : 0.;
|
||||
auto filterLeft = (controller()->filtersWidth() ? st::dialogsFilterSkip : st::dialogsFilterPadding.x() + _mainMenuToggle->width()) + st::dialogsFilterPadding.x();
|
||||
auto filterRight = (session().domain().local().hasLocalPasscode() ? (st::dialogsFilterPadding.x() + _lockUnlock->width()) : st::dialogsFilterSkip) + st::dialogsFilterPadding.x();
|
||||
@@ -1820,7 +1821,7 @@ void Widget::onCancelSearchInChat() {
|
||||
void Widget::onDialogMoved(int movedFrom, int movedTo) {
|
||||
int32 st = _scroll->scrollTop();
|
||||
if (st > movedTo && st < movedFrom) {
|
||||
_scroll->scrollToY(st + (DialogListLines() == 1 ? st::dialogsImportantBarHeight : st::dialogsRowHeight));
|
||||
_scroll->scrollToY(st + (::Kotato::JsonSettings::GetInt("chat_list_lines") == 1 ? st::dialogsImportantBarHeight : st::dialogsRowHeight));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user