瀏覽代碼

HUE-3732 [editor] Icons are misaligned in the snippet menu

Johan Ahlen 9 年之前
父節點
當前提交
9ffd112

+ 1 - 1
desktop/core/src/desktop/templates/ko_components.mako

@@ -393,7 +393,7 @@ from desktop.views import _ko
             <img class="snippet-icon" data-bind="attr: { 'src': $root.getSnippetViewSettings(type()).snippetImage }">
             <!-- /ko -->
             <!-- ko if: $root.getSnippetViewSettings(type()).snippetIcon -->
-            <i style="margin-left: 6px; color: #338bb8;" class="fa snippet-icon" data-bind="css: $root.getSnippetViewSettings(type()).snippetIcon"></i>
+            <i style="margin-left: 2px; color: #338bb8;" class="fa snippet-icon" data-bind="css: $root.getSnippetViewSettings(type()).snippetIcon"></i>
             <!-- /ko -->
             </div>
             <span data-bind="text: name"></span>

+ 5 - 0
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -2592,6 +2592,11 @@ ${ hueIcons.symbols() }
           aceMode: 'ace/mode/r',
           snippetImage: '${ static("spark/art/icon_spark_48.png") }'
         },
+        scala: {
+          placeHolder: '${ _("Example: 1 + 1, or press CTRL + space") }',
+          aceMode: 'ace/mode/scala',
+          snippetImage: '${ static("spark/art/icon_spark_48.png") }'
+        },
         spark: {
           placeHolder: '${ _("Example: 1 + 1, or press CTRL + space") }',
           aceMode: 'ace/mode/scala',