Skip to content

Commit

Permalink
dbeaver/pro#2674 [TE] Shared credentials button is not visible on sma…
Browse files Browse the repository at this point in the history
…ll screens (#33271)

* dbeaver/pro#2674 [TE] Shared credentials button is not visible on small
screens

Scrolled composite added

* dbeaver/pro#2674  Composite reduced

* dbeaver/pro#2674 incorrect indentation fix

* dbeaver/pro#2674 V scroll fixed

---------

Co-authored-by: kseniaguzeeva <112612526+kseniaguzeeva@users.noreply.github.com>
  • Loading branch information
serjiokov and kseniaguzeeva committed May 27, 2024
1 parent 9acdcc4 commit 654d234
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,10 @@ private CTabItem createPageTab(@NotNull IDialogPage page, int index) {
item.setToolTipText(page.getDescription());

if (page.getControl() == null) {
// TODO: We should respect pages that might not want to be scrollable (e.g. if they have their own scrollable controls)
item.setControl(UIUtils.createScrolledComposite(tabFolder));
final ScrolledComposite sc = new ScrolledComposite(tabFolder, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
sc.setExpandHorizontal(true);
sc.setExpandVertical(true);
item.setControl(sc);
} else {
item.setControl(page.getControl().getParent());
}
Expand All @@ -440,6 +442,17 @@ private void activateCurrentItem() {
ScrolledComposite panel = (ScrolledComposite) selection.getControl();
panel.setRedraw(false);
try {
if (panel instanceof ScrolledComposite sc) {
page.createControl(sc);
Dialog.applyDialogFont(sc);
sc.setContent(page.getControl());
sc.setMinSize(page.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT));
sc.layout();
} else {
page.createControl(panel);
Dialog.applyDialogFont(panel);
panel.layout(true, true);
}
page.createControl(panel);
Dialog.applyDialogFont(panel);
UIUtils.configureScrolledComposite(panel, page.getControl());
Expand Down

0 comments on commit 654d234

Please sign in to comment.