Skip to content

Commit fa569f2

Browse files
authored
Merge pull request #55 from kedNalatacId/properly_scale_gameid
Fix height of Game ID field using Density Independent Pixels
2 parents 54bb571 + 15f3219 commit fa569f2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ManualClient.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
ModuleUpdate.update()
1212

1313
import Utils
14+
from kivy.metrics import dp
1415

1516
if __name__ == "__main__":
1617
Utils.init_logging("ManualClient", exception_logger="Client")
@@ -233,12 +234,12 @@ def __init__(self, ctx):
233234
def build(self) -> Layout:
234235
super().build()
235236

236-
self.manual_game_layout = BoxLayout(orientation="horizontal", size_hint_y=None, height=30)
237+
self.manual_game_layout = BoxLayout(orientation="horizontal", size_hint_y=None, height=dp(30))
237238

238-
game_bar_label = Label(text="Manual Game ID", size=(150, 30), size_hint_y=None, size_hint_x=None)
239+
game_bar_label = Label(text="Manual Game ID", size=(dp(150), dp(30)), size_hint_y=None, size_hint_x=None)
239240
self.manual_game_layout.add_widget(game_bar_label)
240241
self.game_bar_text = TextInput(text=self.ctx.suggested_game,
241-
size_hint_y=None, height=30, multiline=False, write_tab=False)
242+
size_hint_y=None, height=dp(30), multiline=False, write_tab=False)
242243
self.manual_game_layout.add_widget(self.game_bar_text)
243244

244245
self.grid.add_widget(self.manual_game_layout, 3)

0 commit comments

Comments
 (0)