Skip to content

Commit 69bed5e

Browse files
authored
Style: Fix contrast issues on dark mode (#4277)
1 parent 15a4040 commit 69bed5e

File tree

4 files changed

+12
-42
lines changed

4 files changed

+12
-42
lines changed

src/css/dark-theme.less

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,8 @@ body.dark-theme {
22
.helpicon {
33
background-image: url(../images/icons/cf_icon_info_white.svg);
44
opacity: 0.3;
5-
}
6-
.cf {
7-
.helpicon {
8-
background-image: url(../images/icons/cf_icon_info_grey.svg);
9-
opacity: 0.4;
10-
&:hover {
11-
background-image: url(../images/icons/cf_icon_info_grey.svg);
12-
opacity: 1;
13-
}
5+
&:hover {
6+
opacity: 0.5;
147
}
158
}
169
.gui_box_titlebar {
@@ -37,35 +30,6 @@ body.dark-theme {
3730
}
3831
}
3932
}
40-
.tab-pid_tuning {
41-
.profile {
42-
.helpicon {
43-
background-image: url(../images/icons/cf_icon_info_grey.svg);
44-
opacity: 0.4;
45-
&:hover {
46-
opacity: 1;
47-
}
48-
}
49-
}
50-
.rate_profile {
51-
.helpicon {
52-
background-image: url(../images/icons/cf_icon_info_grey.svg);
53-
opacity: 0.4;
54-
&:hover {
55-
opacity: 1;
56-
}
57-
}
58-
}
59-
.pid_titlebar {
60-
.helpicon {
61-
background-image: url(../images/icons/cf_icon_info_grey.svg);
62-
opacity: 0.4;
63-
&:hover {
64-
opacity: 1;
65-
}
66-
}
67-
}
68-
}
6933

7034
.invertable {
7135
filter: invert(1)

src/css/main.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,12 @@ dialog {
12951295
&:hover {
12961296
background-color: var(--primary-400);
12971297
}
1298+
&.disabled {
1299+
background-color: var(--surface-500);
1300+
border: 1px solid var(--surface-400);
1301+
color: var(--surface-900);
1302+
cursor: default;
1303+
}
12981304
}
12991305
.regular-button.pushed {
13001306
background-color: var(--primary-transparent-3);

src/js/tabs/pid_tuning.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ pid_tuning.initialize = function (callback) {
981981
}
982982

983983
function drawAxes(curveContext, width, height) {
984-
curveContext.strokeStyle = '#000000';
984+
curveContext.strokeStyle = '#888888';
985985
curveContext.lineWidth = 4;
986986

987987
// Horizontal
@@ -1512,7 +1512,7 @@ pid_tuning.initialize = function (callback) {
15121512
thrlabel = `${Math.round(thrPercent <= 0 ? 0 : realthr)}%` +
15131513
` = ${Math.round(thrPercent <= 0 ? 0 : expothr)}%`,
15141514
textWidth = context.measureText(thrlabel);
1515-
context.fillStyle = '#000';
1515+
context.fillStyle = '#888888';
15161516
context.scale(textWidth / throttleCurve.clientWidth, 1);
15171517
context.fillText(thrlabel, 5, 5 + fontSize);
15181518
context.restore();
@@ -2071,7 +2071,7 @@ pid_tuning.updateRatesLabels = function() {
20712071

20722072
const drawAxisLabel = function(context, axisLabel, x, y, align, color) {
20732073

2074-
context.fillStyle = color || '#000000' ;
2074+
context.fillStyle = color || '#888888' ;
20752075
context.textAlign = align || 'center';
20762076
context.fillText(axisLabel, x, y);
20772077
};

src/tabs/auxiliary.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<div class="marker"></div>
6969
</div>
7070
<div class="delete">
71-
<a class="deleteRange" href="#">&nbsp;</a>
71+
<a class="deleteRange invertable" href="#">&nbsp;</a>
7272
</div>
7373
</div>
7474
<div class="link">

0 commit comments

Comments
 (0)