Skip to content
Snippets Groups Projects
Commit b80205ec authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

photoboothView: fix the white border in dark mode and the photo taken

Change-Id: I24556c668d92a11573a23bab2367a0a470d01750
parent 2d8078a0
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,9 @@ ColumnLayout { ...@@ -141,7 +141,9 @@ ColumnLayout {
AvatarImage { AvatarImage {
id: avatarImg id: avatarImg
anchors.fill: parent anchors.centerIn: avatarLabelBackground
width: avatarLabelBackground.width + avatarImg.spinningAnimationWidth
height: avatarLabelBackground.height + avatarImg.spinningAnimationWidth
showPresenceIndicator: false showPresenceIndicator: false
......
...@@ -137,9 +137,8 @@ QString ...@@ -137,9 +137,8 @@ QString
PhotoboothPreviewRender::takePhoto(int size) PhotoboothPreviewRender::takePhoto(int size)
{ {
if (auto previewImage = lrcInstance_->renderer()->getPreviewFrame()) { if (auto previewImage = lrcInstance_->renderer()->getPreviewFrame()) {
return Utils::byteArrayToBase64String(Utils::QImageToByteArray( return Utils::byteArrayToBase64String(
previewImage->copy() Utils::QImageToByteArray(Utils::getCirclePhoto(previewImage->copy(), size)));
.scaled(size, size, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation)));
} }
return {}; return {};
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment