komi button / playerinfo scaling
This commit is contained in:
1 parent
6378400173
commit
b4fff24843
4 files changed
+7
-5
No files matched your search
+3
-3
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Binary file not shown.
+3
-2
@@ -49,7 +49,6 @@
|
||||
size: DESC_FONT_SIZE*2,DESC_FONT_SIZE*2
|
||||
size_hint: None,None
|
||||
|
||||
|
||||
<QuickInputButton@SizedRectangleButton>
|
||||
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
|
||||
|
||||
|
||||
<QuickConfigGui>:
|
||||
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:
|
||||
|
||||
Reference in new issue
Block a user