mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Make caret width normal/thick behind CJK char configurable.
Fixes #820 (regression).
This commit is contained in:
parent
074adbab24
commit
bbb1a766e2
2 changed files with 10 additions and 1 deletions
|
|
@ -117,6 +117,12 @@ IsBidiUI()
|
|||
return Preferences::GetBool("bidi.browser.ui");
|
||||
}
|
||||
|
||||
static bool
|
||||
CjkThickCaret()
|
||||
{
|
||||
return Preferences::GetBool("layout.cjkthickcaret");
|
||||
}
|
||||
|
||||
nsCaret::nsCaret()
|
||||
: mOverrideOffset(0)
|
||||
, mBlinkCount(-1)
|
||||
|
|
@ -190,7 +196,7 @@ nsCaret::ComputeMetrics(nsIFrame* aFrame, int32_t aOffset, nscoord aCaretHeight)
|
|||
nsPresContext::CSSPixelsToAppUnits(
|
||||
LookAndFeel::GetInt(LookAndFeel::eIntID_CaretWidth, 1));
|
||||
|
||||
if (DrawCJKCaret(aFrame, aOffset)) {
|
||||
if (DrawCJKCaret(aFrame, aOffset) && CjkThickCaret()) {
|
||||
caretWidth += nsPresContext::CSSPixelsToAppUnits(1);
|
||||
}
|
||||
nscoord bidiIndicatorSize = nsPresContext::CSSPixelsToAppUnits(kMinBidiIndicatorPixels);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue