Skip to content

Commit

Permalink
Restrict preferences page height #251
Browse files Browse the repository at this point in the history
thanks @laurentmuller

Signed-off-by: Andre Bossert <[email protected]>
  • Loading branch information
anb0s committed Mar 30, 2022
1 parent 62b6e95 commit c275d17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,11 @@ private void createTableViewer(Composite parent) {
// contentProvider
tableViewer.setInput(CommandDataStore.instance());

// Layout the viewer
GridData gridData = new GridData();
gridData.verticalAlignment = GridData.FILL;
// Layout the table viewer
GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.heightHint = table.getItemHeight() * 20;
gridData.horizontalSpan = 2;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.horizontalAlignment = GridData.FILL;
tableViewer.getControl().setLayoutData(gridData);
table.setLayoutData(gridData);

tableViewer.addDoubleClickListener(new IDoubleClickListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,11 @@ private void createTableViewer(Composite parent) {
// contentProvider
tableViewer.setInput(MenuDataStore.instance());

// Layout the viewer
GridData gridData = new GridData();
gridData.verticalAlignment = GridData.FILL;
// Layout the table viewer
GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.heightHint = table.getItemHeight() * 20;
gridData.horizontalSpan = 2;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.horizontalAlignment = GridData.FILL;
tableViewer.getControl().setLayoutData(gridData);
table.setLayoutData(gridData);

tableViewer.addDoubleClickListener(new IDoubleClickListener() {
@Override
Expand Down

0 comments on commit c275d17

Please sign in to comment.