diff --git a/katrain/gui.kv b/katrain/gui.kv index 2c03d82..682d1bc 100644 --- a/katrain/gui.kv +++ b/katrain/gui.kv @@ -290,11 +290,11 @@ max_lines: 1 halign: 'center' valign: 'middle' - Label: + Label: # todo: proper scaling/shortening label instead of this jank text: (root.name if root.name and root.player_type==PLAYER_HUMAN and root.player_subtype == PLAYING_NORMAL else i18n._(root.player_subtype) ) + (" ({})".format(root.rank) if root.rank and root.player_subtype != PLAYING_TEACHING else "") size_hint: 1,0.4 - font_size: 0.7 * self.height - text_size: self.size + font_size: self.height * 0.7 if root.player_type==PLAYER_HUMAN else self.height * 0.7 * min(1,18/len(self.text)) + text_size: self.size if root.player_type==PLAYER_HUMAN else (None,self.height) halign: 'center' valign: 'middle' shorten: root.player_type==PLAYER_HUMAN # overflow/cut rank off AI names diff --git a/katrain/gui/popups.py b/katrain/gui/popups.py index 8f730ac..95267fb 100644 --- a/katrain/gui/popups.py +++ b/katrain/gui/popups.py @@ -361,6 +361,7 @@ class ConfigAIPopup(QuickConfigGui): def update_config(self, save_to_file=True): super().update_config(save_to_file=save_to_file) self.katrain.update_calculated_ranks() + Clock.schedule_once(self.katrain.controls.update_players, 0) class ConfigPopup(QuickConfigGui): diff --git a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo index 0bb0e33..8ff34c1 100644 Binary files a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo differ diff --git a/katrain/popups.kv b/katrain/popups.kv index 9f16abd..389d550 100644 --- a/katrain/popups.kv +++ b/katrain/popups.kv @@ -49,7 +49,6 @@ size: DESC_FONT_SIZE*2,DESC_FONT_SIZE*2 size_hint: None,None - on_left_press: if self.target: self.target.text = self.text size: DESC_FONT_SIZE * 2, DESC_FONT_SIZE * 2 @@ -63,7 +62,6 @@ title_font: self.font_name size_hint: None, None - : orientation: 'vertical' spacing: CP_SPACING @@ -364,10 +362,13 @@ spacing: CP_SPACING QuickInputButton: text: '0.5' + on_left_press: km.text=self.text QuickInputButton: text: '6.5' + on_left_press: km.text=self.text QuickInputButton: text: '7.5' + on_left_press: km.text=self.text DescriptionLabel: text: i18n._("ruleset") AnchorLayout: