Modified to operate font style only when selected

This commit is contained in:
tanyulong2021 2022-08-03 14:59:16 +08:00
parent f3933bff1e
commit f7ae3f4555
2 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,25 @@
From 1b7d49654623f68942e94789946414b17836f4d6 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Wed, 3 Aug 2022 15:22:07 +0800
Subject: [PATCH] Modified to operate font style only when selected
---
src/editPage.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/editPage.cpp b/src/editPage.cpp
index 6315c18..de64389 100755
--- a/src/editPage.cpp
+++ b/src/editPage.cpp
@@ -385,7 +385,7 @@ void Edit_page::mergeFormatOnWordOrSelection(const QTextCharFormat &format)
{
QTextCursor cursor = ui->textEdit->textCursor();
if (!cursor.hasSelection()) {
- cursor.select(QTextCursor::WordUnderCursor);
+ // cursor.select(QTextCursor::WordUnderCursor);
}
cursor.mergeCharFormat(format);
ui->textEdit->mergeCurrentCharFormat(format);
--
2.33.0

View File

@ -1,7 +1,7 @@
%define debug_package %{nil}
Name: ukui-notebook
Version: 3.1.0
Release: 4
Release: 5
Summary: A component of the ukui desktop environment that provides convenient text
License: GPL-2+
URL: http://www.ukui.org
@ -27,7 +27,7 @@ BuildRequires: ukui-sidebar
patch0: 0001-Modify-segment-fault-error.patch
patch1: 0002-Correct-typos-error-in-headerbar.cpp.patch
patch2: 0003-Modified-to-operate-font-style-only-when-selected.patch
%description
A component of the ukui desktop environment that provides convenient text recording and flexible interface display
@ -36,6 +36,7 @@ A component of the ukui desktop environment that provides convenient text record
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
mkdir build && cd build
@ -62,6 +63,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/ukui-notebook/ukui-notebook_zh_CN.qm
%changelog
* Wed Aug 03 2022 tanyulong <tanyulong@kylinos.cn> - 3.1.0-5
- Modified to operate font style only when selected
* Tue Aug 02 2022 tanyulong <tanyulong@kylinos.cn> - 3.1.0-4
- Correct typos error in headerbar.cpp