Linux 上的 Firefox 的工具栏图标高度问题



使用以下代码将面板附加到工具栏按钮。

<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="test-toolbar-button" 
label="test" 
class="toolbarbutton-1 chromeclass-toolbar-additional" 
tooltiptext="test" 
type="panel"
>
<panel class="test-panel" id="test-panel" position="after_end" onpopupshown=""     width="643px" >
<iframe id="test-panel-iframe" src ="chrome://url.html" 
style="height:568px;width:343px;border:none;padding-left:3px;background-color:white;" >
</iframe>
</panel>
</toolbarbutton>

根据文档,我们需要为 Firefox 工具栏按钮指定两个图标 - 16x16 和 24x24

这是我使用的 CSS,

#test-toolbar-button {
  list-style-image: url("chrome://test-24.png");
  -moz-image-region: rect(0px 24px 24px 0px);
}
#test-button:hover {
}
#test-toolbar-button[disabled="true"] {
   -moz-image-region: rect(0px 48px 24px 24px);
}
toolbar[iconsize="small"] #test-toolbar-button 
{
    list-style-image: url("chrome://test-16.png");
    -moz-image-region: rect(0px 16px 16px 0px);
}

但是工具栏高度会增加,因为它有一个向下箭头,指示它是一个连接到工具栏按钮的面板,通过拧紧整个工具栏。

附上示例的屏幕截图。

http://postimage.org/image/sqwtwbfip/

谁能帮我摆脱困境。

-moz-box-orient: horizontal !important;

这奏效了.谢谢@WladimirPalant

最新更新