Commit 42fd375f authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

[widgets] improve UI readability for message boxes

parent ce45cbdb
Pipeline #37702 passed with stage
in 15 minutes and 45 seconds
...@@ -333,8 +333,8 @@ class AssetWidget(QWidget): ...@@ -333,8 +333,8 @@ class AssetWidget(QWidget):
if self.current_editor.isDirty(): if self.current_editor.isDirty():
answer = QMessageBox.question( answer = QMessageBox.question(
self, self,
self.tr("Save changed content"), self.tr("Content changed"),
self.tr(f"Content changed.\nSave {self.current_asset.name} ?"), self.tr(f"Do you wish to save:\n\n{self.current_asset.name}\n\n?"),
) )
if answer == QMessageBox.Yes: if answer == QMessageBox.Yes:
...@@ -371,7 +371,7 @@ class AssetWidget(QWidget): ...@@ -371,7 +371,7 @@ class AssetWidget(QWidget):
self, self,
self.tr("Deletion requested"), self.tr("Deletion requested"),
self.tr( self.tr(
f"You are about to delete the asset {self.current_asset.name} you are currently editing\n\nAre you sure you want to do that ?" f"You are about to delete the asset you are currently editing:\n\n{self.current_asset.name}\n\nAre you sure you want to do that ?"
), ),
) )
if answer == QMessageBox.No: if answer == QMessageBox.No:
...@@ -385,12 +385,12 @@ class AssetWidget(QWidget): ...@@ -385,12 +385,12 @@ class AssetWidget(QWidget):
else: else:
# Check before deletion # Check before deletion
asset = Asset.from_path(self.prefix_root_path, file_path) asset = Asset.from_path(self.prefix_root_path, file_path)
asset_type = str(asset.type).split("AssetType.")[1].lower() asset_type = asset.type.name.lower()
answer = QMessageBox.question( answer = QMessageBox.question(
self, self,
self.tr("Deletion requested"), self.tr("Deletion requested"),
self.tr( self.tr(
f"You are about to delete an asset of type {asset_type} named {asset.name}.\n\nAre you sure you want to do that ?" f"You are about to delete an asset of type {asset_type} named:\n\n{asset.name}\n\nAre you sure you want to do that ?"
), ),
) )
if answer == QMessageBox.No: if answer == QMessageBox.No:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment