Reduced the title length to don't interfere with the picture

This commit is contained in:
Niklas 2024-11-29 20:49:01 +01:00
parent 79378be1f8
commit 731f786057
2 changed files with 4 additions and 6 deletions

View File

@ -275,7 +275,7 @@ class EventCard2Section extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
shortenText(title, 30),
shortenText(title, 24),
style: const TextStyle(
color: Color(0xFF0A0A0A),
fontSize: 18,

View File

@ -21,13 +21,11 @@ String shortenText(String text, int maxLength) {
return '$shortened ...';
}
class ScaleSize {
static double textScaleFactor(BuildContext context, {double maxTextScaleFactor = 2}) {
static double textScaleFactor(BuildContext context,
{double maxTextScaleFactor = 2}) {
final width = MediaQuery.of(context).size.width;
double val = (width / 1400) * maxTextScaleFactor;
return max(1, min(val, maxTextScaleFactor));
}
}
}