Просмотр исходного кода

Prevent last line of popup to be cut off

We didn't take the y offset into account

CURA-9112
Jaime van Kessel 2 лет назад
Родитель
Сommit
2ecec1fa37
2 измененных файлов с 9 добавлено и 3 удалено
  1. 1 1
      resources/qml/PrintSetupTooltip.qml
  2. 8 2
      resources/qml/Settings/SettingItem.qml

+ 1 - 1
resources/qml/PrintSetupTooltip.qml

@@ -63,7 +63,7 @@ UM.PointingRectangle
     {
         id: textScroll
         width: parent.width
-        height: Math.min(label.height, base.parent.height)
+        height: Math.min(label.height + UM.Theme.getSize("tooltip_margins").height, base.parent.height)
 
         ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
         ScrollBar.vertical.policy: ScrollBar.AsNeeded

+ 8 - 2
resources/qml/Settings/SettingItem.qml

@@ -62,13 +62,19 @@ Item
         var affected_by_list = ""
         for (var i in affected_by)
         {
-            affected_by_list += "<li>%1</li>\n".arg(affected_by[i].label)
+            if(affected_by[i].label != "")
+            {
+                affected_by_list += "<li>%1</li>\n".arg(affected_by[i].label)
+            }
         }
 
         var affects_list = ""
         for (var i in affects)
         {
-            affects_list += "<li>%1</li>\n".arg(affects[i].label)
+            if(affects[i].label != "")
+            {
+                affects_list += "<li>%1</li>\n".arg(affects[i].label)
+            }
         }
 
         var tooltip = "<b>%1</b>\n<p>%2</p>".arg(definition.label).arg(definition.description)