diff --git a/lib/pages/main/view.dart b/lib/pages/main/view.dart index f03d45f1..f9730212 100644 --- a/lib/pages/main/view.dart +++ b/lib/pages/main/view.dart @@ -411,6 +411,7 @@ class _MainAppState extends State : const SizedBox.shrink(), ), IconButton( + tooltip: '搜索', icon: const Icon( Icons.search_outlined, semanticLabel: '搜索', diff --git a/lib/pages/search/view.dart b/lib/pages/search/view.dart index c74c6bff..6c0b238c 100644 --- a/lib/pages/search/view.dart +++ b/lib/pages/search/view.dart @@ -74,12 +74,22 @@ class _SearchPageState extends State with RouteAware { child: Column( children: [ // 搜索建议 - _searchSuggest(), - if (_searchController.enableHotKey) - // 热搜 - hotSearch(), - // 搜索历史 - _history() + if (_searchController.searchSuggestion) _searchSuggest(), + if (context.orientation == Orientation.portrait) ...[ + if (_searchController.enableHotKey) + // 热搜 + hotSearch(), + // 搜索历史 + _history() + ] else + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (_searchController.enableHotKey) + Expanded(child: hotSearch()), + Expanded(child: _history()), + ], + ), ], ), ), @@ -174,7 +184,11 @@ class _SearchPageState extends State with RouteAware { width: double.infinity, padding: EdgeInsets.fromLTRB( 10, - _searchController.enableHotKey ? 0 : 6, + context.orientation == Orientation.landscape + ? 25 + : _searchController.enableHotKey + ? 0 + : 6, 6, MediaQuery.of(context).padding.bottom + 50, ),