mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-20 08:03:45 +08:00
Added separate userpics style for birthday contacts top bar suggestion.
This commit is contained in:
@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
using "ui/basic.style";
|
||||
|
||||
using "chat_helpers/chat_helpers.style"; // GroupCallUserpics
|
||||
using "ui/layers/layers.style"; // boxRoundShadow
|
||||
using "ui/widgets/widgets.style";
|
||||
|
||||
@@ -853,6 +854,12 @@ dialogsTopBarSuggestionAboutStyle: TextStyle(defaultTextStyle) {
|
||||
}
|
||||
dialogsTopBarSuggestionMargins: margins(8px, 8px, 8px, 8px);
|
||||
dialogsTopBarSuggestionIconPadding: 12px;
|
||||
dialogsTopBarSuggestionUserpics: GroupCallUserpics {
|
||||
size: 25px;
|
||||
shift: 8px;
|
||||
stroke: 2px;
|
||||
align: align(left);
|
||||
}
|
||||
dialogsTopBarSuggestionShadow: BoxShadow {
|
||||
blurRadius: 3px;
|
||||
offset: point(0px, 1px);
|
||||
|
||||
@@ -20,8 +20,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "ui/ui_utility.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "styles/style_chat.h"
|
||||
#include "styles/style_chat_helpers.h"
|
||||
#include "styles/style_dialogs.h"
|
||||
#include "styles/style_userpic_button.h"
|
||||
|
||||
namespace Dialogs::TopBarSuggestions {
|
||||
@@ -103,7 +103,7 @@ void Activate(ActivateArgs args) {
|
||||
inRow.push_back({ .peer = user });
|
||||
}
|
||||
}
|
||||
const auto &userpicsSt = st::historyCommentsUserpics;
|
||||
const auto &userpicsSt = st::dialogsTopBarSuggestionUserpics;
|
||||
const auto rowCount = int(inRow.size());
|
||||
const auto rowWidth = userpicsSt.size
|
||||
+ (rowCount - 1) * (userpicsSt.size - userpicsSt.shift);
|
||||
@@ -119,7 +119,7 @@ void Activate(ActivateArgs args) {
|
||||
HistoryView::GenerateUserpicsInRow(
|
||||
s->userpics,
|
||||
s->inRow,
|
||||
st::historyCommentsUserpics,
|
||||
st::dialogsTopBarSuggestionUserpics,
|
||||
3);
|
||||
}
|
||||
p.drawImage(0, 0, s->userpics);
|
||||
|
||||
Reference in New Issue
Block a user