mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-23 18:46:53 +08:00
opt pub page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -9,19 +9,20 @@ class CustomIcon {
|
||||
static const IconData dm_settings = _CustomIconData(0xe803);
|
||||
static const IconData dyn = _CustomIconData(0xe804);
|
||||
static const IconData fav = _CustomIconData(0xe805);
|
||||
static const IconData share = _CustomIconData(0xe806);
|
||||
static const IconData share_line = _CustomIconData(0xe807);
|
||||
static const IconData share_node = _CustomIconData(0xe808);
|
||||
static const IconData star_favorite_line = _CustomIconData(0xe809);
|
||||
static const IconData star_favorite_solid = _CustomIconData(0xe80a);
|
||||
static const IconData thumbs_down = _CustomIconData(0xe80b);
|
||||
static const IconData thumbs_down_outline = _CustomIconData(0xe80c);
|
||||
static const IconData thumbs_up = _CustomIconData(0xe80d);
|
||||
static const IconData thumbs_up_fill = _CustomIconData(0xe80e);
|
||||
static const IconData thumbs_up_line = _CustomIconData(0xe80f);
|
||||
static const IconData thumbs_up_outline = _CustomIconData(0xe810);
|
||||
static const IconData topic_tag = _CustomIconData(0xe811);
|
||||
static const IconData watch_later = _CustomIconData(0xe812);
|
||||
static const IconData live_reserve = _CustomIconData(0xe806);
|
||||
static const IconData share = _CustomIconData(0xe807);
|
||||
static const IconData share_line = _CustomIconData(0xe808);
|
||||
static const IconData share_node = _CustomIconData(0xe809);
|
||||
static const IconData star_favorite_line = _CustomIconData(0xe80a);
|
||||
static const IconData star_favorite_solid = _CustomIconData(0xe80b);
|
||||
static const IconData thumbs_down = _CustomIconData(0xe80c);
|
||||
static const IconData thumbs_down_outline = _CustomIconData(0xe80d);
|
||||
static const IconData thumbs_up = _CustomIconData(0xe80e);
|
||||
static const IconData thumbs_up_fill = _CustomIconData(0xe80f);
|
||||
static const IconData thumbs_up_line = _CustomIconData(0xe810);
|
||||
static const IconData thumbs_up_outline = _CustomIconData(0xe811);
|
||||
static const IconData topic_tag = _CustomIconData(0xe812);
|
||||
static const IconData watch_later = _CustomIconData(0xe813);
|
||||
}
|
||||
|
||||
class _CustomIconData extends IconData {
|
||||
|
||||
@@ -26,7 +26,7 @@ import 'package:flutter/services.dart';
|
||||
/// created by bggRGjQaUbCoE on 2025/6/27
|
||||
///
|
||||
|
||||
enum RichTextType { text, composing, at, emoji, vote }
|
||||
enum RichTextType { text, composing, at, emoji, vote, common }
|
||||
|
||||
class Emote {
|
||||
late String url;
|
||||
@@ -752,7 +752,7 @@ class RichTextEditingController extends TextEditingController {
|
||||
text: e.text,
|
||||
style: composingRegionOutOfRange ? null : composingStyle,
|
||||
);
|
||||
case RichTextType.at:
|
||||
case RichTextType.at || RichTextType.common:
|
||||
richStyle ??= (style ?? const TextStyle())
|
||||
.copyWith(color: Theme.of(context).colorScheme.primary);
|
||||
return TextSpan(
|
||||
|
||||
@@ -2305,18 +2305,18 @@ class RenderEditable extends RenderBox
|
||||
localPos: localPos,
|
||||
lastTapDownPosition: _lastTapDownPosition!,
|
||||
);
|
||||
position = TextPosition(offset: newOffset);
|
||||
final newSelection = TextSelection.collapsed(offset: newOffset);
|
||||
|
||||
final TextRange word = _textPainter.getWordBoundary(position);
|
||||
late TextSelection newSelection;
|
||||
if (position.offset <= word.start) {
|
||||
newSelection = TextSelection.collapsed(offset: word.start);
|
||||
} else {
|
||||
newSelection = TextSelection.collapsed(
|
||||
offset: word.end,
|
||||
affinity: TextAffinity.upstream,
|
||||
);
|
||||
}
|
||||
// final TextRange word = _textPainter.getWordBoundary(position);
|
||||
// late TextSelection newSelection;
|
||||
// if (position.offset <= word.start) {
|
||||
// newSelection = TextSelection.collapsed(offset: word.start);
|
||||
// } else {
|
||||
// newSelection = TextSelection.collapsed(
|
||||
// offset: word.end,
|
||||
// affinity: TextAffinity.upstream,
|
||||
// );
|
||||
// }
|
||||
_setSelection(newSelection, cause);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user