diff --git a/lib/pages/article_info/article_info_page.dart b/lib/pages/article_info/article_info_page.dart index ed4ba4add..365884b24 100644 --- a/lib/pages/article_info/article_info_page.dart +++ b/lib/pages/article_info/article_info_page.dart @@ -510,8 +510,10 @@ class MultiChipWidget extends StatelessWidget { child: Wrap( spacing: 3.0, runSpacing: ((){ + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ) return 9.0; if(Platform.isAndroid || Platform.isIOS) return -9.0; - if(Platform.isLinux) return 9.0; return -9.0; })(), children: groupName @@ -551,7 +553,9 @@ class PreviewAreaWidget extends StatelessWidget { shrinkWrap: true, crossAxisCount: ((){ // @default return 3; - if(Settings.useTabletMode){ + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ){ return int.parse('${(int.parse(('${(MediaQuery.of(context).size.width)}'.split('.')[0])) / 200)}'.split('.')[0]); } else { return 3; @@ -1156,8 +1160,10 @@ class _Chip extends StatelessWidget { return SizedBox( height: ((){ + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ) return 44.0; if(Platform.isAndroid || Platform.isIOS) return 44.0; - if(Platform.isLinux) return 44.0; return 44.0; })(), child: FittedBox(child: fc), diff --git a/lib/pages/search/search_bar_page.dart b/lib/pages/search/search_bar_page.dart index 0af9b3adf..5fe46b6ad 100644 --- a/lib/pages/search/search_bar_page.dart +++ b/lib/pages/search/search_bar_page.dart @@ -300,8 +300,10 @@ class _SearchBarPageState extends State Wrap( spacing: 4.0, runSpacing: ((){ + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ) return 10.0; if(Platform.isAndroid || Platform.isIOS) return -10.0; - if(Platform.isLinux) return 10.0; return -10.0; })(), children: _searchLists.map((item) => chip(item)).toList(), diff --git a/lib/pages/settings/tag_selector.dart b/lib/pages/settings/tag_selector.dart index 59c7d6327..ae237ed2e 100644 --- a/lib/pages/settings/tag_selector.dart +++ b/lib/pages/settings/tag_selector.dart @@ -114,8 +114,10 @@ class _TagSelectorDialogState extends State { child: Wrap( spacing: 4.0, runSpacing: ((){ + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ) return 10.0; if(Platform.isAndroid || Platform.isIOS) return -10.0; - if(Platform.isLinux) return 10.0; return -10.0; })(), children: _searchLists diff --git a/lib/widgets/article_item/article_list_item_widget.dart b/lib/widgets/article_item/article_list_item_widget.dart index f681820a8..9dbefca4c 100644 --- a/lib/widgets/article_item/article_list_item_widget.dart +++ b/lib/widgets/article_item/article_list_item_widget.dart @@ -484,8 +484,10 @@ class BodyWidget extends StatelessWidget { ], ) ); + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ) return ClipRect(child: _body); if(Platform.isAndroid || Platform.isIOS) return _body; - if(Platform.isLinux) return ClipRect(child: _body); return _body; })() : ThumbnailWidget( @@ -528,7 +530,7 @@ class _DetailWidget extends StatelessWidget { maxLines: 2, overflow: TextOverflow.ellipsis, ), - if (c.articleListItem.showUltra) tagArea() else const Spacer(), + if (c.articleListItem.showUltra) tagArea(context) else const Spacer(), Row( children: [ const Icon(Icons.date_range, size: 18), @@ -575,7 +577,7 @@ class _DetailWidget extends StatelessWidget { ); } - Widget tagArea() { + Widget tagArea(context) { if (c.articleListItem.queryResult.tags() == null) { return Container(height: 30); } @@ -590,21 +592,24 @@ class _DetailWidget extends StatelessWidget { var _body = Wrap( spacing: 3.0, runSpacing: ((){ + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ) return 10.0; if(Platform.isAndroid || Platform.isIOS) return -10.0; - if(Platform.isLinux) return 10.0; return -10.0; })(), children: tags.map((x) => TagChip(group: x.item1, name: x.item2)).toList(), ); - if(Platform.isAndroid || Platform.isIOS){ - return _body; - } - if(Platform.isLinux){ + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ){ return Container( height: ((){ + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ) return 30.0; if(Platform.isAndroid || Platform.isIOS) return null; - if(Platform.isLinux) return 30.0; return null; })(), child: ClipRect( @@ -612,6 +617,9 @@ class _DetailWidget extends StatelessWidget { ) ); } + if(Platform.isAndroid || Platform.isIOS){ + return _body; + } return _body; } } @@ -733,8 +741,10 @@ class TagChip extends StatelessWidget { return SizedBox( height: ((){ + if(Platform.isLinux || Settings.useTabletMode || + MediaQuery.of(context).orientation == Orientation.landscape + ) return 25.0; if(Platform.isAndroid || Platform.isIOS) return 42.0; - if(Platform.isLinux) return 25.0; return 42.0; })(), child: FittedBox(child: fc),