changing layout sizes
This commit is contained in:
parent
5108b405e0
commit
3a5caece03
4 changed files with 9 additions and 9 deletions
|
|
@ -388,10 +388,10 @@ class _FormulaScreenState extends State<FormulaScreen> {
|
|||
children: [
|
||||
// Fixed width for field name
|
||||
SizedBox(
|
||||
width: 150,
|
||||
width: 50,
|
||||
child: Text(
|
||||
variable.name,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.fade
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8), // Add some spacing
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class _ImportPreviewScreenState extends State<ImportPreviewScreen> {
|
|||
}
|
||||
|
||||
try {
|
||||
widget.corpus.loadFormulaElements(selectedElements);
|
||||
widget.corpus.loadFormulaElements(selectedElements, true);
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class UnitDropdown extends StatelessWidget {
|
|||
final availableUnits = unitNames.map((name) => corpus.getUnit(name)).toList();
|
||||
|
||||
return SizedBox(
|
||||
width: 200, // Constrain dropdown width
|
||||
width: 50, // Constrain dropdown width
|
||||
child: DropdownButton<String>(
|
||||
value: selectedUnit ?? variable.unit,
|
||||
selectedItemBuilder: (context) => availableUnits.map((unit) =>
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ class Corpus{
|
|||
|
||||
/// Loads formula elements, making sure to load units first, then formulas
|
||||
/// to avoid dependency issues.
|
||||
void loadFormulaElements(List<FormulaElement> elements) {
|
||||
void loadFormulaElements(List<FormulaElement> elements, [bool replaceOnDuplicates = false]) {
|
||||
List<UnitSpec> units = [];
|
||||
List<Formula> formulas = [];
|
||||
|
||||
|
|
@ -239,10 +239,10 @@ class Corpus{
|
|||
}
|
||||
|
||||
// Load units first to satisfy dependencies
|
||||
loadUnits(units);
|
||||
loadUnits(units, replaceOnDuplicates);
|
||||
|
||||
// Then load formulas
|
||||
loadFormulas(formulas);
|
||||
loadFormulas(formulas, replaceOnDuplicates: replaceOnDuplicates, checkUnits: true);
|
||||
}
|
||||
|
||||
/// Loads corpus from database elements
|
||||
|
|
|
|||
Loading…
Reference in a new issue