Increase Scribe mobile inline button size
This commit is contained in:
@@ -155,7 +155,7 @@ class HtmlUtils {
|
|||||||
|
|
||||||
// Avoid native selection marks in mobile
|
// Avoid native selection marks in mobile
|
||||||
// Offset has been arbitrary determined to avoid selection marks on Android and iOS
|
// Offset has been arbitrary determined to avoid selection marks on Android and iOS
|
||||||
const buttonOffset = isWebPlatform ? { x: 0, y: 0 } : { x: 22, y: -20 };
|
const buttonOffset = isWebPlatform ? { x: 0, y: 0 } : { x: 24, y: -24 };
|
||||||
|
|
||||||
let x = lastRect.right - editableRect.left + buttonOffset.x;
|
let x = lastRect.right - editableRect.left + buttonOffset.x;
|
||||||
let y = lastRect.bottom - editableRect.top + buttonOffset.y;
|
let y = lastRect.bottom - editableRect.top + buttonOffset.y;
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ abstract final class AIScribeSizes {
|
|||||||
static const double icon = 18;
|
static const double icon = 18;
|
||||||
static const double sendIcon = 16;
|
static const double sendIcon = 16;
|
||||||
static const double scribeIcon = 12;
|
static const double scribeIcon = 12;
|
||||||
|
static const double scribeMobileIcon = 16;
|
||||||
static const double aiAssistantIcon = 24;
|
static const double aiAssistantIcon = 24;
|
||||||
static const double bottomsheetIcon = 20;
|
static const double bottomsheetIcon = 20;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:core/presentation/resources/image_paths.dart';
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||||
|
import 'package:core/utils/platform_info.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:scribe/scribe.dart';
|
import 'package:scribe/scribe.dart';
|
||||||
@@ -20,11 +21,13 @@ class InlineAiAssistButton extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final iconSize = PlatformInfo.isWeb ? AIScribeSizes.scribeIcon : AIScribeSizes.scribeMobileIcon;
|
||||||
|
|
||||||
return TMailButtonWidget.fromIcon(
|
return TMailButtonWidget.fromIcon(
|
||||||
icon: imagePaths.icSparkle,
|
icon: imagePaths.icSparkle,
|
||||||
padding: AIScribeSizes.scribeButtonPadding,
|
padding: AIScribeSizes.scribeButtonPadding,
|
||||||
backgroundColor: AIScribeColors.background,
|
backgroundColor: AIScribeColors.background,
|
||||||
iconSize: AIScribeSizes.scribeIcon,
|
iconSize: iconSize,
|
||||||
iconColor: AIScribeColors.scribeIcon,
|
iconColor: AIScribeColors.scribeIcon,
|
||||||
borderRadius: AIScribeSizes.scribeButtonRadius,
|
borderRadius: AIScribeSizes.scribeButtonRadius,
|
||||||
boxShadow: AIScribeShadows.sparkleIcon,
|
boxShadow: AIScribeShadows.sparkleIcon,
|
||||||
|
|||||||
Reference in New Issue
Block a user