improved tooltip positions
This commit is contained in:
parent
e7086481a4
commit
c131e179ee
5 changed files with 80 additions and 61 deletions
|
@ -29,6 +29,9 @@ class AvesApp extends StatelessWidget {
|
|||
brightness: Brightness.dark,
|
||||
accentColor: Colors.indigoAccent,
|
||||
scaffoldBackgroundColor: Colors.grey[900],
|
||||
tooltipTheme: const TooltipThemeData(
|
||||
verticalOffset: 32,
|
||||
),
|
||||
appBarTheme: const AppBarTheme(
|
||||
textTheme: TextTheme(
|
||||
headline6: TextStyle(
|
||||
|
|
|
@ -187,7 +187,11 @@ class SectionSelectableLeading extends StatelessWidget {
|
|||
builder: (context, child) {
|
||||
final sectionEntries = collection.sections[sectionKey];
|
||||
final selected = collection.isSelected(sectionEntries);
|
||||
final child = IconButton(
|
||||
final child = TooltipTheme(
|
||||
data: TooltipTheme.of(context).copyWith(
|
||||
preferBelow: false,
|
||||
),
|
||||
child: IconButton(
|
||||
key: ValueKey(selected),
|
||||
iconSize: 26,
|
||||
padding: const EdgeInsets.only(top: 1),
|
||||
|
@ -205,6 +209,7 @@ class SectionSelectableLeading extends StatelessWidget {
|
|||
minHeight: leadingDimension,
|
||||
minWidth: leadingDimension,
|
||||
),
|
||||
),
|
||||
);
|
||||
return AnimatedSwitcher(
|
||||
duration: Duration(milliseconds: (200 * timeDilation).toInt()),
|
||||
|
|
|
@ -105,6 +105,7 @@ class _AvesFilterChipState extends State<AvesFilterChip> {
|
|||
decoration: widget.decoration,
|
||||
child: Tooltip(
|
||||
message: filter.tooltip,
|
||||
preferBelow: false,
|
||||
child: FutureBuilder(
|
||||
future: _colorFuture,
|
||||
builder: (context, AsyncSnapshot<Color> snapshot) {
|
||||
|
|
|
@ -207,7 +207,11 @@ class ImageMapState extends State<ImageMap> with AutomaticKeepAliveClientMixin {
|
|||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Column(children: [
|
||||
TooltipTheme(
|
||||
data: TooltipTheme.of(context).copyWith(
|
||||
preferBelow: false,
|
||||
),
|
||||
child: Column(children: [
|
||||
IconButton(
|
||||
icon: const Icon(AIcons.zoomIn),
|
||||
onPressed: _controller == null ? null : () => _zoomBy(1),
|
||||
|
@ -223,7 +227,8 @@ class ImageMapState extends State<ImageMap> with AutomaticKeepAliveClientMixin {
|
|||
onPressed: () => AndroidAppService.openMap(widget.geoUri),
|
||||
tooltip: 'Show on map...',
|
||||
),
|
||||
])
|
||||
]),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,11 @@ class VideoControlOverlayState extends State<VideoControlOverlay> with SingleTic
|
|||
builder: (context, snapshot) {
|
||||
// do not use stream snapshot because it is obsolete when switching between videos
|
||||
final status = controller.ijkStatus;
|
||||
return Row(
|
||||
return TooltipTheme(
|
||||
data: TooltipTheme.of(context).copyWith(
|
||||
preferBelow: false,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: status == IjkStatus.error
|
||||
? [
|
||||
|
@ -145,6 +149,7 @@ class VideoControlOverlayState extends State<VideoControlOverlay> with SingleTic
|
|||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue