Merge pull request #202 from bsinno/fix_Improve_space_usage_for_tag_type_names
Fix improve space usage for tag type names
This commit is contained in:
@@ -42,11 +42,11 @@ import com.vaadin.ui.themes.ValoTheme;
|
||||
public abstract class AbstractFilterButtons extends Table {
|
||||
|
||||
private static final long serialVersionUID = 7783305719009746375L;
|
||||
|
||||
|
||||
private static final String DEFAULT_GREEN = "rgb(44,151,32)";
|
||||
|
||||
protected static final String FILTER_BUTTON_COLUMN = "filterButton";
|
||||
|
||||
|
||||
@Autowired
|
||||
protected transient EventBus.SessionEventBus eventBus;
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class AbstractFilterButtons extends Table {
|
||||
createTable();
|
||||
eventBus.subscribe(this);
|
||||
}
|
||||
|
||||
|
||||
@PreDestroy
|
||||
void destroy() {
|
||||
eventBus.unsubscribe(this);
|
||||
@@ -156,6 +156,7 @@ public abstract class AbstractFilterButtons extends Table {
|
||||
columnIds.add(FILTER_BUTTON_COLUMN);
|
||||
setVisibleColumns(columnIds.toArray());
|
||||
setColumnHeaderMode(ColumnHeaderMode.HIDDEN);
|
||||
setColumnWidth(FILTER_BUTTON_COLUMN, 137);
|
||||
}
|
||||
|
||||
private Button createFilterButton(final Long id, final String name, final String description, final String color,
|
||||
@@ -180,6 +181,7 @@ public abstract class AbstractFilterButtons extends Table {
|
||||
button.setDescription(name);
|
||||
}
|
||||
button.setData(id == null ? SPUIDefinitions.NO_TAG_BUTTON_ID : itemId);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ui.decorators;
|
||||
|
||||
import org.eclipse.hawkbit.ui.utils.SPUIButtonDefinitions;
|
||||
|
||||
import com.vaadin.server.Resource;
|
||||
import com.vaadin.ui.Button;
|
||||
import com.vaadin.ui.themes.ValoTheme;
|
||||
@@ -22,16 +20,10 @@ public class SPUITagButtonStyle implements SPUIButtonDecorator {
|
||||
@Override
|
||||
public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) {
|
||||
|
||||
/**
|
||||
* Add ... for long name
|
||||
*/
|
||||
final String buttonCaption = button.getCaption();
|
||||
if (buttonCaption != null && buttonCaption.length() > SPUIButtonDefinitions.BUTTON_CAPTION_LENGTH) {
|
||||
button.setCaption(buttonCaption.substring(0, SPUIButtonDefinitions.BUTTON_CAPTION_LENGTH) + "...");
|
||||
}
|
||||
button.setImmediate(true);
|
||||
button.addStyleName("button-no-border" + " " + ValoTheme.BUTTON_BORDERLESS + " " + ValoTheme.BUTTON_TINY + " "
|
||||
button.addStyleName("generatedColumnPadding button-no-border" + " " + ValoTheme.BUTTON_BORDERLESS + " "
|
||||
+ "button-tag-no-border");
|
||||
|
||||
// Set Style
|
||||
if (null != style) {
|
||||
if (setStyle) {
|
||||
|
||||
@@ -181,4 +181,13 @@
|
||||
visibility: hidden;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.v-button-generatedColumnPadding {
|
||||
height: 28px;
|
||||
padding: 0 6px !important;
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user