Apply suggestions from code review

Co-authored-by: RichΛrd <info@richardramos.me>
This commit is contained in:
Jonathan Rainville 2020-12-17 14:03:44 -05:00 committed by Iuri Matias
parent eebd831c5d
commit d5f3cf71a2
2 changed files with 3 additions and 4 deletions

View File

@ -1,8 +1,7 @@
import strutils, os import strutils, os
proc formatImagePath*(imagePath: string): string = proc formatImagePath*(imagePath: string): string =
var image: string = replace(imagePath, "file://", "") result = replace(imagePath, "file://", "")
if defined(windows): if defined(windows):
# Windows doesn't work with paths starting with a slash # Windows doesn't work with paths starting with a slash
image.removePrefix('/') result.removePrefix('/')
return image

View File

@ -57,7 +57,7 @@ ModalPopup {
id: cropImageModal id: cropImageModal
width: image.width + 50 width: image.width + 50
height: image.height + 170 height: image.height + 170
title: qsTr("Crop your image (optionnal)") title: qsTr("Crop your image (optional)")
Image { Image {
id: image id: image