mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 16:00:41 +00:00
fixed ruler slider ticks color
This commit is contained in:
parent
a4d1aa987c
commit
9b119d9170
1 changed files with 4 additions and 3 deletions
|
@ -30,7 +30,7 @@ class RulerSlider extends StatelessWidget {
|
|||
children: [
|
||||
Text(
|
||||
valueAdapter(value),
|
||||
style: Theme.of(context).textTheme.labelLarge,
|
||||
style: Theme.of(context).textTheme.labelLarge!.copyWith(color: Theme.of(context).colorScheme.onBackground),
|
||||
),
|
||||
const SizedBox(height: Dimens.grid4),
|
||||
Expanded(
|
||||
|
@ -78,6 +78,7 @@ class _Ruler extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final mainTicksFontSize = Theme.of(context).textTheme.bodySmall!.fontSize!;
|
||||
final itemsColor = Theme.of(context).colorScheme.onBackground;
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final bool showAllMainTicks =
|
||||
|
@ -103,11 +104,11 @@ class _Ruler extends StatelessWidget {
|
|||
if (showValue)
|
||||
Text(
|
||||
rulerValueAdapter(index / 2 + min),
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(color: itemsColor),
|
||||
),
|
||||
const SizedBox(width: Dimens.grid4),
|
||||
ColoredBox(
|
||||
color: Theme.of(context).colorScheme.primaryContainer,
|
||||
color: itemsColor,
|
||||
child: SizedBox(
|
||||
height: 1,
|
||||
width: isMainTick ? Dimens.grid8 : Dimens.grid4,
|
||||
|
|
Loading…
Reference in a new issue