Skip to content

Commit

Permalink
Align switch in toolbar to vertical center in material theme (T119704…
Browse files Browse the repository at this point in the history
…5) (DevExpress#26246)

Co-authored-by: Alexander Bulychev <git@bulychev.net>
  • Loading branch information
iBat and Alexander Bulychev committed Dec 14, 2023
1 parent 6468349 commit b784a95
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions scss/widgets/material/toolbar/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@
}
}
}

.dx-switch {
display: block;
line-height: 0;
}
}

.dx-toolbar .dx-tab {
Expand Down
13 changes: 12 additions & 1 deletion testing/testcafe/tests/navigation/toolbar/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import Toolbar from '../../../model/toolbar/toolbar';
fixture.disablePageReloads`Toolbar_common`
.page(url(__dirname, '../../container.html'));

const supportedWidgets = ['dxAutocomplete', 'dxCheckBox', 'dxDateBox', 'dxMenu', 'dxSelectBox', 'dxTabs', 'dxTextBox', 'dxButtonGroup', 'dxDropDownButton'];
const supportedWidgets = [
'dxAutocomplete', 'dxCheckBox', 'dxDateBox', 'dxMenu', 'dxSelectBox', 'dxTabs', 'dxTextBox', 'dxButtonGroup', 'dxDropDownButton',
];

['never', 'always', 'auto'].forEach((locateInMenu) => {
[true, false].forEach((rtlEnabled) => {
Expand Down Expand Up @@ -157,6 +159,15 @@ const supportedWidgets = ['dxAutocomplete', 'dxCheckBox', 'dxDateBox', 'dxMenu',
text: 'opts.stylingMode: contained',
},
},
{
location: 'before',
locateInMenu,
widget: 'dxSwitch',
options: {
stylingMode: 'contained',
text: 'opts.stylingMode: contained',
},
},
];

return createWidget('dxToolbar', {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b784a95

Please sign in to comment.