size fiddling

This commit is contained in:
Sander Land committed 2020-06-08 18:55:41 +02:00
1 parent f1a6c62b37
commit c6669cd42b
2 files changed
+43 -42

No files matched your search

+41 -41
View File
@@ -266,7 +266,7 @@
<HamburgerButton@TransparentIconButton>:
icon: 'img/hamburger.png'
width: self.height
icon_size: [self.height * 0.6, self.height * 0.6]
icon_size: [self.height * 0.5, self.height * 0.5]
# ---------- components of right pane -------
@@ -796,7 +796,6 @@
<AnalysisControls>:
katrain: app.gui
orientation: 'horizontal'
padding: CP_PADDING, CP_PADDING
spacing: CP_SPACING
show_children: show_children
eval: eval
@@ -808,44 +807,45 @@
HamburgerButton:
id: hamburger
size_hint: None, 1
pos_hint: {'center_y': 0.5,'left': 0}
on_press: app.gui.nav_drawer.set_state("open")
MDBoxLayout:
pos_hint: {'center_x': 0.5,'center_y': 0.5}
size_hint: None, 1
adaptive_width: True
spacing: show_children.width/4
AnalysisToggle:
id: show_children
text: i18n._("analysis:nextmoves")
default_active: True
AnalysisToggle:
id: eval
text: i18n._("analysis:dots")
AnalysisToggle:
id: hints
text: i18n._("analysis:topmoves")
AnalysisToggle:
id: policy
text: i18n._("analysis:policy")
AnalysisToggle:
id: ownership
text: i18n._('analysis:territory')
MDFloatLayout:
AutoSizedRectangleButton:
background_color: BOX_BACKGROUND_COLOR
size_hint_y: 0.5
pos_hint: {'center_y': 0.5, 'x': 0}
id: analysis_button
on_release: root.toggle_dropdown()
text: ' ' + i18n._("btn:Analyze")
Image:
pos_hint: {'center_y': 0.5}
x: self.parent.x + 2
size_hint: None, 0.4
width: self.height/2
source: 'img/menu.png'
mipmap: True
AnchorLayout:
MDBoxLayout:
adaptive_width: True
spacing: show_children.width/4
AnalysisToggle:
id: show_children
text: i18n._("analysis:nextmoves")
default_active: True
AnalysisToggle:
id: eval
text: i18n._("analysis:dots")
AnalysisToggle:
id: hints
text: i18n._("analysis:topmoves")
AnalysisToggle:
id: policy
text: i18n._("analysis:policy")
AnalysisToggle:
id: ownership
text: i18n._('analysis:territory')
padding: 0,0,show_children.width/8,0 # space button a bit more
MDFloatLayout:
width: analysis_button.width
size_hint: None, 1
AutoSizedRectangleButton:
background_color: BOX_BACKGROUND_COLOR
size_hint_y: 0.5
pos_hint: {'center_y': 0.5, 'x': 0}
id: analysis_button
on_release: root.toggle_dropdown()
text: ' ' + i18n._("btn:Analyze")
Image:
pos_hint: {'center_y': 0.5}
x: self.parent.x + 2
size_hint: None, 0.4
width: self.height/2
source: 'img/menu.png'
mipmap: True
@@ -1073,14 +1073,14 @@
AnalysisControls:
id: analysis_controls
size_hint_y: None
height: 1 if root.zen > 0 else min(75,self.width / 13.5)
height: 1 if root.zen > 0 else max(dp(50),min(dp(75),self.width / 13.5))
opacity: 0 if root.zen > 0 else 1
BadukPanWidget:
id: board_gui
BadukPanControls:
id: board_controls
size_hint_y: None
height: 1 if root.zen > 0 else min(75,self.width / 13.5)
height: 1 if root.zen > 0 else max(dp(50),min(dp(75),self.width / 13.5))
opacity: 0 if root.zen > 0 else 1
MDBoxLayout:
size_hint_x: None
+2 -1
View File
@@ -10,6 +10,7 @@ from kivy.graphics.vertex_instructions import Ellipse, Line, Rectangle
from kivy.properties import ListProperty, ObjectProperty, BooleanProperty
from kivy.uix.dropdown import DropDown
from kivy.uix.widget import Widget
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.floatlayout import MDFloatLayout
from katrain.core.constants import MODE_PLAY, OUTPUT_DEBUG
@@ -469,7 +470,7 @@ class AnalysisDropDown(DropDown):
pass
class AnalysisControls(MDFloatLayout):
class AnalysisControls(MDBoxLayout):
dropdown = ObjectProperty(None)
is_open = BooleanProperty(False)