no sp in theme
This commit is contained in:
1 parent
0586d73cd9
commit
50a3965abe
4 files changed
+28
-31
No files matched your search
@@ -208,7 +208,7 @@ In addition to shortcuts mentioned above and those shown in the main menu:
|
||||
* If still encountering problems, please start KataGo by itself to check for any errors it gives.
|
||||
* Note that if you don't have a GPU, or your GPU does not support OpenCL, you should use the 'eigen' binaries which run on CPU only.
|
||||
* The font size is too small
|
||||
* On some ultra-high resolution monitors, font scale is not set correctly. Please see [these](https://github.com/sanderland/katrain/issues/250) instructions to adjust them.
|
||||
* On some ultra-high resolution monitors, font scale is not set correctly. Please see [these](https://github.com/sanderland/katrain/issues/250) instructions to adjust Theme.
|
||||
|
||||
## <a name="support"></a> Support / Contribute
|
||||
|
||||
|
||||
+2
-2
@@ -460,7 +460,7 @@
|
||||
lang_change_tracking: i18n._('')
|
||||
markup: root.markup
|
||||
padding: 5, 5
|
||||
font_size: Theme.NOTES_FONT_SIZE
|
||||
font_size: sp(Theme.NOTES_FONT_SIZE)
|
||||
line_height: root.line_height
|
||||
color: Theme.TEXT_COLOR
|
||||
size_hint_y: None
|
||||
@@ -613,7 +613,7 @@
|
||||
size_hint: 1,0
|
||||
LabelledTextInput:
|
||||
id: note
|
||||
font_size: Theme.NOTES_FONT_SIZE
|
||||
font_size: sp(Theme.NOTES_FONT_SIZE)
|
||||
multiline: True
|
||||
on_text: root.katrain.set_note(self.text)
|
||||
hint_text: i18n._('SGF Notes Hint')
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from kivy.metrics import sp
|
||||
|
||||
|
||||
def to_hexcol(kivycol):
|
||||
return "#" + "".join(f"{round(c * 255):02x}" for c in kivycol[:3])
|
||||
|
||||
@@ -22,9 +19,9 @@ BLUE = [0.3, 0.7, 0.9, 1]
|
||||
class Theme:
|
||||
# font
|
||||
DEFAULT_FONT = "fonts/NotoSansCJKsc-Regular.otf"
|
||||
INPUT_FONT_SIZE = sp(25)
|
||||
DESC_FONT_SIZE = sp(20)
|
||||
NOTES_FONT_SIZE = sp(18)
|
||||
INPUT_FONT_SIZE = 25 # sp
|
||||
DESC_FONT_SIZE = 20 # sp
|
||||
NOTES_FONT_SIZE = 18 # sp
|
||||
|
||||
# gui colors
|
||||
BACKGROUND_COLOR = [36 / 255, 48 / 255, 62 / 255, 1]
|
||||
|
||||
+22
-22
@@ -18,10 +18,10 @@
|
||||
# hint_text: "Helper text on focus"
|
||||
# helper_text: "This will disappear when you click off"
|
||||
# helper_text_mode: "on_focus"
|
||||
# font_size: Theme.INPUT_FONT_SIZE
|
||||
# font_size: sp(Theme.INPUT_FONT_SIZE)
|
||||
|
||||
<LabelledTextInput>:
|
||||
font_size: Theme.INPUT_FONT_SIZE
|
||||
font_size: sp(Theme.INPUT_FONT_SIZE)
|
||||
helper_text_mode: "none"
|
||||
hint_text: ""
|
||||
helper_text: ""
|
||||
@@ -35,27 +35,27 @@
|
||||
helper_text: i18n._("file not found")
|
||||
|
||||
<LabelledIntInput>:
|
||||
font_size: Theme.INPUT_FONT_SIZE
|
||||
font_size: sp(Theme.INPUT_FONT_SIZE)
|
||||
size_hint: 0.5, None
|
||||
|
||||
<LabelledFloatInput>:
|
||||
font_size: Theme.INPUT_FONT_SIZE
|
||||
font_size: sp(Theme.INPUT_FONT_SIZE)
|
||||
size_hint: 0.5, None
|
||||
|
||||
<LabelledCheckBox>:
|
||||
size: Theme.DESC_FONT_SIZE*2,Theme.DESC_FONT_SIZE*2
|
||||
size: sp(Theme.DESC_FONT_SIZE)*2,sp(Theme.DESC_FONT_SIZE)*2
|
||||
size_hint: None,None
|
||||
|
||||
<QuickInputButton@SizedRectangleButton>
|
||||
on_left_press: if self.target: self.target.text = self.text
|
||||
size: Theme.DESC_FONT_SIZE * 2, Theme.DESC_FONT_SIZE * 2
|
||||
font_size: Theme.DESC_FONT_SIZE
|
||||
size: sp(Theme.DESC_FONT_SIZE) * 2, sp(Theme.DESC_FONT_SIZE) * 2
|
||||
font_size: sp(Theme.DESC_FONT_SIZE)
|
||||
|
||||
<I18NPopup>:
|
||||
background_color: Theme.BACKGROUND_COLOR
|
||||
background: self.background if kivy_version < '2.0' else ''
|
||||
title: i18n._(self.title_key)
|
||||
title_size: Theme.DESC_FONT_SIZE
|
||||
title_size: sp(Theme.DESC_FONT_SIZE)
|
||||
title_font: self.font_name
|
||||
size_hint: None, None
|
||||
|
||||
@@ -65,14 +65,14 @@
|
||||
padding: 4*CP_PADDING,CP_PADDING, 4*CP_PADDING, CP_PADDING
|
||||
|
||||
<DescriptionLabel>:
|
||||
font_size: Theme.DESC_FONT_SIZE
|
||||
font_size: sp(Theme.DESC_FONT_SIZE)
|
||||
multiline: True
|
||||
text_size: self.width, None
|
||||
halign: 'center'
|
||||
valign: 'center'
|
||||
|
||||
<SmallDescriptionLabel@DescriptionLabel>
|
||||
font_size: Theme.DESC_FONT_SIZE * 0.66
|
||||
font_size: sp(Theme.DESC_FONT_SIZE) * 0.66
|
||||
|
||||
<ConfigPopup>:
|
||||
configfile: configfile
|
||||
@@ -84,7 +84,7 @@
|
||||
katago_download_progress_box: katago_download_progress_box
|
||||
DescriptionLabel:
|
||||
text: i18n._('katago settings')
|
||||
font_size: Theme.DESC_FONT_SIZE * 1.5
|
||||
font_size: sp(Theme.DESC_FONT_SIZE) * 1.5
|
||||
GridLayout:
|
||||
cols: 2
|
||||
rows: 6
|
||||
@@ -167,9 +167,9 @@
|
||||
orientation: 'horizontal'
|
||||
DescriptionLabel:
|
||||
text: i18n._('general settings')
|
||||
font_size: Theme.DESC_FONT_SIZE * 1.5
|
||||
font_size: sp(Theme.DESC_FONT_SIZE) * 1.5
|
||||
DescriptionLabel:
|
||||
font_size: Theme.DESC_FONT_SIZE * 1.5
|
||||
font_size: sp(Theme.DESC_FONT_SIZE) * 1.5
|
||||
text: i18n._('engine settings')
|
||||
BoxLayout:
|
||||
size_hint: 1,5
|
||||
@@ -277,7 +277,7 @@
|
||||
padding: 4
|
||||
size_hint: 0.95, 1
|
||||
DescriptionLabel:
|
||||
font_size: Theme.DESC_FONT_SIZE * 0.8
|
||||
font_size: sp(Theme.DESC_FONT_SIZE) * 0.8
|
||||
text: i18n._("theme")
|
||||
AnchorLayout:
|
||||
LabelledSpinner:
|
||||
@@ -285,7 +285,7 @@
|
||||
input_property: 'trainer/theme'
|
||||
id: themes_spinner
|
||||
DescriptionLabel:
|
||||
font_size: Theme.DESC_FONT_SIZE * 0.8
|
||||
font_size: sp(Theme.DESC_FONT_SIZE) * 0.8
|
||||
text: i18n._("stats on top move")
|
||||
AnchorLayout:
|
||||
BoxLayout:
|
||||
@@ -303,19 +303,19 @@
|
||||
value_refs: TOP_MOVE_OPTIONS
|
||||
input_property: "trainer/top_moves_show_secondary"
|
||||
DescriptionLabel:
|
||||
font_size: Theme.DESC_FONT_SIZE * 0.8
|
||||
font_size: sp(Theme.DESC_FONT_SIZE) * 0.8
|
||||
text: i18n._("show stats if")
|
||||
AnchorLayout:
|
||||
LabelledIntInput:
|
||||
input_property: "trainer/low_visits"
|
||||
DescriptionLabel:
|
||||
font_size: Theme.DESC_FONT_SIZE * 0.8
|
||||
font_size: sp(Theme.DESC_FONT_SIZE) * 0.8
|
||||
text: i18n._("show ai dots")
|
||||
AnchorLayout:
|
||||
LabelledCheckBox:
|
||||
input_property: "trainer/eval_show_ai"
|
||||
DescriptionLabel:
|
||||
font_size: Theme.DESC_FONT_SIZE * 0.8
|
||||
font_size: sp(Theme.DESC_FONT_SIZE) * 0.8
|
||||
text: i18n._("cache analysis to sgf")
|
||||
AnchorLayout:
|
||||
LabelledCheckBox:
|
||||
@@ -468,7 +468,7 @@
|
||||
LabelledSpinner:
|
||||
size_hint: 0.8,0.8
|
||||
input_property: 'game/rules'
|
||||
font_size: Theme.DESC_FONT_SIZE
|
||||
font_size: sp(Theme.DESC_FONT_SIZE)
|
||||
id: rules_spinner
|
||||
Label:
|
||||
DescriptionLabel:
|
||||
@@ -518,7 +518,7 @@
|
||||
BoxLayout:
|
||||
size_hint: 1,1
|
||||
DescriptionLabel:
|
||||
font_size: Theme.DESC_FONT_SIZE
|
||||
font_size: sp(Theme.DESC_FONT_SIZE)
|
||||
text: i18n._('Select AI')
|
||||
AnchorLayout:
|
||||
I18NSpinner:
|
||||
@@ -527,12 +527,12 @@
|
||||
BoxLayout:
|
||||
size_hint: 1,1
|
||||
DescriptionLabel:
|
||||
font_size: Theme.DESC_FONT_SIZE
|
||||
font_size: sp(Theme.DESC_FONT_SIZE)
|
||||
size_hint: 1, 1
|
||||
text: i18n._('estimated strength')
|
||||
DescriptionLabel:
|
||||
size_hint: 0.8, 1
|
||||
font_size: Theme.DESC_FONT_SIZE
|
||||
font_size: sp(Theme.DESC_FONT_SIZE)
|
||||
id: estimated_rank_label
|
||||
text: '?' + i18n._('strength:kyu')
|
||||
SmallDescriptionLabel:
|
||||
|
||||
Reference in new issue
Block a user