Alona Kaplan has posted comments on this change. Change subject: webadmin: SetupNetwork- long network names shouldn't break the layout ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/32542/1/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkPanel.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/panels/NetworkPanel.java: Line 21: Label titleLabel; Line 22: Line 23: public NetworkPanel(LogicalNetworkModel item, NetworkPanelsStyle style, boolean draggable) { Line 24: super(item, style, draggable); Line 25: getElement().addClassName(item.getAttachedToNic() != null ? style.networkPanelAttached() > Why is this needed? If you set the width for the other fields sub-elements The "..." mechanism is based on calculating if there is overflow. If a specific width is not specified there will never be an overflow, the panel will just grow according to the size of the inline objects. Setting the width of the 'titleLabel' is a worse solution since it can have arbitrary width according to the number of icons in the panel (vlan tag, vm, display, migration, mgmt, edit). Line 26: : style.networkPanelNotAttached()); Line 27: if (item.isManagement()) { Line 28: getElement().addClassName(style.mgmtNetwork()); Line 29: } Line 154: @Override Line 155: protected void onLoad() { Line 156: super.onLoad(); Line 157: Line 158: while (ElementUtils.detectOverflowUsingScrollWidth(getElement())) { > And if the width is set automatically according to the leftovers, this won' See the previous comment. Line 159: titleLabel.getElement().getStyle().setWidth(titleLabel.getElement().getClientWidth() - 1, Unit.PX); Line 160: } Line 161: } Line 162: -- To view, visit http://gerrit.ovirt.org/32542 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife6ef384a5eac71398b397d8475ec312ed97eeb5 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <[email protected]> Gerrit-Reviewer: Alona Kaplan <[email protected]> Gerrit-Reviewer: Lior Vernia <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
