Havana SCSS theme, Folders pane icon, icons sprite definition #PL-1995

This commit is contained in:
Yuriy Artamonov 2013-05-17 11:04:41 +00:00
parent 1402160c85
commit 1d5661c9e9
6 changed files with 36 additions and 4 deletions

View File

@ -138,7 +138,7 @@ public class FoldersPane extends VerticalLayout {
createMenuBarCommand(),
firstItem);
menuItem.setStyleName("cuba-folders-pane");
menuItem.setStyleName(getMenuItemStyle());
}
}
@ -152,6 +152,7 @@ public class FoldersPane extends VerticalLayout {
showFolders(!visible);
selectedItem.setText(getMenuItemCaption());
selectedItem.setIcon(getMenuItemIcon());
selectedItem.setStyleName(getMenuItemStyle());
}
};
}
@ -497,10 +498,18 @@ public class FoldersPane extends VerticalLayout {
}
protected Resource getMenuItemIcon() {
return null;
// if (visible)
// return new VersionedThemeResource("icons/folders_pane_icon_active.png");
// else
// return new VersionedThemeResource("icons/folders_pane_icon.png");
}
protected String getMenuItemStyle() {
if (visible)
return new VersionedThemeResource("icons/folders_pane_icon_active.png");
return "folders-pane-icon-active";
else
return new VersionedThemeResource("icons/folders_pane_icon.png");
return "folders-pane-icon";
}
protected void openFolder(AbstractSearchFolder folder) {

View File

@ -31,9 +31,31 @@
}
}
.v-menubar-menuitem.v-menubar-menuitem-cuba-folders-pane {
.v-menubar-menuitem.v-menubar-menuitem-folders-pane-icon,
.v-menubar-menuitem.v-menubar-menuitem-folders-pane-icon-active {
background: transparent;
background-image: url(sprites/folders-pane-icon.png); /** sprite-ref: icons; */
}
.v-menubar-menuitem.v-menubar-menuitem-folders-pane-icon,
.v-menubar-menuitem.v-menubar-menuitem-folders-pane-icon-active,
.v-menubar-menuitem.v-menubar-menuitem-folders-pane-icon:hover,
.v-menubar-menuitem.v-menubar-menuitem-folders-pane-icon-active:hover {
padding-bottom: 5px;
padding-top: 1px;
width: 26px;
height: 21px;
border: 0;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
background-clip: border-box;
background-origin: border-box;
}
.v-menubar-menuitem.v-menubar-menuitem-folders-pane-icon-active,
.v-menubar-menuitem.v-menubar-menuitem-folders-pane-icon-active:hover {
border: 2px solid $theme_fieldFocusedBorderColor;
}
.v-label.cuba-folders-pane-caption {

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

View File

@ -8,6 +8,7 @@
// Version: $Id$
/** sprite: components; sprite-image: url('compiled/components.png'); sprite-layout: vertical */
/** sprite: icons; sprite-image: url('compiled/icons.png'); sprite-layout: horizontal */
// Inherit base theme
@import "../base/base";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B