move favicon closer to url bar
This commit is contained in:
+3
@@ -611,6 +611,9 @@ class RailAppBarTitleView extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
ToolbarButton(
|
ToolbarButton(
|
||||||
onTap: onSiteSettingsTap,
|
onTap: onSiteSettingsTap,
|
||||||
|
// Match the pinned extension icons' vertical spacing so the favicon
|
||||||
|
// sits equally close to the address field on both sides.
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 8.0),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
+7
-1
@@ -25,12 +25,18 @@ class ToolbarButton extends StatelessWidget {
|
|||||||
final VoidCallback? onDoubleTap;
|
final VoidCallback? onDoubleTap;
|
||||||
final VoidCallback? onLongPress;
|
final VoidCallback? onLongPress;
|
||||||
|
|
||||||
|
/// Padding around the icon. Defaults to the horizontal-bar spacing; the
|
||||||
|
/// vertical rail passes a tighter value so the favicon sits as close to the
|
||||||
|
/// address field as the pinned extension icons do.
|
||||||
|
final EdgeInsetsGeometry padding;
|
||||||
|
|
||||||
const ToolbarButton({
|
const ToolbarButton({
|
||||||
super.key,
|
super.key,
|
||||||
required this.child,
|
required this.child,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
this.onDoubleTap,
|
this.onDoubleTap,
|
||||||
this.onLongPress,
|
this.onLongPress,
|
||||||
|
this.padding = const EdgeInsets.symmetric(horizontal: 8.0, vertical: 15.0),
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -43,7 +49,7 @@ class ToolbarButton extends StatelessWidget {
|
|||||||
onDoubleTap: onDoubleTap,
|
onDoubleTap: onDoubleTap,
|
||||||
onLongPress: onLongPress,
|
onLongPress: onLongPress,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 15.0),
|
padding: padding,
|
||||||
child: IconTheme(
|
child: IconTheme(
|
||||||
data: IconThemeData(color: iconColor),
|
data: IconThemeData(color: iconColor),
|
||||||
child: child,
|
child: child,
|
||||||
|
|||||||
Reference in New Issue
Block a user