Skip to content

Commit

Permalink
[BACKLOG-39648] Dashboard interface is cropped on the right side
Browse files Browse the repository at this point in the history
- Fix tab-width when Solution Browser is present
- Ensure fix works when SolutionBrowser isn't present and hasn't loaded
  • Loading branch information
singletonc committed Jan 27, 2024
1 parent 346d504 commit e7e8aa8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ private void adjustWidth() {
int adjustedWidth = solutionNavigatorPanel.getOffsetWidth() + splitterWidth;
int width = this.getOffsetWidth() - adjustedWidth;
if ( width > 0 ) {
contentTabPanel.setWidth( width + "px" );
String widthString = "calc( 100vw - " + adjustedWidth + "px )";
contentTabPanel.setTabBarWidth( widthString );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.pentaho.gwt.widgets.client.tabs.PentahoTab;
import org.pentaho.gwt.widgets.client.utils.FrameUtils;
import org.pentaho.gwt.widgets.client.utils.MenuBarUtils;
import org.pentaho.gwt.widgets.client.utils.string.CssUtils;
import org.pentaho.gwt.widgets.client.utils.string.StringUtils;
import org.pentaho.mantle.client.dialogs.WaitPopup;
import org.pentaho.mantle.client.events.EventBusUtil;
Expand Down Expand Up @@ -112,6 +113,11 @@ public void setTabsMenu( MenuBar menuBar, MenuItem menuItem ) {
tabsMenuItem.setSubMenu( tabsSubMenuBar );
tabsMenuBar.addStyleName( CLASS_FLEX_ROW );
tabsMenuBar.addStyleName( CLASS_EMPTY_TABS_MENU );
setTabBarWidth( "100vw" );
}

public void setTabBarWidth( String widthString ){
CssUtils.setElementWidth( getTabBar(), widthString );
}

public void addTab( String text, String tooltip, boolean closeable, Widget content ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,6 @@ hr {

.panelWithTitledToolbar .pentaho-tab-bar {
display: flex;
width: 100vw;
overflow-x: auto;
scrollbar-width: thin;
overflow-y: hidden;
Expand Down

0 comments on commit e7e8aa8

Please sign in to comment.