Skip to content

Commit

Permalink
fix(ui5-segmentedbutton): size adjustments (#1225)
Browse files Browse the repository at this point in the history
- correct cosy and compact height
- listen on resize of the parent, not on the body
  • Loading branch information
MapTo0 committed Feb 20, 2020
1 parent 9dab18b commit 1a8f8b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/main/src/SegmentedButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ class SegmentedButton extends UI5Element {
this.absoluteWidthSet = false; // set to true whenever we set absolute width to the component
this.percentageWidthSet = false; // set to true whenever we set 100% width to the component
this.hasPreviouslyFocusedItem = false;
}

onEnterDOM() {
this._handleResizeBound = this._handleResize.bind(this);
}

ResizeHandler.register(document.body, this._handleResizeBound);
onEnterDOM() {
ResizeHandler.register(this.parentNode, this._handleResizeBound);
}

onExitDOM() {
ResizeHandler.deregister(document.body, this._handleResizeBound);
ResizeHandler.deregister(this.parentNode, this._handleResizeBound);
}

onBeforeRendering() {
Expand Down
2 changes: 1 addition & 1 deletion packages/main/src/themes/SegmentedButton.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

::slotted(ui5-togglebutton) {
border-radius: 0;
height: 2.75rem;
height: var(--_ui5_button_base_height);
min-width: 2.5rem;
white-space: nowrap;
overflow: hidden;
Expand Down

0 comments on commit 1a8f8b0

Please sign in to comment.