2017-06-22 86 views
1

我想創建工具型像最大化或最小化:如何爲面板標題創建自定義工具類型?

{ 
     type: 'my-type-name', 
     tooltip: 'Make Toolbar Float', 
     listeners: { 
      click: function(panel , e , owner , eOpts){} 
} 

爲了更好地實現,我已經創建的類中Tool.scss爲主題的基礎

.#{$prefix}tool-tool-type-my-type-name{ 
    @include icon($tool-my-type-name-icon); 
} 

但是圖標是私有的混入和Tool.scss不可見。 之後,我創建了該類的自己的聲明:

.#{$prefix}tool-tool-type-my-type-name{ 
    content: $fa-var-external-link; 
    font-family: $font-icon-font-family; 
    font-size: $tool-glyph-font-size; 
    color: red; 
    width:$tool-glyph-font-size; 
    height:$tool-glyph-font-size; 
} 

這沒有幫助。

回答

1

在VAR/... Tool.scss

// custom icons: 
$tool-my-type-name-glyph: dynamic($fa-var-external-link $tool-glyph-font-size $font-icon-font-family); 

在SRC .../Tools.scss

.#{$prefix}tool-my-type-name { 
     @if $enable-font-icons and $tool-my-type-name-glyph != null) { 
      @include font-icon($tool-my-type-name-glyph); 
      background: none; 
     } @else { 
      background-position: 0 ($tool-size * -2); 
     } 
    } 
相關問題