From d826f93f2427fa24b76c1a9b8f7ed857f14d649b Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Wed, 29 Jun 2022 05:49:39 -0400 Subject: [PATCH] Change tooltips to sentence case (#90) --- .../channel/chat/details/chat_modes.dart | 16 +++++++------- .../channel/chat/details/chat_users_list.dart | 2 +- .../channel/chat/widgets/chat_bottom_bar.dart | 6 +++--- lib/screens/channel/video_chat.dart | 21 ++++++++----------- lib/screens/home/search/search.dart | 2 +- lib/screens/settings/settings.dart | 4 ++-- lib/widgets/scroll_to_top_button.dart | 2 +- 7 files changed, 25 insertions(+), 28 deletions(-) diff --git a/lib/screens/channel/chat/details/chat_modes.dart b/lib/screens/channel/chat/details/chat_modes.dart index d03686bd..9027a9c7 100644 --- a/lib/screens/channel/chat/details/chat_modes.dart +++ b/lib/screens/channel/chat/details/chat_modes.dart @@ -13,7 +13,7 @@ class ChatModes extends StatelessWidget { children: [ Tooltip( preferBelow: false, - message: 'Emote-Only Mode: ${roomState.emoteOnly != '0' ? 'On' : 'Off'}', + message: 'Emote-only mode ${roomState.emoteOnly != '0' ? 'on' : 'off'}', child: Icon( Icons.emoji_emotions_outlined, color: roomState.emoteOnly != '0' ? Colors.yellow : Colors.grey, @@ -22,12 +22,12 @@ class ChatModes extends StatelessWidget { Tooltip( preferBelow: false, message: roomState.followersOnly == '-1' - ? 'Followers-Only Mode: Off' + ? 'Followers-only mode off' : roomState.followersOnly == '0' - ? 'Followers-Only Mode: On' + ? 'Followers-only mode on' : roomState.followersOnly == '1' - ? 'Followers-Only Mode: On (${roomState.followersOnly} minute)' - : 'Followers-Only Mode: On (${roomState.followersOnly} minutes)', + ? 'Followers-only mode on (${roomState.followersOnly} minute)' + : 'Followers-only mode on (${roomState.followersOnly} minutes)', child: Icon( Icons.favorite, color: roomState.followersOnly != '-1' ? Colors.red : Colors.grey, @@ -35,7 +35,7 @@ class ChatModes extends StatelessWidget { ), Tooltip( preferBelow: false, - message: 'R9K Mode: ${roomState.r9k != '0' ? 'On' : 'Off'}', + message: 'R9K mode ${roomState.r9k != '0' ? 'on' : 'off'}', child: Text( 'R9K', style: TextStyle(color: roomState.r9k != '0' ? Colors.purple : Colors.grey), @@ -43,7 +43,7 @@ class ChatModes extends StatelessWidget { ), Tooltip( preferBelow: false, - message: 'Slow Mode: ${roomState.slowMode != '0' ? 'On (${roomState.slowMode} seconds)' : 'Off'}', + message: 'Slow mode ${roomState.slowMode != '0' ? 'on (${roomState.slowMode} seconds)' : 'off'}', child: Icon( Icons.history_toggle_off, color: roomState.slowMode != '0' ? Colors.blue : Colors.grey, @@ -51,7 +51,7 @@ class ChatModes extends StatelessWidget { ), Tooltip( preferBelow: false, - message: 'Subs-Only Mode: ${roomState.subMode != '0' ? 'On' : 'Off'}', + message: 'Subs-only mode ${roomState.subMode != '0' ? 'on' : 'off'}', child: Icon( Icons.attach_money, color: roomState.subMode != '0' ? Colors.green : Colors.grey, diff --git a/lib/screens/channel/chat/details/chat_users_list.dart b/lib/screens/channel/chat/details/chat_users_list.dart index 8ae6cf64..c46c410f 100644 --- a/lib/screens/channel/chat/details/chat_users_list.dart +++ b/lib/screens/channel/chat/details/chat_users_list.dart @@ -100,7 +100,7 @@ class _ChattersListState extends State { labelText: 'Filter chatters', contentPadding: const EdgeInsets.all(10.0), suffixIcon: IconButton( - tooltip: 'Clear Filter', + tooltip: 'Clear filter', onPressed: () { FocusScope.of(context).unfocus(); chatDetailsStore.filterText = ''; diff --git a/lib/screens/channel/chat/widgets/chat_bottom_bar.dart b/lib/screens/channel/chat/widgets/chat_bottom_bar.dart index 552edfdf..483bca41 100644 --- a/lib/screens/channel/chat/widgets/chat_bottom_bar.dart +++ b/lib/screens/channel/chat/widgets/chat_bottom_bar.dart @@ -90,7 +90,7 @@ class ChatBottomBar extends StatelessWidget { children: [ IconButton( icon: Icon(Icons.adaptive.more), - tooltip: 'Chat Details', + tooltip: 'Chat details', onPressed: () => showModalBottomSheet( backgroundColor: Colors.transparent, isScrollControlled: true, @@ -104,7 +104,7 @@ class ChatBottomBar extends StatelessWidget { ), if (!chatStore.expandChat && chatStore.settings.chatWidth < 0.3 && MediaQuery.of(context).orientation == Orientation.landscape) IconButton( - tooltip: 'Send a Message', + tooltip: 'Send a message', onPressed: () { chatStore.expandChat = true; chatStore.textFieldFocusNode.requestFocus(); @@ -124,7 +124,7 @@ class ChatBottomBar extends StatelessWidget { decoration: InputDecoration( suffixIcon: IconButton( color: chatStore.assetsStore.showEmoteMenu ? Theme.of(context).colorScheme.secondary : null, - tooltip: 'Emote Menu', + tooltip: 'Emote menu', icon: const Icon(Icons.emoji_emotions_outlined), onPressed: () { FocusScope.of(context).unfocus(); diff --git a/lib/screens/channel/video_chat.dart b/lib/screens/channel/video_chat.dart index 53fd79a0..8c6d5788 100644 --- a/lib/screens/channel/video_chat.dart +++ b/lib/screens/channel/video_chat.dart @@ -174,9 +174,7 @@ class _VideoChatState extends State { builder: (context) { final landscapeChat = AnimatedContainer( duration: const Duration(milliseconds: 200), - width: _chatStore.expandChat - ? MediaQuery.of(context).size.width / 2 - : MediaQuery.of(context).size.width * _chatStore.settings.chatWidth, + width: _chatStore.expandChat ? MediaQuery.of(context).size.width / 2 : MediaQuery.of(context).size.width * _chatStore.settings.chatWidth, curve: Curves.ease, color: _chatStore.settings.fullScreen ? Colors.black.withOpacity(_chatStore.settings.fullScreenChatOverlayOpacity) @@ -214,9 +212,8 @@ class _VideoChatState extends State { ], ) : Row( - children: settingsStore.landscapeChatLeftSide - ? [landscapeChat, Expanded(child: video)] - : [Expanded(child: video), landscapeChat], + children: + settingsStore.landscapeChatLeftSide ? [landscapeChat, Expanded(child: video)] : [Expanded(child: video), landscapeChat], ) : Column( children: [appBar, Expanded(child: chat)], @@ -313,7 +310,7 @@ class _VideoOverlay extends StatelessWidget { Text(' ${videoStore.timeRemaining.toString().split('.')[0]}'), const Spacer(), IconButton( - tooltip: 'Cancel Timer', + tooltip: 'Cancel sleep timer', onPressed: videoStore.sleepTimer != null && videoStore.sleepTimer!.isActive ? videoStore.cancelSleepTimer : null, icon: const Icon(Icons.cancel), ), @@ -405,7 +402,7 @@ class _VideoOverlay extends StatelessWidget { final chatOverlayButton = Observer( builder: (_) => IconButton( - tooltip: videoStore.settingsStore.fullScreenChatOverlay ? 'Hide Chat Overlay' : 'Show Chat Overlay', + tooltip: videoStore.settingsStore.fullScreenChatOverlay ? 'Hide chat overlay' : 'Show chat overlay', onPressed: () => videoStore.settingsStore.fullScreenChatOverlay = !videoStore.settingsStore.fullScreenChatOverlay, icon: videoStore.settingsStore.fullScreenChatOverlay ? const Icon(Icons.chat_bubble_outline) : const Icon(Icons.chat_bubble), color: Colors.white, @@ -422,7 +419,7 @@ class _VideoOverlay extends StatelessWidget { ); final fullScreenButton = IconButton( - tooltip: videoStore.settingsStore.fullScreen ? 'Exit Fullscreen' : 'Enter Fullscreen', + tooltip: videoStore.settingsStore.fullScreen ? 'Exit fullscreen mode' : 'Enter fullscreen mode', icon: videoStore.settingsStore.fullScreen ? const Icon( Icons.fullscreen_exit, @@ -436,7 +433,7 @@ class _VideoOverlay extends StatelessWidget { ); final sleepTimerButton = IconButton( - tooltip: 'Sleep Timer', + tooltip: 'Sleep timer', icon: const Icon( Icons.timer, color: Colors.white, @@ -445,7 +442,7 @@ class _VideoOverlay extends StatelessWidget { ); final rotateButton = IconButton( - tooltip: orientation == Orientation.portrait ? 'Enter Landscape Mode' : 'Exit Landscape Mode', + tooltip: orientation == Orientation.portrait ? 'Enter landscape mode' : 'Exit landscape mode', icon: const Icon( Icons.screen_rotation, color: Colors.white, @@ -618,7 +615,7 @@ class _VideoOverlay extends StatelessWidget { ), if (Platform.isIOS && videoStore.settingsStore.pictureInPicture) IconButton( - tooltip: 'Picture-in-Picture', + tooltip: 'Picture-in-picture', icon: const Icon( Icons.picture_in_picture_alt_rounded, color: Colors.white, diff --git a/lib/screens/home/search/search.dart b/lib/screens/home/search/search.dart index 3bea490d..7fa4c60c 100644 --- a/lib/screens/home/search/search.dart +++ b/lib/screens/home/search/search.dart @@ -44,7 +44,7 @@ class _SearchState extends State { borderRadius: BorderRadius.all(Radius.circular(15.0)), ), suffixIcon: IconButton( - tooltip: 'Clear Search', + tooltip: 'Clear search', onPressed: () { FocusScope.of(context).unfocus(); setState(() { diff --git a/lib/screens/settings/settings.dart b/lib/screens/settings/settings.dart index 936fd6f0..7b0675a2 100644 --- a/lib/screens/settings/settings.dart +++ b/lib/screens/settings/settings.dart @@ -25,13 +25,13 @@ class Settings extends StatelessWidget { actions: [ if (Platform.isAndroid) IconButton( - tooltip: 'Support the App', + tooltip: 'Support the app', onPressed: () => launchUrl(Uri.parse('https://www.buymeacoffee.com/tommychow'), mode: settingsStore.launchUrlExternal ? LaunchMode.externalApplication : LaunchMode.inAppWebView), icon: const FaIcon(FontAwesomeIcons.circleDollarToSlot), ), IconButton( - tooltip: 'View Source on GitHub', + tooltip: 'View source on GitHub', onPressed: () => launchUrl(Uri.parse('https://github.com/tommyxchow/frosty'), mode: settingsStore.launchUrlExternal ? LaunchMode.externalApplication : LaunchMode.inAppWebView), icon: const FaIcon(FontAwesomeIcons.github), diff --git a/lib/widgets/scroll_to_top_button.dart b/lib/widgets/scroll_to_top_button.dart index ef057f05..1f58d2b7 100644 --- a/lib/widgets/scroll_to_top_button.dart +++ b/lib/widgets/scroll_to_top_button.dart @@ -9,7 +9,7 @@ class ScrollToTopButton extends StatelessWidget { @override Widget build(BuildContext context) { return Tooltip( - message: 'Scroll to Top', + message: 'Scroll to top', preferBelow: false, child: FloatingActionButton( onPressed: () {