Skip to content

Commit

Permalink
Try to improve the UI layout
Browse files Browse the repository at this point in the history
  • Loading branch information
TechAurelian committed Oct 18, 2024
1 parent 315ca27 commit 8c620b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ class _HomeScreenState extends State<HomeScreen> {

@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(
backgroundColor: Colors.transparent,
),
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) {
Expand Down
3 changes: 2 additions & 1 deletion lib/widgets/rgb_sliders_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class _RGBSlider extends StatelessWidget {
value: value.toDouble(),
min: 0,
max: 255,
divisions: 255,
activeColor: foregroundColor,
inactiveColor: foregroundColor,
thumbColor: rgbColor,
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 8c620b0

Please sign in to comment.