Skip to content

Commit

Permalink
* fix layout height for ui widgets in macos (i.e. platform darwin)
Browse files Browse the repository at this point in the history
  • Loading branch information
DocGarbanzo committed May 21, 2024
1 parent 079ecaf commit 7ec7211
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions donkeycar/management/ui/common.kv
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#:import platform sys.platform

#:set common_height 30
#:set reduced_height 40 if platform == 'darwin' else 20
#:set common_height 60 if platform == 'darwin' else 30
#:set spacing 10
#:set layout_height common_height + spacing

Expand Down Expand Up @@ -226,7 +227,7 @@
current_field: data_spinner.text
BoxLayout:
size_hint_y: None
height: 20
height: reduced_height
spacing: 2
MyLabel:
id: label
Expand Down
6 changes: 3 additions & 3 deletions donkeycar/management/ui/pilot_screen.kv
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
pilot_loader: pilot_loader
DataPanel:
size_hint_y: None
height: 20 + (self.minimum_height - 20) * 15
height: reduced_height + (self.minimum_height - reduced_height) * 15
id: data_panel
is_linked: True
font_color: [0.2, 0.2, 1, 1]
Expand All @@ -126,7 +126,7 @@
BackgroundBoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height +60
height: self.minimum_height + 2 * common_height
Header:
title: 'Multi Pilot Loader'
description:
Expand Down Expand Up @@ -217,7 +217,7 @@
BackgroundBoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height + 90
height: self.minimum_height + 3 * common_height
Slider:
size_hint_y: None
height: common_height
Expand Down
2 changes: 1 addition & 1 deletion donkeycar/management/ui/train_screen.kv
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
orientation: 'vertical'
spacing: spacing
size_hint_y: None
height: self.minimum_height + 80
height: self.minimum_height + 4 * reduced_height
Header:
size_hint_y: 1.5
id: cfg_header
Expand Down
2 changes: 1 addition & 1 deletion donkeycar/management/ui/ui.kv
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ BoxLayout:
ActionView:
id: av
size_hint_y: None
height: 20
height: reduced_height

ActionPrevious:
with_previous: False
Expand Down

0 comments on commit 7ec7211

Please sign in to comment.