mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
* make weekday font smaller for Chinese locale (#2535) * add item to contributor list
This commit is contained in:
parent
ae6d79fd7e
commit
ed332966d9
2 changed files with 5 additions and 1 deletions
|
@ -126,6 +126,7 @@ Joel Koen <mail@joelkoen.com>
|
||||||
Christopher Woggon <christopher.woggon@gmail.com>
|
Christopher Woggon <christopher.woggon@gmail.com>
|
||||||
Kavel Rao <github.com/kavelrao>
|
Kavel Rao <github.com/kavelrao>
|
||||||
Ben Yip <github.com/bennyyip>
|
Ben Yip <github.com/bennyyip>
|
||||||
|
mmjang <752515918@qq.com>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import {
|
||||||
timeYear,
|
timeYear,
|
||||||
} from "d3";
|
} from "d3";
|
||||||
|
|
||||||
|
import { firstLanguage } from "../lib/i18n/bundles";
|
||||||
import type { GraphBounds, SearchDispatch } from "./graph-helpers";
|
import type { GraphBounds, SearchDispatch } from "./graph-helpers";
|
||||||
import { RevlogRange, setDataAvailable } from "./graph-helpers";
|
import { RevlogRange, setDataAvailable } from "./graph-helpers";
|
||||||
import { clickableClass } from "./graph-styles";
|
import { clickableClass } from "./graph-styles";
|
||||||
|
@ -154,6 +155,8 @@ export function renderCalendar(
|
||||||
const height = bounds.height / 10;
|
const height = bounds.height / 10;
|
||||||
const emptyColour = nightMode ? "#333" : "#ddd";
|
const emptyColour = nightMode ? "#333" : "#ddd";
|
||||||
|
|
||||||
|
const firstLang = firstLanguage();
|
||||||
|
|
||||||
svg.select("g.weekdays")
|
svg.select("g.weekdays")
|
||||||
.selectAll("text")
|
.selectAll("text")
|
||||||
.data(sourceData.weekdayLabels)
|
.data(sourceData.weekdayLabels)
|
||||||
|
@ -166,7 +169,7 @@ export function renderCalendar(
|
||||||
.attr("fill", nightMode ? "#ddd" : "black")
|
.attr("fill", nightMode ? "#ddd" : "black")
|
||||||
.attr("dominant-baseline", "hanging")
|
.attr("dominant-baseline", "hanging")
|
||||||
.attr("text-anchor", "end")
|
.attr("text-anchor", "end")
|
||||||
.attr("font-size", "small")
|
.attr("font-size", firstLang.includes("zh") ? "xx-small" : "small")
|
||||||
.attr("font-family", "monospace")
|
.attr("font-family", "monospace")
|
||||||
.attr("direction", "ltr")
|
.attr("direction", "ltr")
|
||||||
.style("user-select", "none")
|
.style("user-select", "none")
|
||||||
|
|
Loading…
Reference in a new issue