You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
│ └── severance_home.dart # Main home screen containing MDR interface
56
+
│ └── severance_home.dart # Main home screen containing MDR interface
57
57
└── widgets/
58
-
├── bin_target.dart # Widget for displaying and interacting with bin targets
59
-
├── animated_hover_digit.dart # Animated numeric display on hover
60
-
├── custom_divider.dart # Custom divider with styling
58
+
├── bin_target.dart # Widget for displaying and interacting with
59
+
bin targets
60
+
├── animated_hover_digit.dart # Animated numeric display on hover
61
+
├── custom_divider.dart # Custom divider with styling
62
+
├── utils/
63
+
└── global_scale.dart # Contains the ScaleFactorProvider class for
64
+
screen size adjustments
61
65
```
62
66
63
67
### 🔍 File Details
@@ -83,6 +87,10 @@ lib/
83
87
-**widgets/custom_divider.dart**
84
88
A stylized divider line widget used for separating UI sections.
85
89
90
+
-**utils/global_scale.dart**
91
+
This file contains the `ScaleFactorProvider` class, which calculates and applies a scale factor based on the device’s screen width.
92
+
It helps ensure that the UI remains proportionate and readable across different screen sizes by dynamically adjusting the size of UI elements.
93
+
86
94
---
87
95
88
96
### 🖱️ Custom Cursor Implementation
@@ -142,6 +150,30 @@ This code ensures that the custom cursor is set when the app launches on macOS,
142
150
143
151
---
144
152
153
+
## ⚙️ Scale Factor Adjustment
154
+
155
+
To ensure the app's UI adapts across different screen sizes, the `ScaleFactorProvider` class provides dynamic scaling of UI elements based on the device's screen width. This allows for a consistent user experience on various devices, from small screens to larger displays.
156
+
157
+
### How it Works
158
+
159
+
1.**Scale Factor Calculation**
160
+
The `updateScaleFactor` method takes the current screen width and assigns an appropriate scale factor:
161
+
- Smaller screens have a reduced scale factor.
162
+
- Larger screens use a scale factor closer to `1.0` (no scaling).
163
+
164
+
This method helps ensure that the UI remains usable and well-proportioned on all devices.
165
+
166
+
2.**Scaling Values**
167
+
The `scaleValue` method multiplies the provided value by the current scale factor, ensuring that dimensions and spacing are adjusted accordingly.
0 commit comments