Skip to content

Commit dc28f08

Browse files
committed
fix: ui improvements
1 parent 3fb1743 commit dc28f08

File tree

7 files changed

+52
-7
lines changed

7 files changed

+52
-7
lines changed

lib/screens/m3u/m3u_home_screen.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ class _M3UHomeScreenState extends State<M3UHomeScreen> {
168168

169169
SliverAppBar _buildDesktopSliverAppBar(BuildContext context) {
170170
return SliverAppBar(
171-
title: const SizedBox.shrink(),
171+
title: SelectableText(
172+
context.loc.live_streams,
173+
style: const TextStyle(fontWeight: FontWeight.bold),
174+
),
172175
floating: true,
173176
snap: true,
174177
elevation: 0,

lib/screens/m3u/m3u_items_screen.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ class _M3uItemsScreenState extends State<M3uItemsScreen> {
8686
),
8787
onChanged: _filterItems,
8888
)
89-
: Text(context.loc.iptv_channels_count(filteredItems.length)),
89+
: SelectableText(
90+
context.loc.iptv_channels_count(filteredItems.length),
91+
style: const TextStyle(fontWeight: FontWeight.bold),
92+
),
9093
actions: [
9194
IconButton(
9295
icon: Icon(isSearching ? Icons.close : Icons.search),

lib/screens/search_screen.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ class SearchScreenState extends State<SearchScreen> {
175175
autofocus: true,
176176
onChanged: _performSearch,
177177
)
178-
: Text(_getScreenTitle(context)),
178+
: SelectableText(
179+
_getScreenTitle(context),
180+
style: const TextStyle(fontWeight: FontWeight.bold),
181+
),
179182
actions: [
180183
if (isSearching)
181184
IconButton(icon: Icon(Icons.clear), onPressed: stopSearch)

lib/screens/xtream-codes/xtream_code_home_screen.dart

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ class _XtreamCodeHomeScreenState extends State<XtreamCodeHomeScreen> {
199199
ContentType contentType,
200200
) {
201201
return SliverAppBar(
202-
title: const SizedBox.shrink(),
202+
title: SelectableText(
203+
_getDesktopTitle(context, contentType),
204+
style: const TextStyle(fontWeight: FontWeight.bold),
205+
),
203206
floating: true,
204207
snap: true,
205208
elevation: 0,
@@ -212,6 +215,17 @@ class _XtreamCodeHomeScreenState extends State<XtreamCodeHomeScreen> {
212215
);
213216
}
214217

218+
String _getDesktopTitle(BuildContext context, ContentType contentType) {
219+
switch (contentType) {
220+
case ContentType.liveStream:
221+
return context.loc.live_streams;
222+
case ContentType.vod:
223+
return context.loc.movies;
224+
case ContentType.series:
225+
return context.loc.series_plural;
226+
}
227+
}
228+
215229
SliverAppBar _buildMobileSliverAppBar(
216230
BuildContext context,
217231
XtreamCodeHomeController controller,

lib/widgets/category_detail/category_app_bar.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ class CategoryAppBar extends StatelessWidget {
2424
return SliverAppBar(
2525
floating: true,
2626
snap: true,
27-
title: isSearching ? _buildSearchField(context) : Text(title),
27+
title: isSearching ? _buildSearchField(context) : SelectableText(
28+
title,
29+
style: const TextStyle(fontWeight: FontWeight.bold),
30+
),
2831
actions: [
2932
IconButton(
3033
icon: Icon(isSearching ? Icons.clear : Icons.search),

lib/widgets/content_card.dart

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:cached_network_image/cached_network_image.dart';
22
import 'package:flutter/material.dart';
33
import 'package:another_iptv_player/models/playlist_content_model.dart';
4+
import 'package:another_iptv_player/models/content_type.dart';
45

56

67
class ContentCard extends StatelessWidget {
@@ -35,7 +36,7 @@ class ContentCard extends StatelessWidget {
3536
child: content.imagePath.isNotEmpty
3637
? CachedNetworkImage(
3738
imageUrl: content.imagePath,
38-
fit: BoxFit.contain,
39+
fit: _getFitForContentType(),
3940
placeholder: (context, url) => Container(
4041
color: Theme.of(context).colorScheme.surfaceContainerHighest,
4142
child: Center(
@@ -59,6 +60,15 @@ class ContentCard extends StatelessWidget {
5960
return cardWidget;
6061
}
6162

63+
BoxFit _getFitForContentType() {
64+
// Canlı yayınlar için contain kullan (logolar için)
65+
if (content.contentType == ContentType.liveStream) {
66+
return BoxFit.contain;
67+
}
68+
// Film ve diziler için cover kullan (posterler için)
69+
return BoxFit.cover;
70+
}
71+
6272
Widget _buildTitleCard(BuildContext context) {
6373
return Container(
6474
color: isSelected

lib/widgets/watch_history/watch_history_card.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class WatchHistoryCard extends StatelessWidget {
111111
imageUrl: history.imagePath!,
112112
width: double.infinity,
113113
height: double.infinity,
114-
fit: BoxFit.contain,
114+
fit: _getFitForContentType(),
115115
placeholder: (context, url) => Container(
116116
color: Colors.grey[300],
117117
child: Center(child: CircularProgressIndicator(strokeWidth: 2)),
@@ -123,6 +123,15 @@ class WatchHistoryCard extends StatelessWidget {
123123
}
124124
}
125125

126+
BoxFit _getFitForContentType() {
127+
// Canlı yayınlar için contain kullan (logolar için)
128+
if (history.contentType == ContentType.liveStream) {
129+
return BoxFit.contain;
130+
}
131+
// Film ve diziler için cover kullan (posterler için)
132+
return BoxFit.cover;
133+
}
134+
126135
Widget _buildDefaultThumbnail() {
127136
return Container(
128137
width: double.infinity,

0 commit comments

Comments
 (0)