Skip to content

Commit 0d8f389

Browse files
committed
Fix Dark Mode Bugs
Signed-off-by: Justin Charles <[email protected]>
1 parent 844d025 commit 0d8f389

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

css/themes.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@
104104
color: white;
105105
}
106106

107+
.dark .dropdown-content {
108+
background-color: #1c1c1c;
109+
}
110+
111+
.dark .dropdown-content:hover {
112+
background-color: #292929;
113+
}
114+
107115

108116

109117
/* Your Custom Theme can go here if you don't want to modify the existing dark mode */

js/toolbar.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,12 +1122,19 @@ class Toolbar {
11221122
function renderNewProjectConfirmation() {
11231123
const modalContainer = document.getElementById("modal-container");
11241124
const newDropdown = document.getElementById("newdropdown");
1125+
const isDarkMode = document.body.classList.contains("dark");
1126+
newDropdown.style.backgroundColor = isDarkMode ? "#424242" : "#ffffff";
1127+
newDropdown.style.border = isDarkMode ? "1px solid #444444" : "1px solid #cccccc";
1128+
newDropdown.style.color = isDarkMode ? "#ffffff" : "#000000";
1129+
newDropdown.style.padding = "24px";
11251130
newDropdown.innerHTML = '';
11261131
const title = document.createElement("div");
1127-
title.innerHTML = `<h2 style="color: #0066FF; font-size: 24px; text-align: left; margin: 0;">${_("New project")}</h2>`;
1132+
title.innerHTML = `<h2 style="font-size: 24px; text-align: left; margin: 0; color: #2196F3;">${_("New project")}</h2>`;
11281133
newDropdown.appendChild(title);
11291134
const confirmationMessage = document.createElement("div");
1130-
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>`;
1135+
confirmationMessage.innerHTML = `<div id="confirmation-message" style="font-size: 16px; margin-bottom: 24px; text-align: left; ${
1136+
isDarkMode ? "color: #ffffff;" : "color: #666666;"
1137+
}">${_("Are you sure you want to create a new project?")}</div>`;
11311138
newDropdown.appendChild(confirmationMessage);
11321139
const confirmationButtonLi = document.createElement("li");
11331140
confirmationButtonLi.style.textAlign = "center";
@@ -1138,7 +1145,7 @@ function renderNewProjectConfirmation() {
11381145
confirmationButton.style.backgroundColor = platformColor.blueButton;
11391146
confirmationButton.style.color = "white";
11401147
confirmationButton.style.textDecoration = "none";
1141-
confirmationButton.style.borderRadius = "4px";
1148+
confirmationButton.style.borderRadius = "0px";
11421149
confirmationButton.style.fontWeight = "bold";
11431150
confirmationButton.innerHTML = _("Confirm");
11441151
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)