Apply suggestions from code review
Co-authored-by: RichΛrd <info@richardramos.me>
This commit is contained in:
parent
eebd831c5d
commit
d5f3cf71a2
|
@ -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
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue