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