Skip to content

Commit

Permalink
post review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed Mar 19, 2024
1 parent bf8631c commit f252005
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/qml/components/MMPhotoAttachment.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Rectangle {
color: __style.polarColor
radius: 20 * __dp

property bool canDeviceTakePictures: true
property bool hasCameraCapability: true

signal capturePhotoClicked()
signal chooseFromGalleryClicked()
Expand All @@ -31,11 +31,11 @@ Rectangle {
Rectangle {
id: takePictureBox

width: canDeviceTakePictures ? parent.width / 2 - parent.spacing / 2 : 0
width: hasCameraCapability ? parent.width / 2 - parent.spacing / 2 : 0
height: parent.height
color: __style.lightGreenColor
radius: root.radius
visible: canDeviceTakePictures
visible: hasCameraCapability

Column {
width: parent.width
Expand Down Expand Up @@ -69,7 +69,7 @@ Rectangle {
Rectangle {
id: chooseFromGaleryBox

width: canDeviceTakePictures ? parent.width / 2 - parent.spacing / 2 : parent.width
width: hasCameraCapability ? parent.width / 2 - parent.spacing / 2 : parent.width
height: parent.height
color: __style.lightGreenColor
radius: root.radius
Expand Down
2 changes: 1 addition & 1 deletion app/qml/form/editors/MMFormPhotoViewer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ MMBaseInput {
height: root.contentItemHeight
visible: root.state === "notSet"

canDeviceTakePictures: hasCameraCapability
hasCameraCapability: root.hasCameraCapability

onCapturePhotoClicked: root.capturePhotoClicked()
onChooseFromGalleryClicked: root.chooseFromGalleryClicked()
Expand Down

0 comments on commit f252005

Please sign in to comment.