Skip to content

Commit

Permalink
Themes: Switch theme for DevExpress components
Browse files Browse the repository at this point in the history
(reference #52)
  • Loading branch information
piotrzarzycki21 committed Dec 29, 2023
1 parent 04dfc5a commit 9813c54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ package controller.startup.prepareView
case Theme.DARK:
themeProxy.themeId = loadCSS("resources/themes/" + Theme.DARK + "/defaults.css");
themeProxy.theme = Theme.DARK;
window["DevExpress"].ui.themes.current("generic." + Theme.DARK);
break;
default:
themeProxy.themeId = loadCSS("resources/themes/" + Theme.LIGHT + "/defaults.css");
themeProxy.theme = Theme.LIGHT;
window["DevExpress"].ui.themes.current("generic." + Theme.LIGHT);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.5.6/dialog-polyfill.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/devextreme-quill/1.6.2/dx-quill.core.min.css">
<link rel="stylesheet" href="https://cdn3.devexpress.com/jslib/23.1.3/css/dx.light.css">

<link rel="dx-theme" data-theme="generic.light" data-active="true" href="https://cdn3.devexpress.com/jslib/23.1.3/css/dx.light.css">
<link rel="dx-theme" data-theme="generic.dark" data-active="false" href="https://cdn3.devexpress.com/jslib/23.1.3/css/dx.dark.css">

<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/devextreme-quill/1.6.2/dx-quill.min.js"></script>
<script type="text/javascript" src="https://cdn3.devexpress.com/jslib/23.1.3/js/dx.all.js"></script>
Expand Down

0 comments on commit 9813c54

Please sign in to comment.