mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 19:16:44 +08:00
@@ -75,9 +75,7 @@ class PBadge extends StatelessWidget {
|
||||
bgColor = Colors.transparent;
|
||||
borderColor = theme.secondary;
|
||||
case PBadgeType.free:
|
||||
bgColor = Get.isDarkMode
|
||||
? const Color(0xFFD66011)
|
||||
: const Color(0xFFFF7F24);
|
||||
bgColor = theme.freeColor;
|
||||
color = Colors.white;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,11 +45,11 @@ Widget imageView(
|
||||
ValueChanged<int>? onDismissed,
|
||||
Function(List<String>, int)? callback,
|
||||
}) {
|
||||
double imageWidth = (maxWidth - 2 * 5) / 3;
|
||||
double imageWidth = (maxWidth - 10) / 3;
|
||||
double imageHeight = imageWidth;
|
||||
if (picArr.length == 1) {
|
||||
dynamic width = picArr[0].width;
|
||||
dynamic height = picArr[0].height;
|
||||
num width = picArr[0].width;
|
||||
num height = picArr[0].height;
|
||||
double ratioWH = width / height;
|
||||
double ratioHW = height / width;
|
||||
imageWidth = ratioWH > 1.5
|
||||
@@ -57,6 +57,9 @@ Widget imageView(
|
||||
: (ratioWH >= 1 || (height > width && ratioHW < 1.5))
|
||||
? 2 * imageWidth
|
||||
: 1.5 * imageWidth;
|
||||
if (width != 1) {
|
||||
imageWidth = min(imageWidth, width.toDouble());
|
||||
}
|
||||
imageHeight = imageWidth * min(ratioHW, _maxRatio);
|
||||
} else if (picArr.length == 2) {
|
||||
imageWidth = imageHeight = 2 * imageWidth;
|
||||
|
||||
Reference in New Issue
Block a user