mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +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);
|
||||
|
|
|
|||
|
|
@ -5407,6 +5407,9 @@ pref("plugins.navigator_hide_disabled_flash", false);
|
|||
// Disable browser frames by default
|
||||
pref("dom.mozBrowserFramesEnabled", false);
|
||||
|
||||
// Thick caret when behind CJK characters
|
||||
pref("layout.cjkthickcaret", true);
|
||||
|
||||
// Is support for 'color-adjust' CSS property enabled?
|
||||
pref("layout.css.color-adjust.enabled", true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue