mod: 无障碍语义适配

This commit is contained in:
orz12
2024-02-29 21:00:53 +08:00
parent 19117a041a
commit f8e6ec00f9
65 changed files with 683 additions and 390 deletions

View File

@@ -136,6 +136,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
actions: [
const SizedBox(width: 4),
IconButton(
tooltip: '用内置浏览器打开',
onPressed: () {
Get.toNamed('/webview', parameters: {
'url': url.startsWith('http') ? url : 'https:$url',
@@ -148,6 +149,36 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
PopupMenuButton(
icon: const Icon(Icons.more_vert),
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
PopupMenuItem(
onTap: () => {
_htmlRenderCtr.reqHtml(id),
},
child: const Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.refresh, size: 19),
SizedBox(width: 10),
Text('刷新'),
],
),
),
PopupMenuItem(
onTap: () => {
Get.toNamed('/webview', parameters: {
'url': url.startsWith('http') ? url : 'https:$url',
'type': 'url',
'pageTitle': title,
}),
},
child: const Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.open_in_new, size: 19),
SizedBox(width: 10),
Text('内置浏览器打开'),
],
),
),
PopupMenuItem(
onTap: () => {
Clipboard.setData(ClipboardData(text: url)),