Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style: Fix contrast issues on dark mode #4277

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 2 additions & 38 deletions src/css/dark-theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@ body.dark-theme {
.helpicon {
background-image: url(../images/icons/cf_icon_info_white.svg);
opacity: 0.3;
}
.cf {
.helpicon {
background-image: url(../images/icons/cf_icon_info_grey.svg);
opacity: 0.4;
&:hover {
background-image: url(../images/icons/cf_icon_info_grey.svg);
opacity: 1;
}
&:hover {
opacity: 0.5;
}
}
.gui_box_titlebar {
Expand All @@ -37,35 +30,6 @@ body.dark-theme {
}
}
}
.tab-pid_tuning {
.profile {
.helpicon {
background-image: url(../images/icons/cf_icon_info_grey.svg);
opacity: 0.4;
&:hover {
opacity: 1;
}
}
}
.rate_profile {
.helpicon {
background-image: url(../images/icons/cf_icon_info_grey.svg);
opacity: 0.4;
&:hover {
opacity: 1;
}
}
}
.pid_titlebar {
.helpicon {
background-image: url(../images/icons/cf_icon_info_grey.svg);
opacity: 0.4;
&:hover {
opacity: 1;
}
}
}
}

.invertable {
filter: invert(1)
Expand Down
6 changes: 6 additions & 0 deletions src/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,12 @@ dialog {
&:hover {
background-color: var(--primary-400);
}
&.disabled {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
&.disabled {
&:disabled {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way it's currently handled is with a class, not a prop. Might be a good fix for a future PR

background-color: var(--surface-500);
border: 1px solid var(--surface-400);
color: var(--surface-900);
cursor: default;
}
}
.regular-button.pushed {
background-color: var(--primary-transparent-3);
Expand Down
6 changes: 3 additions & 3 deletions src/js/tabs/pid_tuning.js
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ pid_tuning.initialize = function (callback) {
}

function drawAxes(curveContext, width, height) {
curveContext.strokeStyle = '#000000';
curveContext.strokeStyle = '#888888';
curveContext.lineWidth = 4;

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

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

context.fillStyle = color || '#000000' ;
context.fillStyle = color || '#888888' ;
context.textAlign = align || 'center';
context.fillText(axisLabel, x, y);
};
Expand Down
2 changes: 1 addition & 1 deletion src/tabs/auxiliary.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<div class="marker"></div>
</div>
<div class="delete">
<a class="deleteRange" href="#">&nbsp;</a>
<a class="deleteRange invertable" href="#">&nbsp;</a>
</div>
</div>
<div class="link">
Expand Down