fix: Missing tooltips in IconButtons

This commit is contained in:
Christian Pauly 2021-02-20 07:40:42 +01:00
parent b1f6209c3c
commit 57a021f03c
12 changed files with 43 additions and 1 deletions

View File

@ -180,6 +180,7 @@ class UserBottomSheet extends StatelessWidget {
leading: IconButton( leading: IconButton(
icon: Icon(Icons.arrow_downward_outlined), icon: Icon(Icons.arrow_downward_outlined),
onPressed: Navigator.of(context).pop, onPressed: Navigator.of(context).pop,
tooltip: L10n.of(context).close,
), ),
title: Text(user.calcDisplayname()), title: Text(user.calcDisplayname()),
actions: [ actions: [

View File

@ -448,6 +448,26 @@
"type": "text", "type": "text",
"placeholders": {} "placeholders": {}
}, },
"zoomIn": "Zoom in",
"@zoomIn": {
"type": "text",
"placeholders": {}
},
"zoomOut": "Zoom out",
"@zoomOut": {
"type": "text",
"placeholders": {}
},
"addEmail": "Add email",
"@addEmail": {
"type": "text",
"placeholders": {}
},
"showPassword": "Show password",
"@showPassword": {
"type": "text",
"placeholders": {}
},
"chatBackup": "Chat backup", "chatBackup": "Chat backup",
"@chatBackup": { "@chatBackup": {
"type": "text", "type": "text",

View File

@ -521,6 +521,7 @@ class _ChatState extends State<Chat> {
? IconButton( ? IconButton(
icon: Icon(Icons.close), icon: Icon(Icons.close),
onPressed: () => setState(() => selectedEvents.clear()), onPressed: () => setState(() => selectedEvents.clear()),
tooltip: L10n.of(context).close,
) )
: null, : null,
titleSpacing: titleSpacing:
@ -592,6 +593,7 @@ class _ChatState extends State<Chat> {
selectedEvents.first.senderId == client.userID) selectedEvents.first.senderId == client.userID)
IconButton( IconButton(
icon: Icon(Icons.edit_outlined), icon: Icon(Icons.edit_outlined),
tooltip: L10n.of(context).edit,
onPressed: () { onPressed: () {
setState(() { setState(() {
pendingText = sendController.text; pendingText = sendController.text;
@ -645,6 +647,7 @@ class _ChatState extends State<Chat> {
] ]
: <Widget>[ : <Widget>[
IconButton( IconButton(
tooltip: L10n.of(context).videoCall,
icon: Icon(Icons.call_outlined), icon: Icon(Icons.call_outlined),
onPressed: () => startCallAction(context), onPressed: () => startCallAction(context),
), ),
@ -959,6 +962,7 @@ class _ChatState extends State<Chat> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
IconButton( IconButton(
tooltip: L10n.of(context).close,
icon: Icon(Icons.close), icon: Icon(Icons.close),
onPressed: () => setState(() { onPressed: () => setState(() {
if (editEvent != null) { if (editEvent != null) {
@ -1196,6 +1200,7 @@ class _ChatState extends State<Chat> {
height: 56, height: 56,
alignment: Alignment.center, alignment: Alignment.center,
child: IconButton( child: IconButton(
tooltip: L10n.of(context).voiceMessage,
icon: Icon(Icons.mic_none_outlined), icon: Icon(Icons.mic_none_outlined),
onPressed: () => onPressed: () =>
voiceMessageAction(context), voiceMessageAction(context),
@ -1209,6 +1214,7 @@ class _ChatState extends State<Chat> {
child: IconButton( child: IconButton(
icon: Icon(Icons.send_outlined), icon: Icon(Icons.send_outlined),
onPressed: () => send(), onPressed: () => send(),
tooltip: L10n.of(context).send,
), ),
), ),
], ],

View File

@ -202,6 +202,7 @@ class _ChatDetailsState extends State<ChatDetails> {
actions: <Widget>[ actions: <Widget>[
if (room.canonicalAlias?.isNotEmpty ?? false) if (room.canonicalAlias?.isNotEmpty ?? false)
IconButton( IconButton(
tooltip: L10n.of(context).share,
icon: Icon(Icons.share_outlined), icon: Icon(Icons.share_outlined),
onPressed: () => FluffyShare.share( onPressed: () => FluffyShare.share(
AppConfig.inviteLinkPrefix + room.canonicalAlias, AppConfig.inviteLinkPrefix + room.canonicalAlias,

View File

@ -284,6 +284,7 @@ class _ChatListState extends State<ChatList> {
: [ : [
IconButton( IconButton(
icon: Icon(Icons.search_outlined), icon: Icon(Icons.search_outlined),
tooltip: L10n.of(context).search,
onPressed: () async { onPressed: () async {
await _scrollController.animateTo( await _scrollController.animateTo(
_scrollController.position.minScrollExtent, _scrollController.position.minScrollExtent,

View File

@ -4,6 +4,7 @@ import 'package:fluffychat/components/image_bubble.dart';
import 'package:fluffychat/components/matrix.dart'; import 'package:fluffychat/components/matrix.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../utils/event_extension.dart'; import '../utils/event_extension.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import '../utils/platform_infos.dart'; import '../utils/platform_infos.dart';
class ImageView extends StatelessWidget { class ImageView extends StatelessWidget {
@ -30,6 +31,7 @@ class ImageView extends StatelessWidget {
icon: Icon(Icons.close), icon: Icon(Icons.close),
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
color: Colors.white, color: Colors.white,
tooltip: L10n.of(context).close,
), ),
backgroundColor: Color(0x44000000), backgroundColor: Color(0x44000000),
actions: [ actions: [
@ -37,11 +39,13 @@ class ImageView extends StatelessWidget {
icon: Icon(Icons.reply_outlined), icon: Icon(Icons.reply_outlined),
onPressed: () => _forwardAction(context), onPressed: () => _forwardAction(context),
color: Colors.white, color: Colors.white,
tooltip: L10n.of(context).share,
), ),
IconButton( IconButton(
icon: Icon(Icons.download_outlined), icon: Icon(Icons.download_outlined),
onPressed: () => event.openFile(context, downloadOnly: true), onPressed: () => event.openFile(context, downloadOnly: true),
color: Colors.white, color: Colors.white,
tooltip: L10n.of(context).downloadFile,
), ),
], ],
), ),

View File

@ -1,6 +1,7 @@
import 'package:famedlysdk/famedlysdk.dart'; import 'package:famedlysdk/famedlysdk.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:logger/logger.dart'; import 'package:logger/logger.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
class LogViewer extends StatefulWidget { class LogViewer extends StatefulWidget {
@override @override
@ -25,10 +26,12 @@ class _LogViewerState extends State<LogViewer> {
IconButton( IconButton(
icon: Icon(Icons.zoom_in_outlined), icon: Icon(Icons.zoom_in_outlined),
onPressed: () => setState(() => fontSize++), onPressed: () => setState(() => fontSize++),
tooltip: L10n.of(context).zoomIn,
), ),
IconButton( IconButton(
icon: Icon(Icons.zoom_out_outlined), icon: Icon(Icons.zoom_out_outlined),
onPressed: () => setState(() => fontSize--), onPressed: () => setState(() => fontSize--),
tooltip: L10n.of(context).zoomOut,
), ),
PopupMenuButton<Level>( PopupMenuButton<Level>(
itemBuilder: (context) => Level.values itemBuilder: (context) => Level.values

View File

@ -205,6 +205,7 @@ class _LoginState extends State<Login> {
hintText: '****', hintText: '****',
errorText: passwordError, errorText: passwordError,
suffixIcon: IconButton( suffixIcon: IconButton(
tooltip: L10n.of(context).showPassword,
icon: Icon(showPassword icon: Icon(showPassword
? Icons.visibility_off_outlined ? Icons.visibility_off_outlined
: Icons.visibility_outlined), : Icons.visibility_outlined),

View File

@ -103,6 +103,7 @@ class _Settings3PidState extends State<Settings3Pid> {
IconButton( IconButton(
icon: Icon(Icons.add_outlined), icon: Icon(Icons.add_outlined),
onPressed: () => _add3PidAction(context), onPressed: () => _add3PidAction(context),
tooltip: L10n.of(context).addEmail,
) )
], ],
), ),
@ -153,6 +154,7 @@ class _Settings3PidState extends State<Settings3Pid> {
child: Icon(identifier[i].iconData)), child: Icon(identifier[i].iconData)),
title: Text(identifier[i].address), title: Text(identifier[i].address),
trailing: IconButton( trailing: IconButton(
tooltip: L10n.of(context).delete,
icon: Icon(Icons.delete_forever_outlined), icon: Icon(Icons.delete_forever_outlined),
color: Colors.red, color: Colors.red,
onPressed: () => _delete3Pid(context, identifier[i]), onPressed: () => _delete3Pid(context, identifier[i]),

View File

@ -63,6 +63,7 @@ class _SettingsIgnoreListState extends State<SettingsIgnoreList> {
prefixText: '@', prefixText: '@',
labelText: L10n.of(context).ignoreUsername, labelText: L10n.of(context).ignoreUsername,
suffixIcon: IconButton( suffixIcon: IconButton(
tooltip: L10n.of(context).ignore,
icon: Icon(Icons.done_outlined), icon: Icon(Icons.done_outlined),
onPressed: () => _ignoreUser(context), onPressed: () => _ignoreUser(context),
), ),
@ -95,6 +96,7 @@ class _SettingsIgnoreListState extends State<SettingsIgnoreList> {
title: title:
Text(s.data?.displayname ?? client.ignoredUsers[i]), Text(s.data?.displayname ?? client.ignoredUsers[i]),
trailing: IconButton( trailing: IconButton(
tooltip: L10n.of(context).delete,
icon: Icon(Icons.delete_forever_outlined), icon: Icon(Icons.delete_forever_outlined),
onPressed: () => showFutureLoadingDialog( onPressed: () => showFutureLoadingDialog(
context: context, context: context,

View File

@ -159,6 +159,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
hintText: '****', hintText: '****',
errorText: passwordError, errorText: passwordError,
suffixIcon: IconButton( suffixIcon: IconButton(
tooltip: L10n.of(context).showPassword,
icon: Icon(showPassword icon: Icon(showPassword
? Icons.visibility_off_outlined ? Icons.visibility_off_outlined
: Icons.visibility_outlined), : Icons.visibility_outlined),

View File

@ -631,7 +631,7 @@ packages:
name: matrix_api_lite name: matrix_api_lite
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.7" version: "0.1.9"
matrix_file_e2ee: matrix_file_e2ee:
dependency: transitive dependency: transitive
description: description: