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

fix: highlight current branch in git log pane #185

Merged
merged 1 commit into from
Nov 13, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- (UI): Removed macOS scrollbar turning yellow on hover. I'm sorry to anyone who liked this behaviour, but it was not
supposed to exist in the first place.
- (Editor): Search results now show up beside the scrollbar as `blue`.
- (UI): Highlight current branch in git log pane.

### Security

Expand Down
20 changes: 18 additions & 2 deletions generateFlavours/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,30 @@ const handlebarsOpacityWithHex = (
return calculateOpacity(color, opacity, context)
}

const handlebarsMix = (
const mix = (
color1: string,
color2: string,
amount: number,
): string => {
return colormath
.mixColor(colormath.hex.toRgb(color1), colormath.hex.toRgb(color2), amount)
.hex.toLowerCase()
.replace("#", "");
};

const handlebarsMix = (
color1: string,
color2: string,
amount: number,
): string => {
return mix(color1, color2, amount).replace("#", "");
};

const handlebarsMixWithHex = (
color1: string,
color2: string,
amount: number,
): string => {
return mix(color1, color2, amount)
};

const capitalize = (str: string): string => {
Expand All @@ -55,6 +70,7 @@ Handlebars.registerHelper("isLatte", handlebarsIsLatte);
Handlebars.registerHelper("opacity", handlebarsOpacity);
Handlebars.registerHelper("opacityWithHex", handlebarsOpacityWithHex);
Handlebars.registerHelper("mix", handlebarsMix);
Handlebars.registerHelper("mixWithHex", handlebarsMixWithHex);

const __dirname = path.dirname(path.fromFileUrl(import.meta.url));
const themePath = path.join(__dirname, "../src/main/resources/themes/");
Expand Down
4 changes: 2 additions & 2 deletions generateFlavours/ui.theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@
},
"Log": {
"Commit": {
"currentBranchBackground": "panelBackground",
"currentBranchBackground": "{{mixWithHex mauve mantle 0.05}}",
"hoveredBackground": "hoverBackground",
"selectionInactiveBackground": "selectionInactiveBackground"
"selectionInactiveBackground": "hoverBackground"
}
},
"RefLabel": {
Expand Down