Improve design of contacts according to mockups.
This commit is contained in:
parent
e41dba5fb2
commit
57b7391f53
|
@ -943,8 +943,17 @@ requestsBoxList: PeerList(peerListBox) {
|
||||||
item: requestsBoxItem;
|
item: requestsBoxItem;
|
||||||
}
|
}
|
||||||
contactsWithStories: PeerList(peerListBox) {
|
contactsWithStories: PeerList(peerListBox) {
|
||||||
|
padding: margins(0px, 0px, 0px, 0px);
|
||||||
item: PeerListItem(peerListBoxItem) {
|
item: PeerListItem(peerListBoxItem) {
|
||||||
|
height: 52px;
|
||||||
|
photoPosition: point(18px, 5px);
|
||||||
|
namePosition: point(70px, 7px);
|
||||||
|
statusPosition: point(70px, 27px);
|
||||||
|
|
||||||
checkbox: RoundImageCheckbox(defaultPeerListCheckbox) {
|
checkbox: RoundImageCheckbox(defaultPeerListCheckbox) {
|
||||||
|
selectExtendTwice: 1px;
|
||||||
|
imageRadius: 21px;
|
||||||
|
imageSmallRadius: 19px;
|
||||||
check: RoundCheckbox(defaultPeerListCheck) {
|
check: RoundCheckbox(defaultPeerListCheck) {
|
||||||
size: 0px;
|
size: 0px;
|
||||||
}
|
}
|
||||||
|
@ -952,6 +961,8 @@ contactsWithStories: PeerList(peerListBox) {
|
||||||
nameFgChecked: contactsNameFg;
|
nameFgChecked: contactsNameFg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
storiesReadLineTwice: 2px;
|
||||||
|
storiesUnreadLineTwice: 4px;
|
||||||
requestsAcceptButton: RoundButton(defaultActiveButton) {
|
requestsAcceptButton: RoundButton(defaultActiveButton) {
|
||||||
width: -28px;
|
width: -28px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
|
|
@ -309,7 +309,7 @@ object_ptr<Ui::RpWidget> CreatePeerListSectionSubtitle(
|
||||||
rpl::producer<QString> text) {
|
rpl::producer<QString> text) {
|
||||||
auto result = object_ptr<Ui::FixedHeightWidget>(
|
auto result = object_ptr<Ui::FixedHeightWidget>(
|
||||||
parent,
|
parent,
|
||||||
st::searchedBarHeight);
|
st::windowFilterChatsSectionSubtitleHeight);
|
||||||
|
|
||||||
const auto raw = result.data();
|
const auto raw = result.data();
|
||||||
raw->paintRequest(
|
raw->paintRequest(
|
||||||
|
|
|
@ -230,7 +230,9 @@ void StoriesController::rowClicked(not_null<PeerListRow*> row) {
|
||||||
base::unique_qptr<Ui::PopupMenu> StoriesController::rowContextMenu(
|
base::unique_qptr<Ui::PopupMenu> StoriesController::rowContextMenu(
|
||||||
QWidget *parent,
|
QWidget *parent,
|
||||||
not_null<PeerListRow*> row) {
|
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, {
|
Dialogs::Stories::FillSourceMenu(_window, {
|
||||||
.id = row->id(),
|
.id = row->id(),
|
||||||
|
|
|
@ -368,7 +368,7 @@ void Row::PaintCornerBadgeFrame(
|
||||||
const auto st = context.st;
|
const auto st = context.st;
|
||||||
const auto storiesUnreadBrush = [&] {
|
const auto storiesUnreadBrush = [&] {
|
||||||
if (context.active) {
|
if (context.active) {
|
||||||
return st::dialogsUnreadBgActive->b;
|
return st::dialogsUnreadBgMutedActive->b;
|
||||||
}
|
}
|
||||||
const auto left = st->padding.left();
|
const auto left = st->padding.left();
|
||||||
const auto top = st->padding.top();
|
const auto top = st->padding.top();
|
||||||
|
|
|
@ -399,6 +399,9 @@ void RoundImageCheckbox::paint(Painter &p, int x, int y, int outerWidth) const {
|
||||||
_st.imageRadius * 2,
|
_st.imageRadius * 2,
|
||||||
_st.imageRadius * 2,
|
_st.imageRadius * 2,
|
||||||
outerWidth);
|
outerWidth);
|
||||||
|
const auto add = _st.selectExtendTwice / 2.;
|
||||||
|
const auto outline = QRectF(rect).marginsAdded({
|
||||||
|
add, add, add, add });
|
||||||
if (segments < 2) {
|
if (segments < 2) {
|
||||||
const auto radius = _roundingRadius
|
const auto radius = _roundingRadius
|
||||||
? _roundingRadius(_st.imageRadius * 2)
|
? _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);
|
segments ? _segments.front().width : _st.selectWidth);
|
||||||
p.setPen(pen);
|
p.setPen(pen);
|
||||||
if (!radius) {
|
if (!radius) {
|
||||||
p.drawEllipse(rect);
|
p.drawEllipse(outline);
|
||||||
} else {
|
} else {
|
||||||
p.drawRoundedRect(rect, *radius, *radius);
|
p.drawRoundedRect(outline, *radius, *radius);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const auto small = 160;
|
const auto small = 160;
|
||||||
|
@ -429,7 +432,7 @@ void RoundImageCheckbox::paint(Painter &p, int x, int y, int outerWidth) const {
|
||||||
Qt::RoundCap));
|
Qt::RoundCap));
|
||||||
const auto from = int(base::SafeRound(start));
|
const auto from = int(base::SafeRound(start));
|
||||||
const auto till = int(base::SafeRound(start + length));
|
const auto till = int(base::SafeRound(start + length));
|
||||||
p.drawArc(rect, from, till - from);
|
p.drawArc(outline, from, till - from);
|
||||||
start += length + separator;
|
start += length + separator;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ mainMenuVersionLabel: FlatLabel(mainMenuTelegramLabel) {
|
||||||
mainMenuVersionBottom: 17px;
|
mainMenuVersionBottom: 17px;
|
||||||
|
|
||||||
mainMenuToggleSize: 6px;
|
mainMenuToggleSize: 6px;
|
||||||
mainMenuToggleFourStrokes: 4px;
|
mainMenuToggleFourStrokes: 3px;
|
||||||
mainMenuTogglePosition: point(30px, 30px);
|
mainMenuTogglePosition: point(30px, 30px);
|
||||||
|
|
||||||
themeEditorSampleSize: size(90px, 51px);
|
themeEditorSampleSize: size(90px, 51px);
|
||||||
|
@ -305,13 +305,14 @@ windowFilterTypeBots: icon {{ "folders/folders_type_bots", historyPeerUserpicFg
|
||||||
windowFilterTypeNoMuted: icon {{ "folders/folders_type_muted", historyPeerUserpicFg }};
|
windowFilterTypeNoMuted: icon {{ "folders/folders_type_muted", historyPeerUserpicFg }};
|
||||||
windowFilterTypeNoArchived: icon {{ "folders/folders_type_archived", historyPeerUserpicFg }};
|
windowFilterTypeNoArchived: icon {{ "folders/folders_type_archived", historyPeerUserpicFg }};
|
||||||
windowFilterTypeNoRead: icon {{ "folders/folders_type_read", historyPeerUserpicFg }};
|
windowFilterTypeNoRead: icon {{ "folders/folders_type_read", historyPeerUserpicFg }};
|
||||||
|
windowFilterChatsSectionSubtitleHeight: 28px;
|
||||||
windowFilterChatsSectionSubtitle: FlatLabel(defaultFlatLabel) {
|
windowFilterChatsSectionSubtitle: FlatLabel(defaultFlatLabel) {
|
||||||
style: TextStyle(defaultTextStyle) {
|
style: TextStyle(defaultTextStyle) {
|
||||||
font: searchedBarFont;
|
font: semiboldFont;
|
||||||
}
|
}
|
||||||
textFg: searchedBarFg;
|
textFg: searchedBarFg;
|
||||||
}
|
}
|
||||||
windowFilterChatsSectionSubtitlePadding: margins(17px, 7px, 17px, 7px);
|
windowFilterChatsSectionSubtitlePadding: margins(22px, 5px, 22px, 5px);
|
||||||
|
|
||||||
windowArchiveToast: Toast(defaultToast) {
|
windowArchiveToast: Toast(defaultToast) {
|
||||||
minWidth: boxWideWidth;
|
minWidth: boxWideWidth;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6abad69ca6de8b592d23902b7bc2bf4190af2dcb
|
Subproject commit d431d803c8b347c192d1bc9b6a206d2622a10748
|
Loading…
Reference in New Issue