mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 06:33:43 +08:00
merge: Deprecated
This commit is contained in:
parent
79239de308
commit
6ff0b7c902
@ -68,7 +68,7 @@ class App extends HookConsumerWidget {
|
|||||||
micaBackgroundColor: appState.themeConf.micaColor,
|
micaBackgroundColor: appState.themeConf.micaColor,
|
||||||
buttonTheme: ButtonThemeData(
|
buttonTheme: ButtonThemeData(
|
||||||
defaultButtonStyle: ButtonStyle(
|
defaultButtonStyle: ButtonStyle(
|
||||||
shape: ButtonState.all(RoundedRectangleBorder(
|
shape: WidgetStateProperty.all(RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
side: BorderSide(color: Colors.white.withOpacity(.01)))),
|
side: BorderSide(color: Colors.white.withOpacity(.01)))),
|
||||||
))),
|
))),
|
||||||
|
@ -153,7 +153,7 @@ class HomeUI extends HookConsumerWidget {
|
|||||||
? null
|
? null
|
||||||
: ButtonStyle(
|
: ButtonStyle(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
ButtonState.resolveWith(_getRunButtonColor),
|
WidgetStateProperty.resolveWith(_getRunButtonColor),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(6),
|
padding: const EdgeInsets.all(6),
|
||||||
@ -476,13 +476,13 @@ class HomeUI extends HookConsumerWidget {
|
|||||||
final item = items.elementAt(index);
|
final item = items.elementAt(index);
|
||||||
return HoverButton(
|
return HoverButton(
|
||||||
onPressed: () => _onMenuTap(context, item.key, homeState, ref),
|
onPressed: () => _onMenuTap(context, item.key, homeState, ref),
|
||||||
builder: (BuildContext context, Set<ButtonStates> states) {
|
builder: (BuildContext context, Set<WidgetState> states) {
|
||||||
return Container(
|
return Container(
|
||||||
width: 300,
|
width: 300,
|
||||||
height: 120,
|
height: 120,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
color: states.isHovering
|
color: states.isHovered
|
||||||
? FluentTheme.of(context).cardColor.withOpacity(.1)
|
? FluentTheme.of(context).cardColor.withOpacity(.1)
|
||||||
: FluentTheme.of(context).cardColor,
|
: FluentTheme.of(context).cardColor,
|
||||||
),
|
),
|
||||||
@ -818,11 +818,11 @@ class HomeUI extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Color? _getRunButtonColor(Set<ButtonStates> states) {
|
Color? _getRunButtonColor(Set<WidgetState> states) {
|
||||||
if (states.isPressing) {
|
if (states.isPressed) {
|
||||||
return const Color.fromRGBO(49, 227, 88, .5);
|
return const Color.fromRGBO(49, 227, 88, .5);
|
||||||
}
|
}
|
||||||
if (states.isHovering) {
|
if (states.isPressed) {
|
||||||
return const Color.fromRGBO(47, 213, 84, 1.0);
|
return const Color.fromRGBO(47, 213, 84, 1.0);
|
||||||
}
|
}
|
||||||
return const Color.fromRGBO(49, 227, 88, .8);
|
return const Color.fromRGBO(49, 227, 88, .8);
|
||||||
|
Loading…
Reference in New Issue
Block a user