Changeset 1008:5a311694b5cb for src/mlx/gui
- Timestamp:
- 07/11/19 17:46:41 (5 years ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r1006 r1008 3482 3482 self._fuelTable.set_column_homogeneous(True) 3483 3483 self._fuelTable.set_row_spacing(4) 3484 self._fuelTable.set_column_spacing(16 if numTanks<5 else 0) 3484 3485 index = 0 3485 3486 for (tank, current, capacity) in tankData: … … 3493 3494 xscale = 1.0, yscale = 0.0) 3494 3495 alignment.add(fuelTank.label) 3495 self._fuelTable.attach(alignment, index*2, 0, 3, 1) 3496 self._fuelTable.attach(alignment, 3497 index*(1 if numTanks<5 else 2), 0, 3498 1 if numTanks<5 else 3, 1) 3496 3499 3497 3500 alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5, 3498 3501 xscale = 0.0, yscale = 1.0) 3499 3502 alignment.add(fuelTank) 3500 self._fuelTable.attach(alignment, index*2+1, 1, 1, 1) 3503 self._fuelTable.attach(alignment, 3504 index*(1 if numTanks<5 else 2) + 3505 (0 if numTanks<5 else 1), 1, 1, 1) 3501 3506 3502 3507 … … 3505 3510 alignment.add(fuelTank.expectedButton) 3506 3511 3507 self._fuelTable.attach(alignment, index*2, 3508 2 if (index%2)==0 or numTanks==2 else 3, 3509 3, 1) 3512 self._fuelTable.attach(alignment, 3513 index* (1 if numTanks<5 else 2), 3514 2 if (index%2)==0 or numTanks<5 else 3, 3515 1 if numTanks<5 else 3, 1) 3510 3516 3511 3517 index += 1
Note:
See TracChangeset
for help on using the changeset viewer.