feat: ai translate

Closes #1285

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-20 11:46:38 +08:00
parent 9b171e04be
commit 0745d83e4b
10 changed files with 155 additions and 20 deletions

View File

@@ -36,7 +36,7 @@ class AppBarAni extends StatelessWidget {
end: Alignment.topCenter,
colors: <Color>[
Colors.transparent,
Colors.black54,
Color(0xBF000000),
],
tileMode: TileMode.mirror,
)
@@ -45,7 +45,7 @@ class AppBarAni extends StatelessWidget {
end: Alignment.bottomCenter,
colors: <Color>[
Colors.transparent,
Colors.black54,
Color(0xBF000000),
],
tileMode: TileMode.mirror,
),

View File

@@ -6,6 +6,7 @@ class ComBtn extends StatelessWidget {
final VoidCallback? onLongPress;
final double width;
final double height;
final String? tooltip;
const ComBtn({
super.key,
@@ -14,11 +15,12 @@ class ComBtn extends StatelessWidget {
this.onLongPress,
this.width = 34,
this.height = 34,
this.tooltip,
});
@override
Widget build(BuildContext context) {
return SizedBox(
final child = SizedBox(
width: width,
height: height,
child: GestureDetector(
@@ -28,5 +30,9 @@ class ComBtn extends StatelessWidget {
child: icon,
),
);
if (tooltip != null) {
return Tooltip(message: tooltip, child: child);
}
return child;
}
}