Skip to content

Commit e985b4f

Browse files
authored
Fixed Dark Mode issues (#4463)
Signed-off-by: Justin Charles <[email protected]>
1 parent 7cbc597 commit e985b4f

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

js/toolbar.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,12 +1135,19 @@ class Toolbar {
11351135
function renderNewProjectConfirmation() {
11361136
const modalContainer = document.getElementById("modal-container");
11371137
const newDropdown = document.getElementById("newdropdown");
1138+
const isDarkMode = document.body.classList.contains("dark");
1139+
newDropdown.style.backgroundColor = isDarkMode ? "#424242" : "#ffffff";
1140+
newDropdown.style.border = isDarkMode ? "1px solid #444444" : "1px solid #cccccc";
1141+
newDropdown.style.color = isDarkMode ? "#ffffff" : "#000000";
1142+
newDropdown.style.padding = "24px";
11381143
newDropdown.innerHTML = '';
11391144
const title = document.createElement("div");
1140-
title.innerHTML = `<h2 style="color: #0066FF; font-size: 24px; text-align: left; margin: 0;">${_("New project")}</h2>`;
1145+
title.innerHTML = `<h2 style="font-size: 24px; text-align: left; margin: 0; color: #2196F3;">${_("New project")}</h2>`;
11411146
newDropdown.appendChild(title);
11421147
const confirmationMessage = document.createElement("div");
1143-
confirmationMessage.innerHTML = `<div id="confirmation-message" style="color: #666666; font-size: 16px; margin-bottom: 24px; text-align: left;">${_("Are you sure you want to create a new project?")}</div>`;
1148+
confirmationMessage.innerHTML = `<div id="confirmation-message" style="font-size: 16px; margin-bottom: 24px; text-align: left; ${
1149+
isDarkMode ? "color: #ffffff;" : "color: #666666;"
1150+
}">${_("Are you sure you want to create a new project?")}</div>`;
11441151
newDropdown.appendChild(confirmationMessage);
11451152
const confirmationButtonLi = document.createElement("li");
11461153
confirmationButtonLi.style.textAlign = "center";
@@ -1151,7 +1158,7 @@ function renderNewProjectConfirmation() {
11511158
confirmationButton.style.backgroundColor = platformColor.blueButton;
11521159
confirmationButton.style.color = "white";
11531160
confirmationButton.style.textDecoration = "none";
1154-
confirmationButton.style.borderRadius = "4px";
1161+
confirmationButton.style.borderRadius = "0px";
11551162
confirmationButton.style.fontWeight = "bold";
11561163
confirmationButton.innerHTML = _("Confirm");
11571164
confirmationButtonLi.appendChild(confirmationButton);

js/utils/platformstyle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ let platformThemes = {
115115
"#66BB6A"
116116
],
117117
gridWheelcolors: {
118-
wheel: ["#1C1C1C"],
118+
wheel: ["#D6D6D6"],
119119
selected: {
120-
fill: "#303030",
121-
stroke: "#757575"
120+
fill: "#858585",
121+
stroke: "#777"
122122
}
123123
},
124124
drumWheelcolors: ["#008BA3", "#00ACC1"],

0 commit comments

Comments
 (0)