diff options
author | Matthias Baumgartner <dev@igsor.net> | 2023-01-07 15:53:20 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2023-01-07 15:53:20 +0100 |
commit | 6b6495b8f5b3bfd8fbd4caf56a44424df070e813 (patch) | |
tree | be561be3cc9d0deb4f0d23651ac69bdc390d011a | |
parent | 74ea37edd18c55c6b0ba66405149530d0a5d5153 (diff) | |
download | tagit-6b6495b8f5b3bfd8fbd4caf56a44424df070e813.tar.gz tagit-6b6495b8f5b3bfd8fbd4caf56a44424df070e813.tar.bz2 tagit-6b6495b8f5b3bfd8fbd4caf56a44424df070e813.zip |
removed tabs
-rw-r--r-- | tagit/actions/__init__.py | 5 | ||||
-rw-r--r-- | tagit/config/port-config.yaml | 5 | ||||
-rw-r--r-- | tagit/config/user-defaults.json | 3 | ||||
-rw-r--r-- | tagit/config/user-defaults.yaml | 2 | ||||
-rw-r--r-- | tagit/widgets/desktop.kv | 24 | ||||
-rw-r--r-- | tagit/widgets/desktop.py | 1 | ||||
-rw-r--r-- | tagit/widgets/tabs.kv | 31 | ||||
-rw-r--r-- | tagit/widgets/tabs.py | 37 |
8 files changed, 18 insertions, 90 deletions
diff --git a/tagit/actions/__init__.py b/tagit/actions/__init__.py index 9fd6342..ecff701 100644 --- a/tagit/actions/__init__.py +++ b/tagit/actions/__init__.py @@ -20,7 +20,6 @@ from . import misc from . import planes from . import search #from . import session -#from . import tabs # exports __all__: typing.Sequence[str] = ( @@ -122,10 +121,6 @@ class ActionBuilder(BuilderBase): #'CreateTempSession': session.CreateTempSession, #'ReloadSession': session.ReloadSession, #'CloseSessionAndExit': session.CloseSessionAndExit, - ## tabs - #'AddTab': tabs.AddTab, - #'CloseTab': tabs.CloseTab, - #'SwitchTab': tabs.SwitchTab, } ## EOF ## diff --git a/tagit/config/port-config.yaml b/tagit/config/port-config.yaml index 038dc07..d05a498 100644 --- a/tagit/config/port-config.yaml +++ b/tagit/config/port-config.yaml @@ -83,8 +83,9 @@ ui: - author - camera - attributes - tabs: - max: 2 + # FIXME: mb/port/tabs + #tabs: + # max: 2 tiledocks: dashboard: {} #Buttons: diff --git a/tagit/config/user-defaults.json b/tagit/config/user-defaults.json index b76ef2b..5a39311 100644 --- a/tagit/config/user-defaults.json +++ b/tagit/config/user-defaults.json @@ -39,9 +39,6 @@ "SelectRange" ] }, - "tabs": { - "max": 2 - }, "tiledocks": { "dashboard": { "Buttons": { diff --git a/tagit/config/user-defaults.yaml b/tagit/config/user-defaults.yaml index b7a70c4..62b8ed6 100644 --- a/tagit/config/user-defaults.yaml +++ b/tagit/config/user-defaults.yaml @@ -81,8 +81,6 @@ ui: - author - camera - attributes - tabs: - max: 2 tiledocks: dashboard: Buttons: diff --git a/tagit/widgets/desktop.kv b/tagit/widgets/desktop.kv index 9ebd08d..cbc5c48 100644 --- a/tagit/widgets/desktop.kv +++ b/tagit/widgets/desktop.kv @@ -11,10 +11,9 @@ <MainWindow>: # main content - tabs: tabs # required by most tiles and actions - browser: tabs.children[tabs.current].browser - filter: tabs.children[tabs.current].filter + browser: browser + filter: filter status: status # required by actions.planes planes: planes @@ -69,17 +68,24 @@ size_hint: 1, 1 BoxLayout: - id: tabs orientation: 'horizontal' size_hint: 1, 1 current: 0 - # Here come the browsing tabs + BoxLayout: + orientation: 'vertical' + size_hint: 1, 1 - Tab: - root: root - active: True - # one tab is always present + Filter: + id: filter + root: root + size_hint: 1, None + height: 30 + + Browser: + id: browser + root: root + size_hint: 1, 0.96 Status: id: status diff --git a/tagit/widgets/desktop.py b/tagit/widgets/desktop.py index 018bd60..dffc3d7 100644 --- a/tagit/widgets/desktop.py +++ b/tagit/widgets/desktop.py @@ -33,7 +33,6 @@ from .filter import Filter from .keyboard import Keyboard from .session import Session from .status import Status -from .tabs import Tab # exports __all__: typing.Sequence[str] = ( diff --git a/tagit/widgets/tabs.kv b/tagit/widgets/tabs.kv deleted file mode 100644 index e206b1b..0000000 --- a/tagit/widgets/tabs.kv +++ /dev/null @@ -1,31 +0,0 @@ -#:import Filter tagit.widgets.filter -#:import Browser tagit.widgets.browser - -<Tab>: - orientation: 'vertical' - size_hint: 1, 1 - # content - browser: browser - filter: filter - - Label: # activity indicator - size_hint: 1, 0.02 - canvas.before: - Color: - rgba: 0, 0, root.active, 1 - Rectangle: - pos: self.pos - size: self.size - - Filter: - id: filter - root: root.root - size_hint: 1, None - height: 30 - - Browser: - id: browser - root: root.root - size_hint: 1, 0.96 - -## EOF ## diff --git a/tagit/widgets/tabs.py b/tagit/widgets/tabs.py deleted file mode 100644 index 6fef276..0000000 --- a/tagit/widgets/tabs.py +++ /dev/null @@ -1,37 +0,0 @@ -""" - -Part of the tagit module. -A copy of the license is provided with the project. -Author: Matthias Baumgartner, 2022 -""" -# standard imports -import os - -# kivy imports -from kivy.lang import Builder -from kivy.uix.boxlayout import BoxLayout -import kivy.properties as kp - - -## code ## - -# load kv -Builder.load_file(os.path.join(os.path.dirname(__file__), 'tabs.kv')) - -# classes -class Tab(BoxLayout): - """A tab holds a filter and browser instance for side-by-side view. - All tabs are shown next to each other at all times. - """ - # root reference - root = kp.ObjectProperty(None) - # activity indicator - active = kp.BooleanProperty(False) - - def on_touch_down(self, touch): - """Switch to the present tab by clicking into it.""" - if self.collide_point(*touch.pos): - self.root.trigger('SwitchTab', self) - return super(Tab, self).on_touch_down(touch) - -## EOF ## |