diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index 4c14861..ca518a1 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -19,6 +19,9 @@ class _HomeScreenState extends State { @override Widget build(BuildContext context) { + // Calculate horizontal padding based on the screen width. + final double horizontalPadding = MediaQuery.of(context).size.width * 0.15; + return Scaffold( backgroundColor: _color, appBar: AppBar( @@ -26,7 +29,7 @@ class _HomeScreenState extends State { ), body: Center( child: Padding( - padding: const EdgeInsets.only(left: 32, right: 48), + padding: EdgeInsets.only(left: horizontalPadding - 16, right: horizontalPadding), child: RGBSliders( initialColor: _color, onColorChanged: (Color color) { diff --git a/lib/widgets/rgb_sliders_screen.dart b/lib/widgets/rgb_sliders_screen.dart index 90d4b3f..50d2633 100644 --- a/lib/widgets/rgb_sliders_screen.dart +++ b/lib/widgets/rgb_sliders_screen.dart @@ -156,6 +156,7 @@ class _RGBSlider extends StatelessWidget { value: value.toDouble(), min: 0, max: 255, + divisions: 255, activeColor: foregroundColor, inactiveColor: foregroundColor, thumbColor: rgbColor, @@ -209,7 +210,7 @@ class _RGBTextField extends StatelessWidget { ); return Padding( - padding: const EdgeInsets.symmetric(vertical: 16.0), + padding: const EdgeInsets.symmetric(vertical: 24.0), child: TextField( controller: controller, decoration: InputDecoration(