From a11d17e5fe43ee049e52bd2d0370f5bce62af775 Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 12 Sep 2023 15:51:51 +0000 Subject: [PATCH 1/9] =?UTF-8?q?=E6=9B=B4=E6=96=B0readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luke --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e4b714..fab66d1 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,10 @@

- +[jnotepad-official-plugins][https://gitee.com/jcnc-org/jnotepad-official-plugins] +--- +- [官网插件仓库][jnotepad-official-plugins] +--- JNotepad(Java Notepad) 是一款简约而强大的跨平台文本编辑器,旨在提供用户友好的界面和丰富的功能以及插件化使用。无论你是在Linux、Windows还是macOS系统上使用,JNotepad都能满足你对文本编辑和查看的需求。 JNotepad使用Java语言编写,并基于JavaFX框架开发,具有良好的可扩展性和稳定性。 From b261bc22d9850687a844f477a651becfba3030c9 Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 12 Sep 2023 15:54:52 +0000 Subject: [PATCH 2/9] =?UTF-8?q?=E6=9B=B4=E6=96=B0readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luke --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fab66d1..228b8c1 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,15 @@

-[jnotepad-official-plugins][https://gitee.com/jcnc-org/jnotepad-official-plugins] ---- -- [官网插件仓库][jnotepad-official-plugins] ---- +[jnotepad-official-plugins]:https://gitee.com/jcnc-org/jnotepad-official-plugins +[jcnc-docs]:https://gitee.com/jcnc-org/docs + + +| 序号 | 相关仓库 | 链接地址 | +|:---: | :---------------: | :-----------------------------------:| +|1 | JNotepad插件仓库 | [点击访问][jnotepad-official-plugins] | +|2 | JCNC文档窗口 | [点击访问][jcnc-docs] | + JNotepad(Java Notepad) 是一款简约而强大的跨平台文本编辑器,旨在提供用户友好的界面和丰富的功能以及插件化使用。无论你是在Linux、Windows还是macOS系统上使用,JNotepad都能满足你对文本编辑和查看的需求。 JNotepad使用Java语言编写,并基于JavaFX框架开发,具有良好的可扩展性和稳定性。 From 87d00a29fb986c9d4b909b7455ea6c30e8d359a5 Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 12 Sep 2023 15:55:34 +0000 Subject: [PATCH 3/9] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luke --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 228b8c1..46f1bb4 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ | 序号 | 相关仓库 | 链接地址 | |:---: | :---------------: | :-----------------------------------:| |1 | JNotepad插件仓库 | [点击访问][jnotepad-official-plugins] | -|2 | JCNC文档窗口 | [点击访问][jcnc-docs] | +|2 | JCNC文档仓库 | [点击访问][jcnc-docs] | JNotepad(Java Notepad) 是一款简约而强大的跨平台文本编辑器,旨在提供用户友好的界面和丰富的功能以及插件化使用。无论你是在Linux、Windows还是macOS系统上使用,JNotepad都能满足你对文本编辑和查看的需求。 From d3326a1ed7036de7eefec34355c516744698c8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E8=BD=B2?= Date: Sun, 17 Sep 2023 20:10:06 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=9A=84=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/root/left/sidebar/tools/SidebarToolBar.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/org/jcnc/jnotepad/views/root/left/sidebar/tools/SidebarToolBar.java b/src/main/java/org/jcnc/jnotepad/views/root/left/sidebar/tools/SidebarToolBar.java index 929374b..5ae1b6a 100644 --- a/src/main/java/org/jcnc/jnotepad/views/root/left/sidebar/tools/SidebarToolBar.java +++ b/src/main/java/org/jcnc/jnotepad/views/root/left/sidebar/tools/SidebarToolBar.java @@ -30,12 +30,18 @@ public class SidebarToolBar extends javafx.scene.control.ToolBar { ImageView imageView = new ImageView(image); imageView.setFitWidth(10); imageView.setFitHeight(10); + + imageView.setPreserveRatio(true); + // 设置水平缩放比例 imageView.setScaleX(2.5); // 设置垂直缩放比例 imageView.setScaleY(2.5); + // 设置缩放比例 setButton.setGraphic(imageView); + setButton.setPrefWidth(imageView.getFitWidth() + 20); + setButton.setPrefHeight(imageView.getFitHeight() + 20); // 将按钮添加到工具栏 getItems().addAll(setButton); From 24503f8a9cc2ec709c11dab71652017d0d18ed0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E8=BD=B2?= Date: Sun, 17 Sep 2023 20:17:41 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E6=9B=B4=E6=96=B0iss=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitee/ISSUE_TEMPLATE/bug.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitee/ISSUE_TEMPLATE/bug.yml b/.gitee/ISSUE_TEMPLATE/bug.yml index 3906921..9dcc02b 100644 --- a/.gitee/ISSUE_TEMPLATE/bug.yml +++ b/.gitee/ISSUE_TEMPLATE/bug.yml @@ -50,10 +50,9 @@ body: label: 版本 description: 你当前正在使用我们软件的哪个版本/分支? options: - - V1.1.11(默认) - - V1.1.12(最新) + - V1.1.13(最新开发版) + - V1.1.12(最新发行版) + - V1.1.11 - V1.1.10 - - V1.1.9 - - V1.1.8 validations: required: true \ No newline at end of file From f445c321ba066438dbff8a06e06656e96bfb3025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E8=BD=B2?= Date: Sun, 17 Sep 2023 20:24:22 +0800 Subject: [PATCH 6/9] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 46f1bb4..505d001 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

JNotepad Icon

JNotepad

-

JavaFx开发,插件驱动,创造无限可

+

JavaFx开发,插件驱动,创造无限可能

Date: Sun, 17 Sep 2023 20:33:42 +0800 Subject: [PATCH 7/9] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E7=BB=84=E4=BB=B6=E7=9A=84=E8=BE=B9?= =?UTF-8?q?=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java | 4 ++++ src/main/resources/css/styles.css | 1 + 2 files changed, 5 insertions(+) diff --git a/src/main/java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java b/src/main/java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java index 02d46cc..f3cad56 100644 --- a/src/main/java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java +++ b/src/main/java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java @@ -1,5 +1,6 @@ package org.jcnc.jnotepad.ui.module; +import javafx.geometry.Insets; import org.fxmisc.richtext.LineNumberFactory; import org.fxmisc.richtext.StyleClassedTextArea; import org.jcnc.jnotepad.util.LogUtil; @@ -34,6 +35,9 @@ public class LineNumberTextArea extends StyleClassedTextArea { * 用于创建 LineNumberTextArea 对象 */ public LineNumberTextArea() { + //上、右、下、左 + setPadding(new Insets(8, 0, 0, 0)); + // 设置 LineNumberTextArea 的样式,包括边框和背景颜色 getStyleClass().add("line-number-text-area"); this.setParagraphGraphicFactory(LineNumberFactory.get(this)); diff --git a/src/main/resources/css/styles.css b/src/main/resources/css/styles.css index 1f9270c..49dfcb9 100644 --- a/src/main/resources/css/styles.css +++ b/src/main/resources/css/styles.css @@ -26,6 +26,7 @@ -fx-background-color: -color-neutral-muted } + .line-number-text-area .paragraph-box .text { /*-fx-fill: -color-fg-default;*/ /* -fx-font-size: 18px;*/ From afbbdc650c0fdc491474be29ce5b3b9464a28993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E8=BD=B2?= Date: Sun, 17 Sep 2023 20:42:29 +0800 Subject: [PATCH 8/9] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E4=B8=BA=E7=AD=89=E5=AE=BD=E5=AD=97=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java b/src/main/java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java index f3cad56..64b570c 100644 --- a/src/main/java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java +++ b/src/main/java/org/jcnc/jnotepad/ui/module/LineNumberTextArea.java @@ -37,7 +37,7 @@ public class LineNumberTextArea extends StyleClassedTextArea { public LineNumberTextArea() { //上、右、下、左 setPadding(new Insets(8, 0, 0, 0)); - + setStyle("-fx-font-family: 'Courier New';"); // 设置 LineNumberTextArea 的样式,包括边框和背景颜色 getStyleClass().add("line-number-text-area"); this.setParagraphGraphicFactory(LineNumberFactory.get(this)); From 88eee5194187c9575f5af49bd749d3e9950f727d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E8=BD=B2?= Date: Sun, 17 Sep 2023 20:50:57 +0800 Subject: [PATCH 9/9] =?UTF-8?q?fix:=E8=A1=8C=E5=8F=B7=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E6=9B=B4=E6=96=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/bottom/status/BottomStatusBox.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/main/java/org/jcnc/jnotepad/views/root/center/main/bottom/status/BottomStatusBox.java b/src/main/java/org/jcnc/jnotepad/views/root/center/main/bottom/status/BottomStatusBox.java index 4a064dc..4cf2baa 100644 --- a/src/main/java/org/jcnc/jnotepad/views/root/center/main/bottom/status/BottomStatusBox.java +++ b/src/main/java/org/jcnc/jnotepad/views/root/center/main/bottom/status/BottomStatusBox.java @@ -1,5 +1,7 @@ package org.jcnc.jnotepad.views.root.center.main.bottom.status; +import javafx.beans.value.ChangeListener; +import javafx.beans.value.ObservableValue; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.control.Label; @@ -114,10 +116,31 @@ public class BottomStatusBox extends AbstractHorizontalBox { CenterTab centerTab = instance.getSelected(); if (centerTab != null) { updateEncodingLabel(centerTab.getCharset().name()); + + // 添加光标位置变化监听器 + LineNumberTextArea textArea = centerTab.getLineNumberTextArea(); + textArea.caretPositionProperty().addListener(new ChangeListener() { + @Override + public void changed(ObservableValue observable, Number oldValue, Number newValue) { + updateRowColumnLabel(textArea.getCaretPosition(), textArea.getText()); + } + }); } } } + /** + * 更新行列信息 + * @param caretPosition 光标位置 + * @param text 文本内容 + */ + private void updateRowColumnLabel(int caretPosition, String text) { + int row = getRow(caretPosition, text); + int column = getColumn(caretPosition, text); + statusLabel.setText(getStatusBarFormattedText(row, column, text.length())); + } + + /** * 获取光标所在行号。 *