From 3c2b38dac791459e175759bbad623d8858ac0bba Mon Sep 17 00:00:00 2001 From: "zhoulibin@xiaoxin" <125377187@qq.com> Date: Sun, 9 Jun 2024 08:58:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/AnnotationPopup.tsx | 113 +++++++++++++++++++++++++------- 1 file changed, 88 insertions(+), 25 deletions(-) diff --git a/src/modules/AnnotationPopup.tsx b/src/modules/AnnotationPopup.tsx index 0ea25b93..9b9d5287 100644 --- a/src/modules/AnnotationPopup.tsx +++ b/src/modules/AnnotationPopup.tsx @@ -1346,11 +1346,31 @@ function PopupRoot() { ); const [isShowSelectedPopupColorsTag, setShowSelectedPopupColorsTag] = useState(getPrefT("show-selected-popup-colors-tag", false)); + const [isShowSelectedPopupMatchTag, setShowSelectedPopupMatchTag] = useState( + getPrefT("show-selected-popup-match-tag", false), + ); + + const [fontSize, setFontSize] = useState(getPrefT("font-size-10", 170)); + const [lineHeight, setLineHeight] = useState(getPrefT("line-height-10", 15)); return ( <> -
+ +
+ { + setPref("show-config", !isShowConfig); + setShowConfig(!isShowConfig); + }} + > + 设置 + {isShowConfig && ( -
+ + 顶部颜色栏配置: - - - -
- {getString("addon-static-example")} - {getString("addon-static-example", { branch: "branch-example" })} -
-
+ + )} - {isShowConfig &&
通用配置占一行
} -
已存在的标签。{isShowConfig && "已存在标签的配置"}
-
- { - setPref("show-config", !isShowConfig); - setShowConfig(!isShowConfig); - }} - > - 设置 + {isShowConfig && ( + + 通用配置占一行 + { + const f = fontSize > 60 ? fontSize - 5 : 60; + setPref("font-size-10", f); + setFontSize(f); + }} + > + 减小字体 + + { + const f = fontSize + 5; + setPref("font-size-10", f); + setFontSize(f); + }} + > + 增大字体 + + { + const f = lineHeight > 7 ? lineHeight - 1 : 7; + setPref("line-height-10", f); + setLineHeight(f); + }} + > + 减小行高 + + { + const f = lineHeight + 1; + setPref("line-height-10", f); + setLineHeight(f); + }} + > + 增大行高 + +
- =搜索input。{isShowConfig && "标签配置,字体大小,"} -
-
搜索结果
+ )} + 已存在的标签。{isShowConfig && "已存在标签的配置"} + 搜索input。{isShowConfig && "标签配置,字体大小,"} + 搜索结果
);