From 3ea877c8da124517172b59adf55cd3480ccdf17d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 31 May 2019 17:55:04 +0300 Subject: [PATCH] ComboBoxFonts: change height for items, change count of recent fonts. --- apps/common/main/lib/component/ComboBoxFonts.js | 8 ++++---- apps/common/main/resources/less/combobox.less | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/component/ComboBoxFonts.js b/apps/common/main/lib/component/ComboBoxFonts.js index cc01c5a83..98c8c4714 100644 --- a/apps/common/main/lib/component/ComboBoxFonts.js +++ b/apps/common/main/lib/component/ComboBoxFonts.js @@ -56,7 +56,7 @@ define([ thumbContext = thumbCanvas.getContext('2d'), thumbPath = '../../../../sdkjs/common/Images/fonts_thumbnail.png', thumbPath2x = '../../../../sdkjs/common/Images/fonts_thumbnail@2x.png', - listItemHeight = 36; + listItemHeight = 26; if (typeof window['AscDesktopEditor'] === 'object') { thumbPath = window['AscDesktopEditor'].getFontsSprite(); @@ -76,7 +76,7 @@ define([ '
  • ', '<% _.each(items, function(item) { %>', '
  • ', - '', + '', '
  • ', '<% }); %>', '', @@ -93,7 +93,7 @@ define([ } })); - this.recent = _.isNumber(options.recent) ? options.recent : 3; + this.recent = _.isNumber(options.recent) ? options.recent : 5; // Common.NotificationCenter.on('fonts:change', _.bind(this.onApiChangeFont, this)); Common.NotificationCenter.on('fonts:load', _.bind(this.fillFonts, this)); @@ -370,7 +370,7 @@ define([ onInsertItem: function(item) { $(this.el).find('ul').prepend(_.template([ '
  • ', - '', + '', '
  • ' ].join(''))({ item: item.attributes, diff --git a/apps/common/main/resources/less/combobox.less b/apps/common/main/resources/less/combobox.less index b2f25aa99..9b87f75da 100644 --- a/apps/common/main/resources/less/combobox.less +++ b/apps/common/main/resources/less/combobox.less @@ -99,4 +99,11 @@ display: none; } } + + .font-item { + vertical-align:middle; + margin: 0 0 0 -10px; + padding-top: 0; + padding-bottom: 0; + } }