generated from dellevin/template
优化windows笔记功能
This commit is contained in:
@@ -94,6 +94,17 @@ class AppTheme {
|
||||
minLeadingWidth: 0, dense: true,
|
||||
),
|
||||
dividerTheme: DividerThemeData(color: scheme.outlineVariant, thickness: 0.5, space: 0),
|
||||
scrollbarTheme: ScrollbarThemeData(
|
||||
thumbColor: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.hovered)) return scheme.onSurface.withValues(alpha: 0.3);
|
||||
return scheme.onSurface.withValues(alpha: 0.1);
|
||||
}),
|
||||
thickness: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.hovered)) return 6.0;
|
||||
return 4.0;
|
||||
}),
|
||||
radius: const Radius.circular(3),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: false,
|
||||
border: UnderlineInputBorder(borderSide: BorderSide(color: scheme.outlineVariant, width: 0.5)),
|
||||
@@ -231,6 +242,17 @@ class AppTheme {
|
||||
thickness: 0.5,
|
||||
space: 0,
|
||||
),
|
||||
scrollbarTheme: ScrollbarThemeData(
|
||||
thumbColor: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.hovered)) return _gray.withValues(alpha: 0.3);
|
||||
return _gray.withValues(alpha: 0.1);
|
||||
}),
|
||||
thickness: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.hovered)) return 6.0;
|
||||
return 4.0;
|
||||
}),
|
||||
radius: const Radius.circular(3),
|
||||
),
|
||||
|
||||
// 输入框 - 无边框,底部线
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
@@ -438,6 +460,17 @@ class AppTheme {
|
||||
thickness: 0.5,
|
||||
space: 0,
|
||||
),
|
||||
scrollbarTheme: ScrollbarThemeData(
|
||||
thumbColor: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.hovered)) return _lightGray.withValues(alpha: 0.4);
|
||||
return _lightGray.withValues(alpha: 0.15);
|
||||
}),
|
||||
thickness: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.hovered)) return 6.0;
|
||||
return 4.0;
|
||||
}),
|
||||
radius: const Radius.circular(3),
|
||||
),
|
||||
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: false,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../widgets/custom_title_bar.dart';
|
||||
|
||||
/// Toast 工具类
|
||||
class ToastUtil {
|
||||
@@ -13,7 +15,7 @@ class ToastUtil {
|
||||
final overlay = Overlay.of(context);
|
||||
_currentToast = OverlayEntry(
|
||||
builder: (context) => Positioned(
|
||||
top: MediaQuery.of(context).padding.top + 80,
|
||||
top: (Platform.isWindows ? CustomTitleBar.height : MediaQuery.of(context).padding.top) + 80,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Center(
|
||||
|
||||
Reference in New Issue
Block a user