setting tab abr long press url copy

This commit is contained in:
Fabian Freund
2026-03-24 17:32:02 +01:00
parent 160a258fea
commit 87d6e81609
11 changed files with 91 additions and 5 deletions
@@ -37,6 +37,7 @@ class ToolbarLayoutContent extends StatelessWidget {
_TabBarPositionSection(),
_TabBarLayoutModeSection(),
_AutoHideTabBarTile(),
_TabBarLongPressUrlCopyTile(),
SettingSection(name: 'Contextual Toolbar'),
_ShowContextualTabBarTile(),
_CustomizeToolbarButtonsTile(),
@@ -423,6 +424,36 @@ class _BottomSheetTabViewTile extends HookConsumerWidget {
}
}
class _TabBarLongPressUrlCopyTile extends HookConsumerWidget {
const _TabBarLongPressUrlCopyTile();
@override
Widget build(BuildContext context, WidgetRef ref) {
final tabBarLongPressUrlCopy = ref.watch(
generalSettingsWithDefaultsProvider.select(
(s) => s.tabBarLongPressUrlCopy,
),
);
return SwitchListTile.adaptive(
title: const Text('Long Press URL to Copy'),
subtitle: const Text(
'Copy the page URL to clipboard when long pressing the address bar',
),
secondary: const Icon(MdiIcons.contentCopy),
value: tabBarLongPressUrlCopy,
onChanged: (value) async {
await ref
.read(saveGeneralSettingsControllerProvider.notifier)
.save(
(currentSettings) =>
currentSettings.copyWith.tabBarLongPressUrlCopy(value),
);
},
);
}
}
class _TabListShowFaviconsTile extends HookConsumerWidget {
const _TabListShowFaviconsTile();
@@ -355,6 +355,7 @@ class _RegularPreviewTitle extends StatelessWidget {
onSiteSettingsTap: _noop,
onTitleTap: _noop,
tabIcon: const Icon(MdiIcons.web, size: 24),
longPressUrlCopy: false,
);
}
}