german fixes, menu improvement

This commit is contained in:
Sander Land committed 2020-06-06 20:39:25 +02:00
1 parent 046847da1f
commit 1e90f4f8db
16 files changed
+199 -166

No files matched your search

+84 -46
View File
@@ -17,7 +17,6 @@
#:import BOX_BACKGROUND_COLOR katrain.gui.style.BOX_BACKGROUND_COLOR
#:import TEXT_COLOR katrain.gui.style.TEXT_COLOR
#:import BOX_BACKGROUND_COLOR katrain.gui.style.BOX_BACKGROUND_COLOR
#:set SPINNER_OPTION_COLOR [64 / 255, 85 / 255, 110 / 255, 1]
#:set BLACK [0.05,0.05,0.05,1]
@@ -139,7 +138,7 @@
Color:
rgba: LIGHTGREY
Line
points: self.pos[0],self.pos[1],self.pos[0]+self.width,self.pos[1]
points: self.x,self.y,self.x+self.width,self.y
width: 1
<I18NSpinner>:
@@ -688,6 +687,43 @@
size_hint_y: 1e-9 # takes up remaining space if info is closed
<MenuItem>
font_size: self.height * 0.5
size_hint_y: None
height: 50
background_color: BOX_BACKGROUND_COLOR
content_width: icon.width + label.texture_size[0] * 1.33
MDFloatLayout:
id: icon
size_hint: None, 1
width: self.height + 16
Image:
id:image
source: root.icon
mipmap: True
size_hint: 0.7,0.7
pos_hint: {'center_y': 0.5,'center_x': 0.5}
AnchorLayout:
size_hint_x: 1
anchor_x: 'left'
Label:
id: label
text: root.text
size: self.texture_size
size_hint: None, None
font_size: root.font_size
font_name: root.font_name
color: WHITE
Label:
text: root.shortcut
halign: 'left'
valign: 'middle'
size_hint_x: 1/3
font_size: root.font_size
font_name: root.font_name
color: LIGHTGREY
<AnalysisToggle>:
adaptive_width: True
spacing: CP_SPACING
@@ -711,19 +747,45 @@
active: root.default_active
on_active: if app.gui: app.gui.update_state()
<AnalysisDropdownMenu>:
background_color: BOX_BACKGROUND_COLOR
opening_time: 0.1
width_mult: 1.25
<AnalysisMenuItem@MenuItem>:
on_close: app.gui.analysis_controls.close_dropdown()
background_color: SPINNER_OPTION_COLOR
height: 45
canvas.before:
Color:
rgba: WHITE
Line:
points: self.x,self.y, self.x,self.y+self.height
Color:
rgba: LIGHTGREY
Line
points: self.x,self.y,self.x+self.width,self.y
width: 1
<AnalysisDropdownMenuRightContent>:
width: 0
Label:
id: label
size: dp(30)
font_size: root.font_size
text: root.text
color: LIGHTGREY
<AnalysisDropDown>:
width: 50
katrain: app.gui
AnalysisMenuItem:
text: i18n._("analysis:extra")
icon: 'img/Extra.png'
shortcut: 'a'
on_action: root.katrain("analyze-extra", "extra")
AnalysisMenuItem:
text: i18n._("analysis:equalize")
icon: 'img/Equalize.png'
shortcut: 's'
on_action: root.katrain("analyze-extra", "equalize")
AnalysisMenuItem:
text: i18n._("analysis:sweep")
icon: 'img/Sweep.png'
shortcut: 'd'
on_action: root.katrain("analyze-extra", "sweep")
AnalysisMenuItem:
text: i18n._("analysis:aimove")
icon: 'img/ai.png'
shortcut: 'enter'
on_action: root.katrain("ai-move")
<AnalysisControls>:
@@ -764,45 +826,19 @@
AnalysisToggle:
id: ownership
text: i18n._('analysis:territory')
AutoSizedRoundedRectangleButton:
AutoSizedRectangleButton:
background_color: BOX_BACKGROUND_COLOR
size_hint_y: 0.5
id: analysis_button
on_press: root.open_analysis_menu()
on_release: root.toggle_dropdown()
text: i18n._("btn:Analyze")
pos_hint: {'center_y':0.5}
<MainMenuItem>
font_size: self.height * 0.5
size_hint_y: None
<MainMenuItem@MenuItem>
on_close: app.gui.nav_drawer.set_state("close")
height: self.parent.item_height or 50
background_color: BOX_BACKGROUND_COLOR
MDFloatLayout:
size_hint: None, 1
width: self.height + 16
Image:
id:image
source: root.icon
mipmap: True
size_hint: 0.7,0.7
pos_hint: {'center_y': 0.5,'center_x': 0.5}
Label:
text: root.text
text_size: self.size
size_hint_x: 1
halign: 'left'
valign: 'middle'
font_size: root.font_size
font_name: root.font_name
color: WHITE
Label:
text: root.shortcut
halign: 'left'
valign: 'middle'
size_hint_x: 1/3
font_size: root.font_size
font_name: root.font_name
color: LIGHTGREY
<LangButton@TransparentIconButton>
@@ -999,6 +1035,8 @@
id: analyze
on_state: app.gui.update_state()
<KaTrainGui>:
board_gui: board_gui
controls: controls