From 0de50719cf499835d856a96c2dbcf710ea94650b Mon Sep 17 00:00:00 2001 From: Sander Land Date: Sat, 30 May 2020 20:55:16 +0200 Subject: [PATCH] remove dev, fix setup --- dev/buttons.py | 257 ------ dev/crash.py | 67 -- dev/filebrowser.py | 492 ---------- dev/files.py | 40 - dev/labels.py | 64 -- dev/pause.py | 170 ---- dev/profile.py | 13 - dev/test.py | 115 --- dev/textbug.py | 45 - katrain/gui/widgets/filebrowser.py | 12 +- .../i18n/locales/ko/LC_MESSAGES/katrain.mo | Bin 10714 -> 10462 bytes .../i18n/locales/ko/LC_MESSAGES/katrain.po | 864 ++++++++---------- setup.py | 2 + 13 files changed, 393 insertions(+), 1748 deletions(-) delete mode 100644 dev/buttons.py delete mode 100644 dev/crash.py delete mode 100644 dev/filebrowser.py delete mode 100644 dev/files.py delete mode 100644 dev/labels.py delete mode 100644 dev/pause.py delete mode 100644 dev/profile.py delete mode 100644 dev/test.py delete mode 100644 dev/textbug.py diff --git a/dev/buttons.py b/dev/buttons.py deleted file mode 100644 index acdff24..0000000 --- a/dev/buttons.py +++ /dev/null @@ -1,257 +0,0 @@ -import kivy -from kivy.app import App -from kivy.core.text import Label as CoreLabel -from kivy.lang import Builder -from kivy.properties import ( - BooleanProperty, - ListProperty, - NumericProperty, - ObjectProperty, - OptionProperty, - StringProperty, -) -from kivy.uix.behaviors import ButtonBehavior, ToggleButtonBehavior -from kivy.uix.button import Button -from kivy.uix.checkbox import CheckBox -from kivy.uix.gridlayout import GridLayout -from kivy.uix.label import Label -from kivy.uix.scrollview import ScrollView -from kivy.uix.spinner import Spinner -from kivy.uix.widget import Widget -from kivymd.app import MDApp -from kivymd.uix.behaviors import CircularRippleBehavior, RectangularRippleBehavior -from kivymd.uix.boxlayout import MDBoxLayout -from kivymd.uix.button import BaseFlatButton, BasePressedButton -from kivymd.uix.navigationdrawer import MDNavigationDrawer - -WHITE = [1, 1, 1, 1] - - -class TestBox(GridLayout): - pass - - -class BackgroundMixin(Widget): - background_color = ListProperty([0, 0, 0, 0]) - background_radius = NumericProperty(0) - outline_color = ListProperty([0, 0, 0, 0]) - outline_width = NumericProperty(1) - - -class LeftButtonBehavior(ButtonBehavior): # stops buttons etc activating on right click - def __init__(self, **kwargs): - self.register_event_type("on_left_release") - self.register_event_type("on_left_press") - super().__init__(**kwargs) - - def on_touch_down(self, touch): - return super().on_touch_down(touch) - - def on_release(self): - if not self.last_touch or self.last_touch.button == "left": - self.dispatch("on_left_release") - return super().on_release() - - def on_press(self): - if not self.last_touch or self.last_touch.button == "left": - self.dispatch("on_left_press") - return super().on_press() - - def on_left_release(self): - pass - - def on_left_press(self): - pass - - -# -- resizeable buttons -class SizedButton(LeftButtonBehavior, RectangularRippleBehavior, BasePressedButton, BaseFlatButton, BackgroundMixin): # avoid baserectangular for sizing - text = StringProperty("") - text_color = ListProperty(WHITE) - text_size = ListProperty([100, 100]) - halign = OptionProperty("center", options=["left", "center", "right", "justify", "auto"]) - label = ObjectProperty(None) - padding_x = NumericProperty(6) - padding_y = NumericProperty(0) - fsz = NumericProperty(None) - - -class AutoSizedButton(SizedButton): - pass - - -class ToggleButtonMixin(ToggleButtonBehavior): - inactive_outline_color = ListProperty([0.5, 0.5, 0.5, 0]) - active_outline_color = ListProperty([1, 1, 1, 0]) - inactive_background_color = ListProperty([0.5, 0.5, 0.5, 1]) - active_background_color = ListProperty([1, 1, 1, 1]) - - -class SizedRectangleButton(SizedButton): - pass - - -class SizedRectangleToggleButton(ToggleButtonMixin, SizedRectangleButton): - pass - - -class AutoSizedRectangleButton(AutoSizedButton): - pass - - -class AutoSizedRectangleToggleButton(ToggleButtonMixin, AutoSizedRectangleButton): - pass - - -class TransparentIconButton(CircularRippleBehavior, Button): - icon_size = ListProperty([25, 25]) - icon = StringProperty("") - - -KV = """ -#:set LIGHTGREY [0.7,0.7,0.7,1] -#:set WHITE [1,1,1,1] - -#:set BUTTON_INACTIVE_COLOR LIGHTGREY -#:set BACKGROUND_COLOR [16/255,18/255,32/255,1] -#:set BOX_BACKGROUND_COLOR [46/255,65/255,88/255,1] -#:set TEXT_COLOR WHITE -