diff --git a/Telegram/SourceFiles/boxes/peer_list_box.cpp b/Telegram/SourceFiles/boxes/peer_list_box.cpp index bc74b0546229f1..c99ae0035705e2 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_box.cpp @@ -888,7 +888,6 @@ void PeerListRow::paintDisabledCheckUserpic( p.setPen(userpicBorderPen); p.setBrush(Qt::NoBrush); p.drawEllipse(userpicEllipse); - // p.drawRoundedRect(userpicEllipse, RabbitSettings::JsonSettings::GetInt("userpic_roundness"), RabbitSettings::JsonSettings::GetInt("userpic_roundness")); p.setPen(iconBorderPen); p.setBrush(st.disabledCheckFg); diff --git a/Telegram/SourceFiles/calls/calls_userpic.cpp b/Telegram/SourceFiles/calls/calls_userpic.cpp index 9cd38ab6475829..ecb07dc70dc1b6 100644 --- a/Telegram/SourceFiles/calls/calls_userpic.cpp +++ b/Telegram/SourceFiles/calls/calls_userpic.cpp @@ -107,7 +107,6 @@ void Userpic::paint() { _muteSize, _muteSize); p.drawEllipse(rect); - // p.drawRoundedRect(rect, RabbitSettings::JsonSettings::GetInt("userpic_roundness"), RabbitSettings::JsonSettings::GetInt("userpic_roundness")); st::callMutedPeerIcon.paintInCenter(p, rect); } } diff --git a/Telegram/SourceFiles/data/data_folder.cpp b/Telegram/SourceFiles/data/data_folder.cpp index ced42e4083ef15..25093a19e61a8b 100644 --- a/Telegram/SourceFiles/data/data_folder.cpp +++ b/Telegram/SourceFiles/data/data_folder.cpp @@ -270,8 +270,8 @@ void Folder::paintUserpic( p.setBrush(overrideBg ? *overrideBg : st::historyPeerArchiveUserpicBg); { PainterHighQualityEnabler hq(p); - // p.drawEllipse(x, y, size, size); - p.drawRoundedRect(x, y, size, size, size * (RabbitSettings::JsonSettings::GetInt("userpic_roundness")) / 100, size * (RabbitSettings::JsonSettings::GetInt("userpic_roundness")) / 100); + auto radius = RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100. * size; + p.drawRoundedRect(x, y, size, size, radius, radius); } if (size == st::defaultDialogRow.photoSize) { const auto rect = QRect{ x, y, size, size }; diff --git a/Telegram/SourceFiles/data/data_peer.cpp b/Telegram/SourceFiles/data/data_peer.cpp index 20fda3bdb707a6..d6d18f91d50d3e 100644 --- a/Telegram/SourceFiles/data/data_peer.cpp +++ b/Telegram/SourceFiles/data/data_peer.cpp @@ -353,12 +353,11 @@ void PeerData::paintUserpic( QImage image = view.cached; roundedRect.addRoundedRect( QRect(x, y, size, size), - size * RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100, - size * RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100); + size * RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100., + size * RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100.); p.setClipPath(roundedRect); p.drawImage(x, y, image); p.restore(); - /* p.drawImage(QRect(x, y, size, size), view.cached); */ } void PeerData::loadUserpic() { diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_video_userpic.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_video_userpic.cpp index 881932712a4c24..3012aa9c232a62 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_video_userpic.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_video_userpic.cpp @@ -100,13 +100,12 @@ void VideoUserpic::paintLeft( QImage image = _video->current(request(size), now); roundedRect.addRoundedRect( QRect(x, y, image.height(), image.width()), - image.height() * RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100, - image.width() * RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100); + image.width() * RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100, + image.height() * RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100); p.setClipPath(roundedRect); p.drawImage(x, y, image); p.restore(); - /* p.drawImage(x, y, _video->current(request(size), now)); */ } else { _peer->paintUserpicLeft(p, view, x, y, w, size); } diff --git a/Telegram/SourceFiles/history/view/media/history_view_poll.cpp b/Telegram/SourceFiles/history/view/media/history_view_poll.cpp index 1d889fe12b775a..ddf4f39dac736a 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_poll.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_poll.cpp @@ -919,8 +919,8 @@ void Poll::paintRecentVoters( p.setPen(pen); p.setBrush(Qt::NoBrush); PainterHighQualityEnabler hq(p); - p.drawEllipse(x, y, size, size); - // p.drawRoundedRect(x, y, size, size, RabbitSettings::JsonSettings::GetInt("userpic_roundness"), RabbitSettings::JsonSettings::GetInt("userpic_roundness")); + auto radius = RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100. * size; + p.drawRoundedRect(x, y, size, size, radius, radius); }; if (usesBubblePattern(context)) { const auto add = st::lineWidth * 2; diff --git a/Telegram/SourceFiles/ui/effects/outline_segments.cpp b/Telegram/SourceFiles/ui/effects/outline_segments.cpp index d6a5e7aa5fb041..3b9c7e6528e2e5 100644 --- a/Telegram/SourceFiles/ui/effects/outline_segments.cpp +++ b/Telegram/SourceFiles/ui/effects/outline_segments.cpp @@ -20,14 +20,12 @@ void PaintOutlineSegments( p.setBrush(Qt::NoBrush); const auto count = std::min(int(segments.size()), kOutlineSegmentsMax); - // if (count == 1 /* || (RabbitSettings::JsonSettings::GetInt("userpic_roundness") != 100) */) { - p.setPen(QPen(segments.front().brush, segments.front().width)); - // p.drawEllipse(ellipse); - p.drawRoundedRect( - ellipse, - ellipse.height() * RabbitSettings::JsonSettings::GetInt("userpic_roundness") * 0.0102, - ellipse.width() * RabbitSettings::JsonSettings::GetInt("userpic_roundness") * 0.0102); - return; + p.setPen(QPen(segments.front().brush, segments.front().width)); + p.drawRoundedRect( + ellipse, + ellipse.height() * RabbitSettings::JsonSettings::GetInt("userpic_roundness") * 0.0102, + ellipse.width() * RabbitSettings::JsonSettings::GetInt("userpic_roundness") * 0.0102); + return; // } /* const auto small = 160; const auto full = arc::kFullLength; diff --git a/Telegram/SourceFiles/ui/effects/round_checkbox.cpp b/Telegram/SourceFiles/ui/effects/round_checkbox.cpp index d1a69e4b73d053..51c2a2ddc281e4 100644 --- a/Telegram/SourceFiles/ui/effects/round_checkbox.cpp +++ b/Telegram/SourceFiles/ui/effects/round_checkbox.cpp @@ -417,7 +417,6 @@ 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(outline); p.drawRoundedRect( outline, outline.height() * RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100, diff --git a/Telegram/SourceFiles/ui/empty_userpic.cpp b/Telegram/SourceFiles/ui/empty_userpic.cpp index b46a11f1f7dad1..db3132d423f9be 100644 --- a/Telegram/SourceFiles/ui/empty_userpic.cpp +++ b/Telegram/SourceFiles/ui/empty_userpic.cpp @@ -325,10 +325,6 @@ void EmptyUserpic::paintCircle( int y, int outerWidth, int size) const { - /* paint(p, x, y, outerWidth, size, [&] { - p.drawEllipse(x, y, size, size); - }); */ - paint(p, x, y, outerWidth, size, [&] { double customRadius = (double) size * ((double) RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100); p.drawRoundedRect(x, y, size, size, @@ -391,7 +387,6 @@ void EmptyUserpic::PaintSavedMessages( PainterHighQualityEnabler hq(p); p.setBrush(std::move(bg)); p.setPen(Qt::NoPen); - // p.drawEllipse(x, y, size, size); double customRadius = (double) size * ((double) RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100); p.drawRoundedRect(x, y, size, size, customRadius, customRadius); @@ -433,7 +428,6 @@ void EmptyUserpic::PaintRepliesMessages( PainterHighQualityEnabler hq(p); p.setBrush(bg); p.setPen(Qt::NoPen); - // p.drawEllipse(x, y, size, size); double customRadius = (double) size * ((double) RabbitSettings::JsonSettings::GetInt("userpic_roundness") / 100); p.drawRoundedRect(x, y, size, size, customRadius, customRadius); diff --git a/Telegram/build/setup.iss b/Telegram/build/setup.iss index d92971a35a1a4c..437343205e2075 100644 --- a/Telegram/build/setup.iss +++ b/Telegram/build/setup.iss @@ -8,7 +8,7 @@ #define MyAppId "4356CE01-4137-4C55-9F8B-FB4EEBB6EC0C" #define CurrentYear GetDateTimeString('yyyy','','') #define MyBuildTarget "win64" -#define MyAppVersionFull "5.1.8-18062024" +#define MyAppVersionFull "5.1.8-20062024" [Setup] ; NOTE: The value of AppId uniquely identifies this application.