mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-22 22:20:43 -04:00
wallpapers and ui cleanup
This commit is contained in:
parent
77c68aa45f
commit
6bd60207d8
32 changed files with 17947 additions and 150 deletions
|
@ -19,6 +19,40 @@ extension BorderExt on Widget {
|
|||
child: this);
|
||||
}
|
||||
|
||||
extension ShadowExt on Widget {
|
||||
Container withThemedShadow(ScaleConfig scaleConfig, ScaleColor scale) =>
|
||||
// ignore: use_decorated_box
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: themedShadow(scaleConfig, scale),
|
||||
),
|
||||
child: this,
|
||||
);
|
||||
}
|
||||
|
||||
List<BoxShadow> themedShadow(ScaleConfig scaleConfig, ScaleColor scale) => [
|
||||
if (scaleConfig.useVisualIndicators && !scaleConfig.preferBorders)
|
||||
BoxShadow(
|
||||
color: scale.primary.darken(60),
|
||||
spreadRadius: 2,
|
||||
)
|
||||
else if (scaleConfig.useVisualIndicators && scaleConfig.preferBorders)
|
||||
BoxShadow(
|
||||
color: scale.border,
|
||||
spreadRadius: 2,
|
||||
)
|
||||
else
|
||||
BoxShadow(
|
||||
color: scale.primary.darken(60).withAlpha(0x7F),
|
||||
blurRadius: 16,
|
||||
spreadRadius: 2,
|
||||
offset: const Offset(
|
||||
0,
|
||||
2,
|
||||
),
|
||||
),
|
||||
];
|
||||
|
||||
extension SizeToFixExt on Widget {
|
||||
FittedBox fit({BoxFit? fit, Key? key}) => FittedBox(
|
||||
key: key,
|
||||
|
@ -524,10 +558,10 @@ const grayColorFilter = ColorFilter.matrix(<double>[
|
|||
0,
|
||||
]);
|
||||
|
||||
const dodgeFilter =
|
||||
const src96StencilFilter =
|
||||
ColorFilter.mode(Color.fromARGB(96, 255, 255, 255), BlendMode.srcIn);
|
||||
|
||||
const overlayFilter =
|
||||
const dst127StencilFilter =
|
||||
ColorFilter.mode(Color.fromARGB(127, 255, 255, 255), BlendMode.dstIn);
|
||||
|
||||
Container clipBorder({
|
||||
|
@ -551,6 +585,6 @@ Container clipBorder({
|
|||
child: ClipRRect(
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
borderRadius: clipEnabled
|
||||
? BorderRadius.circular(borderRadius - 2)
|
||||
? BorderRadius.circular(borderRadius - 4)
|
||||
: BorderRadius.zero,
|
||||
child: child));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue