Improve design of contacts according to mockups.

This commit is contained in:
John Preston 2023-07-05 12:55:22 +04:00
parent e41dba5fb2
commit 57b7391f53
7 changed files with 27 additions and 10 deletions

View File

@ -943,8 +943,17 @@ requestsBoxList: PeerList(peerListBox) {
item: requestsBoxItem;
}
contactsWithStories: PeerList(peerListBox) {
padding: margins(0px, 0px, 0px, 0px);
item: PeerListItem(peerListBoxItem) {
height: 52px;
photoPosition: point(18px, 5px);
namePosition: point(70px, 7px);
statusPosition: point(70px, 27px);
checkbox: RoundImageCheckbox(defaultPeerListCheckbox) {
selectExtendTwice: 1px;
imageRadius: 21px;
imageSmallRadius: 19px;
check: RoundCheckbox(defaultPeerListCheck) {
size: 0px;
}
@ -952,6 +961,8 @@ contactsWithStories: PeerList(peerListBox) {
nameFgChecked: contactsNameFg;
}
}
storiesReadLineTwice: 2px;
storiesUnreadLineTwice: 4px;
requestsAcceptButton: RoundButton(defaultActiveButton) {
width: -28px;
height: 30px;

View File

@ -309,7 +309,7 @@ object_ptr<Ui::RpWidget> CreatePeerListSectionSubtitle(
rpl::producer<QString> text) {
auto result = object_ptr<Ui::FixedHeightWidget>(
parent,
st::searchedBarHeight);
st::windowFilterChatsSectionSubtitleHeight);
const auto raw = result.data();
raw->paintRequest(

View File

@ -230,7 +230,9 @@ void StoriesController::rowClicked(not_null<PeerListRow*> row) {
base::unique_qptr<Ui::PopupMenu> StoriesController::rowContextMenu(
QWidget *parent,
not_null<PeerListRow*> row) {
auto result = base::make_unique_q<Ui::PopupMenu>(parent);
auto result = base::make_unique_q<Ui::PopupMenu>(
parent,
st::popupMenuWithIcons);
Dialogs::Stories::FillSourceMenu(_window, {
.id = row->id(),

View File

@ -368,7 +368,7 @@ void Row::PaintCornerBadgeFrame(
const auto st = context.st;
const auto storiesUnreadBrush = [&] {
if (context.active) {
return st::dialogsUnreadBgActive->b;
return st::dialogsUnreadBgMutedActive->b;
}
const auto left = st->padding.left();
const auto top = st->padding.top();

View File

@ -399,6 +399,9 @@ void RoundImageCheckbox::paint(Painter &p, int x, int y, int outerWidth) const {
_st.imageRadius * 2,
_st.imageRadius * 2,
outerWidth);
const auto add = _st.selectExtendTwice / 2.;
const auto outline = QRectF(rect).marginsAdded({
add, add, add, add });
if (segments < 2) {
const auto radius = _roundingRadius
? _roundingRadius(_st.imageRadius * 2)
@ -408,9 +411,9 @@ void RoundImageCheckbox::paint(Painter &p, int x, int y, int outerWidth) const {
segments ? _segments.front().width : _st.selectWidth);
p.setPen(pen);
if (!radius) {
p.drawEllipse(rect);
p.drawEllipse(outline);
} else {
p.drawRoundedRect(rect, *radius, *radius);
p.drawRoundedRect(outline, *radius, *radius);
}
} else {
const auto small = 160;
@ -429,7 +432,7 @@ void RoundImageCheckbox::paint(Painter &p, int x, int y, int outerWidth) const {
Qt::RoundCap));
const auto from = int(base::SafeRound(start));
const auto till = int(base::SafeRound(start + length));
p.drawArc(rect, from, till - from);
p.drawArc(outline, from, till - from);
start += length + separator;
}
}

View File

@ -165,7 +165,7 @@ mainMenuVersionLabel: FlatLabel(mainMenuTelegramLabel) {
mainMenuVersionBottom: 17px;
mainMenuToggleSize: 6px;
mainMenuToggleFourStrokes: 4px;
mainMenuToggleFourStrokes: 3px;
mainMenuTogglePosition: point(30px, 30px);
themeEditorSampleSize: size(90px, 51px);
@ -305,13 +305,14 @@ windowFilterTypeBots: icon {{ "folders/folders_type_bots", historyPeerUserpicFg
windowFilterTypeNoMuted: icon {{ "folders/folders_type_muted", historyPeerUserpicFg }};
windowFilterTypeNoArchived: icon {{ "folders/folders_type_archived", historyPeerUserpicFg }};
windowFilterTypeNoRead: icon {{ "folders/folders_type_read", historyPeerUserpicFg }};
windowFilterChatsSectionSubtitleHeight: 28px;
windowFilterChatsSectionSubtitle: FlatLabel(defaultFlatLabel) {
style: TextStyle(defaultTextStyle) {
font: searchedBarFont;
font: semiboldFont;
}
textFg: searchedBarFg;
}
windowFilterChatsSectionSubtitlePadding: margins(17px, 7px, 17px, 7px);
windowFilterChatsSectionSubtitlePadding: margins(22px, 5px, 22px, 5px);
windowArchiveToast: Toast(defaultToast) {
minWidth: boxWideWidth;

@ -1 +1 @@
Subproject commit 6abad69ca6de8b592d23902b7bc2bf4190af2dcb
Subproject commit d431d803c8b347c192d1bc9b6a206d2622a10748