File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
java/gwt/material/design/addins/client/menubar
resources/gwt/material/design/addins/client/menubar/resources/css Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 2525import gwt .material .design .client .MaterialDesignBase ;
2626import gwt .material .design .client .base .MaterialWidget ;
2727
28+ import static gwt .material .design .jquery .client .api .JQuery .$ ;
29+
2830//@formatter:off
2931
3032/**
@@ -72,7 +74,21 @@ public class MaterialMenuBar extends MaterialWidget {
7274 }
7375 }
7476
77+ private String minHeight ;
78+
7579 public MaterialMenuBar () {
7680 super (Document .get ().createDivElement (), AddinsCssName .MENU_BAR );
7781 }
82+
83+ @ Override
84+ protected void onLoad () {
85+ super .onLoad ();
86+ $ (getElement ()).find (".dropdown-content li" ).css ("minHeight" , minHeight );
87+ $ (getElement ()).find (".dropdown-content li" ).css ("lineHeight" , minHeight );
88+ $ (getElement ()).find (".dropdown-content li" ).css ("maxHeight" , minHeight );
89+ }
90+
91+ public void setItemHeight (String minHeight ) {
92+ this .minHeight = minHeight ;
93+ }
7894}
Original file line number Diff line number Diff line change 1111 top : -48px !important ;
1212}
1313.menu-bar .dropdown-content li {
14+ display : inline-block;
1415 min-height : 0px ;
1516 line-height : 0px ;
16- max-height : 32px !important ;
17+ max-height : 32px ;
18+ }
19+ .menu-bar li {
20+ height : 40px ;
1721}
1822.menu-bar .dropdown-content li > a , .menu-bar .dropdown-content li > span {
1923 font-size : 12px !important ;
2024 min-height : 0px ;
2125 line-height : 16px ;
2226 color : # 000 ;
2327 padding : 8px 24px ;
28+ display : inline-block;
2429}
2530/** Supports checkbox on dropdown **/
2631.menu-bar ul .dropdown-content [type = "checkbox" ] + label {
You can’t perform that action at this time.
0 commit comments