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: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
valueAdapter(value),
|
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),
|
const SizedBox(height: Dimens.grid4),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
@ -78,6 +78,7 @@ class _Ruler extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final mainTicksFontSize = Theme.of(context).textTheme.bodySmall!.fontSize!;
|
final mainTicksFontSize = Theme.of(context).textTheme.bodySmall!.fontSize!;
|
||||||
|
final itemsColor = Theme.of(context).colorScheme.onBackground;
|
||||||
return LayoutBuilder(
|
return LayoutBuilder(
|
||||||
builder: (context, constraints) {
|
builder: (context, constraints) {
|
||||||
final bool showAllMainTicks =
|
final bool showAllMainTicks =
|
||||||
|
@ -103,11 +104,11 @@ class _Ruler extends StatelessWidget {
|
||||||
if (showValue)
|
if (showValue)
|
||||||
Text(
|
Text(
|
||||||
rulerValueAdapter(index / 2 + min),
|
rulerValueAdapter(index / 2 + min),
|
||||||
style: Theme.of(context).textTheme.bodySmall,
|
style: Theme.of(context).textTheme.bodySmall!.copyWith(color: itemsColor),
|
||||||
),
|
),
|
||||||
const SizedBox(width: Dimens.grid4),
|
const SizedBox(width: Dimens.grid4),
|
||||||
ColoredBox(
|
ColoredBox(
|
||||||
color: Theme.of(context).colorScheme.primaryContainer,
|
color: itemsColor,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 1,
|
height: 1,
|
||||||
width: isMainTick ? Dimens.grid8 : Dimens.grid4,
|
width: isMainTick ? Dimens.grid8 : Dimens.grid4,
|
||||||
|
|
Loading…
Reference in a new issue